mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Fix for empty _Primary array
This commit is contained in:
parent
7ef339d958
commit
4660975b05
@ -214,21 +214,26 @@ if (!isNull _player) then {
|
|||||||
|
|
||||||
// Workaround for Client / Server synchronizing issue in unitloadout
|
// Workaround for Client / Server synchronizing issue in unitloadout
|
||||||
_Primary = _loadout select 0;
|
_Primary = _loadout select 0;
|
||||||
_loadout set [0,[]];
|
if !(_Primary isequalto []) then {
|
||||||
_newPlyr setunitloadout _loadout;
|
_loadout set [0,[]];
|
||||||
_primaryweapon = _Primary deleteat 0;
|
_newPlyr setunitloadout _loadout;
|
||||||
{
|
_primaryweapon = _Primary deleteat 0;
|
||||||
if (_x isequaltype []) then {
|
{
|
||||||
_newPlyr addMagazine _x;
|
if (_x isequaltype []) then {
|
||||||
};
|
_newPlyr addMagazine _x;
|
||||||
} foreach _Primary;
|
};
|
||||||
_newPlyr addweapon _primaryweapon;
|
} foreach _Primary;
|
||||||
removeAllPrimaryWeaponItems _newPlyr;
|
_newPlyr addweapon _primaryweapon;
|
||||||
{
|
removeAllPrimaryWeaponItems _newPlyr;
|
||||||
if (_x isequaltype "") then {
|
{
|
||||||
_newPlyr addPrimaryWeaponItem _x;
|
if (_x isequaltype "") then {
|
||||||
};
|
_newPlyr addPrimaryWeaponItem _x;
|
||||||
} forEach _Primary;
|
};
|
||||||
|
} forEach _Primary;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_newPlyr setunitloadout _loadout;
|
||||||
|
};
|
||||||
|
|
||||||
diag_log format["DEBUG: loaded player %1 with new schema Version %2", _newPlyr, _schemaVersion];
|
diag_log format["DEBUG: loaded player %1 with new schema Version %2", _newPlyr, _schemaVersion];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user