diff --git a/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf b/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf index e40a9b11..ab21e4bb 100644 --- a/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf +++ b/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf @@ -89,3 +89,26 @@ if (_woman == 1) then { }; }; }; + +_tocheckfor = switch _item do { + case (uniform player): {uniformcontainer player}; + case (vest player): {vestcontainer player}; + case (backpack player): {backpackcontainer player}; + default {objnull}; +}; +if (!isnull _tocheckfor) then { + { + _target = _x; + _subcontainers = everyContainer _target; + { + _subcontainer = _x; + if (_tocheckfor == (_subcontainer select 1)) then { + switch _item do { + case (uniform player): {removeUniform player;}; + case (vest player): {removeVest player;}; + case (backpack player): {removeBackpack player;}; + }; + }; + } foreach _subcontainers; + } foreach (nearestobjects [player,['WeaponHolder','WeaponHolderSimulated','MAN','Landvehicle','SHIP','AIR','ReammoBox_F'],10]); +}; diff --git a/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryClosed.sqf b/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryClosed.sqf index 6d4818b2..a02cd58b 100644 --- a/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryClosed.sqf +++ b/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryClosed.sqf @@ -16,4 +16,7 @@ params ["_unit","_container"]; if !(EPOCH_arr_interactedObjs isEqualTo[]) then { [EPOCH_arr_interactedObjs] remoteExec['EPOCH_server_save_vehicles', 2]; EPOCH_arr_interactedObjs = []; +}; +if !(player == Vehicle Player) then { + call EPOCH_ReloadLoadout; }; \ No newline at end of file