Commit Graph

4 Commits

Author SHA1 Message Date
A Man
9852778ba9 Fix weapon dupe with server_playerSync
This reverts all the last changes to server_playerSync and creates a new global variable for dayz_onBack. This should be the best way to save the gear correct and still get dayz_onBack if the player leaves the server. This change removes the constant sending of the whole player inventory over the network from force or regluar_save. It should no longer be needed since the server does the counting now.
2021-08-19 16:46:06 +02:00
AirwavesMan
e8f2f3fcf0 Fix potential magazine and weapon dupes
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
2021-04-16 13:24:18 +02:00
AirwavesMan
979751d302 Update PVDZ_plr_Save to prevent dayz_onBack dupe
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.
2021-03-08 15:07:13 +01:00
Merlijn
56cd3e8aed Split up save function 2020-12-31 12:11:23 +01:00