mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +03:00
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.
This commit is contained in:
@@ -151,6 +151,8 @@ dz_fn_switchWeapon_swap = {
|
||||
dayz_onBack = [primaryWeapon player,player removeWeapon primaryWeapon player,player addWeapon dayz_onBack] select 0;
|
||||
};
|
||||
|
||||
player setVariable ["dayz_onBack",dayz_onBack,true];
|
||||
|
||||
if (_this) then {
|
||||
player selectWeapon primaryWeapon player;
|
||||
if (IS_MELEE(primaryWeapon player)) then {
|
||||
|
||||
Reference in New Issue
Block a user