mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add JIP event deleting if vehicle is deleted (#5506)
This commit is contained in:
@ -56,8 +56,5 @@ if (
|
||||
if (_fuelCargoConfig != 0 || {!isNil {_source getVariable QGVAR(initSource_jipID)}}) exitWith {};
|
||||
|
||||
private _jipID = [QGVAR(initSource), [_source]] call CBA_fnc_globalEventJIP;
|
||||
[_jipID, _source] call CBA_fnc_removeGlobalEventJIP;
|
||||
_source setVariable [QGVAR(initSource_jipID), _jipID];
|
||||
_source addEventHandler ["Deleted", {
|
||||
// delete event from JIP stack to prevent deleted vehicle init
|
||||
cba_events_eventNamespaceJIP setVariable [(_this select 0) getVariable QGVAR(initSource_jipID), nil, true];
|
||||
}];
|
||||
|
Reference in New Issue
Block a user