Skip to content

Commit 4b171cb

Browse files
committed
Fix possible weapon dupe
Thx to mmrsz
1 parent a4ce61e commit 4b171cb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

SQF/dayz_code/compile/player_forceSave.sqf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ Opens player inventory to save
44
55
*/
66

7-
_magazineArray = [] call player_countMagazines;
7+
local _magazineArray = [] call player_countMagazines;
88

99
if ((count _magazineArray) > 0) then {
10-
PVDZ_plr_Save = [player, if (player isKindOf "PZombie_VB") then {nil} else {_magazineArray},dayz_onBack,weapons player];
11-
publicVariableServer "PVDZ_plr_Save";
10+
PVDZ_plr_Save = [player, if (player isKindOf "PZombie_VB") then {nil} else {_magazineArray},dayz_onBack,weapons player];
11+
} else {
12+
PVDZ_plr_Save = [player,nil,dayz_onBack,weapons player];
1213
};
14+
publicVariableServer "PVDZ_plr_Save";
1315

1416
//diag_log format["Player_forceSave with magazines: %1",_magazineArray];
1517

0 commit comments

Comments
 (0)