This reverts 4b171cb.
player_regularSave should only be used if player_forceSave would interrupt an action like fire a weapon since it opens a dialog. player_regularSave does not save the ammo count but all magazines. Do not use nil instead of the magazines player array since it makes duping possible.
Thx to mmrsz
Thx to mmrsz from discord.
PVDZ_plr_Save sends the current weapons from the player too now. This is needed to prevent the dayz_onBack dupe if the server has low fps.
This is a fairly known issue. One player can fly a uh1y and switch between gunners seats and pilot seat. This makes a seconds player to fly with obsolete.
This commit fixes that issue. Pilots can no longer switch to the gunner seats but the gunners have the option to switch to the pilot seats if it is needed.
DZ helicopters remain unchanged.
Remove the PVCDZ_obj_HideBody eventhandler. Players next to a hided animal see the hiding process too and after 10s the body will be deleted anyways. So there is no need to send a publicVariableServer first then back to all near clients if the body gets deleted within 10s.
Also updates the normal hide body. The hided player model gets deleted by the server now.
Fix that trees going down directly after hit by a chainsaw or hatchet. This is a long time bug because DZE_TEMP_treedmg got not resetted after the tree was cut down.
Also, this commit makes sure that every tree gives at least 16 or more wood on harvesting. Ive added that to reduce the number of cut down trees to not affect the network traffic too much as it is the case at the moment. All trees and damage get sync over the network.
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.