mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-11 10:42:58 +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:
@@ -53,7 +53,7 @@ if (_classname isKindOf "Bag_Base_EP1") exitWith {
|
||||
waitUntil { !isNull (unitBackpack player) };
|
||||
uiSleep 0.03;
|
||||
|
||||
call player_regularSave;
|
||||
call player_forceSave;
|
||||
};
|
||||
|
||||
_config = (configFile >> _type >> _classname);
|
||||
|
||||
@@ -115,5 +115,5 @@ player setVariable ["sleeping",false];
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
//Removed due to player sync returning []
|
||||
//call player_regularSave;
|
||||
//call player_forceSave;
|
||||
R3F_TIRED_Accumulator = 0;
|
||||
@@ -63,7 +63,7 @@ if !(alive _item) then {
|
||||
dayz_lastMeal = time;
|
||||
dayz_hunger = 0;
|
||||
|
||||
call player_regularSave;
|
||||
call player_forceSave;
|
||||
|
||||
[player,"eat",0,false] call dayz_zombieSpeak;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user