I was not aware of the acutal behavior of the init eventHandler. The init eventhandler sends all the given arguments to the player before the mpframework got even load on the player, so it is basicly the same like the publicvariables. This means that the function object_pickupAction will be always nil because it gets defined far later after the init evenhandler fired already.
Reduces the damage from chainsaws and sledge hammers to prevent the very fast destruction of cinder and metal buildings.
This is the only good way to prevent the high damage on cinder and metal. Eventhandlers for damage are not a good idea and can affect the server performace if to many are set.
This commit fixes partly the floating loot issue. The whole problem is not fixable. It is a problem with different components. The main point is that the position can be half water and half not. The second is the building collision and the collision of the loot object. Normally setPosATL should do its work but the object moves on the placement. Adding a special handling for buildings that are mostly over water did the best job so far.
With fixWaterPos = 1; in the building class which has those floating loot problems, the position gets converted to ASL which is better over water but not always. Some loot objects are still floating a bit but I could reach all of them. It is a way better as before.
- Safes and lockboxes can be upgraded now.
- A winter lockbox version was added too. The current model and icon will be replaced later for the new lockbox.
- Calling Child 308 on the DB has no room for storing coins, this is why we need to update coins and gear after swaping the object. Same for upgrade vehicle