mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix nils in array
This commit is contained in:
parent
e4c86a8af5
commit
7628f9a4ab
@ -389,12 +389,18 @@ GVAR(OldIsCamera) = false;
|
||||
|
||||
// we don't want to trigger this just because your ammo counter decreased.
|
||||
_data = + GVAR(OldPlayerInventory);
|
||||
if (!((_data select 0) isEqualTo [])) then {
|
||||
(_data param [0, []]) set [4, primaryWeaponMagazine ACE_player];
|
||||
(_data param [0, []]) set [5, nil];
|
||||
(_data param [0, []]) set [5, []];
|
||||
};
|
||||
if (!((_data select 1) isEqualTo [])) then {
|
||||
(_data param [1, []]) set [4, secondaryWeaponMagazine ACE_player];
|
||||
(_data param [1, []]) set [5, nil];
|
||||
(_data param [1, []]) set [5, []];
|
||||
};
|
||||
if (!((_data select 2) isEqualTo [])) then {
|
||||
(_data param [2, []]) set [4, handgunMagazine ACE_player];
|
||||
(_data param [2, []]) set [5, nil];
|
||||
(_data param [2, []]) set [5, []];
|
||||
};
|
||||
if !(_data isEqualTo GVAR(OldPlayerInventoryNoAmmo)) then {
|
||||
GVAR(OldPlayerInventoryNoAmmo) = _data;
|
||||
["playerInventoryChanged", [ACE_player, GVAR(OldPlayerInventory)]] call FUNC(localEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user