mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cookoff - Tweaked effects cleanup to add Deleted EH globally and trigger a local cleanup event (#9000)
This commit is contained in:
parent
f846b9ab82
commit
8e06f2ec6b
@ -20,7 +20,7 @@
|
|||||||
private _deletedEH = _vehicle addEventHandler ["Deleted", {
|
private _deletedEH = _vehicle addEventHandler ["Deleted", {
|
||||||
params ["_vehicle"];
|
params ["_vehicle"];
|
||||||
|
|
||||||
[QGVAR(cleanupEffects), [_vehicle]] call CBA_fnc_globalEvent;
|
[QGVAR(cleanupEffects), [_vehicle]] call CBA_fnc_localEvent;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
_vehicle setVariable [QGVAR(deletedEH), _deletedEH];
|
_vehicle setVariable [QGVAR(deletedEH), _deletedEH];
|
||||||
|
@ -30,7 +30,7 @@ TRACE_9("cooking off",_vehicle,_intensity,_instigator,_smokeDelayEnabled,_ammoDe
|
|||||||
if (_vehicle getVariable [QGVAR(isCookingOff), false]) exitWith {};
|
if (_vehicle getVariable [QGVAR(isCookingOff), false]) exitWith {};
|
||||||
_vehicle setVariable [QGVAR(isCookingOff), true, true];
|
_vehicle setVariable [QGVAR(isCookingOff), true, true];
|
||||||
|
|
||||||
[QGVAR(addCleanupHandlers), [_vehicle]] call CBA_fnc_serverEvent;
|
[QGVAR(addCleanupHandlers), [_vehicle]] call CBA_fnc_globalEvent;
|
||||||
|
|
||||||
// limit maximum value of intensity to prevent very long cook-off times
|
// limit maximum value of intensity to prevent very long cook-off times
|
||||||
_intensity = _intensity min _maxIntensity;
|
_intensity = _intensity min _maxIntensity;
|
||||||
|
Loading…
Reference in New Issue
Block a user