mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
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
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
private ["_charID","_model","_old","_humanity","_medical","_worldspace","_zombieKills","_headShots","_humanKills","_combattimeout","_inCombat","_banditKills","_fractures","_survivalTime","_coins","_bankCoins","_globalCoins","_ConfirmedHumanKills","_ConfirmedBanditKills","_friendlies","_tagSetting"];
|
||||
//_playerUID = _this select 0;
|
||||
closeDialog 0;
|
||||
_charID = _this select 1;
|
||||
_model = _this select 2;
|
||||
|
||||
@@ -13,7 +13,6 @@ _old removeAllEventHandlers "Fired";
|
||||
_old allowDamage false;
|
||||
_old AddEventHandler ["HandleDamage", {False}];
|
||||
|
||||
dayz_unsaved = true;
|
||||
//Logout
|
||||
_humanity = player getVariable ["humanity",0];
|
||||
_medical = player call player_sumMedical;
|
||||
@@ -111,4 +110,4 @@ player allowDamage true;
|
||||
|
||||
uiSleep 0.1;
|
||||
if !(isNull _old) then {deleteVehicle _old;};
|
||||
call player_forceSave;
|
||||
call player_forceSave;
|
||||
Reference in New Issue
Block a user