mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Unload _item when is vehicle in vehicle
This commit is contained in:
parent
31426104e1
commit
10ca3d6678
@ -48,10 +48,15 @@ private _itemSize = [_item] call FUNC(getSizeItem);
|
|||||||
_vehicle setVariable [QGVAR(space), (_space + _itemSize), true];
|
_vehicle setVariable [QGVAR(space), (_space + _itemSize), true];
|
||||||
|
|
||||||
if (_item isEqualType objNull) then {
|
if (_item isEqualType objNull) then {
|
||||||
detach _item;
|
if (isVehicleCargo _item) then {
|
||||||
// hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly
|
objNull setVehicleCargo _item;
|
||||||
// do both on server to ensure they are executed in the correct order
|
_item setPosASL (AGLtoASL _emptyPosAGL);
|
||||||
[QGVAR(serverUnload), [_item, _emptyPosAGL]] call CBA_fnc_serverEvent;
|
} else {
|
||||||
|
detach _item;
|
||||||
|
// hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly
|
||||||
|
// do both on server to ensure they are executed in the correct order
|
||||||
|
[QGVAR(serverUnload), [_item, _emptyPosAGL]] call CBA_fnc_serverEvent;
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, "NONE"];
|
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, "NONE"];
|
||||||
_newItem setPosASL (AGLtoASL _emptyPosAGL);
|
_newItem setPosASL (AGLtoASL _emptyPosAGL);
|
||||||
|
Loading…
Reference in New Issue
Block a user