diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf index 966381e9..cba0e2dd 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf @@ -214,21 +214,26 @@ if (!isNull _player) then { // Workaround for Client / Server synchronizing issue in unitloadout _Primary = _loadout select 0; - _loadout set [0,[]]; - _newPlyr setunitloadout _loadout; - _primaryweapon = _Primary deleteat 0; - { - if (_x isequaltype []) then { - _newPlyr addMagazine _x; - }; - } foreach _Primary; - _newPlyr addweapon _primaryweapon; - removeAllPrimaryWeaponItems _newPlyr; - { - if (_x isequaltype "") then { - _newPlyr addPrimaryWeaponItem _x; - }; - } forEach _Primary; + if !(_Primary isequalto []) then { + _loadout set [0,[]]; + _newPlyr setunitloadout _loadout; + _primaryweapon = _Primary deleteat 0; + { + if (_x isequaltype []) then { + _newPlyr addMagazine _x; + }; + } foreach _Primary; + _newPlyr addweapon _primaryweapon; + removeAllPrimaryWeaponItems _newPlyr; + { + if (_x isequaltype "") then { + _newPlyr addPrimaryWeaponItem _x; + }; + } forEach _Primary; + } + else { + _newPlyr setunitloadout _loadout; + }; diag_log format["DEBUG: loaded player %1 with new schema Version %2", _newPlyr, _schemaVersion];