-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RF Compat - Extinguish vehicle cook-offs and burning units (#10604)
* Extinguish cookoffs and burning units * Introduce new variable to interrupt cook-off Avoids needing to toggle the enableAmmoCookoff variable * Moved to RF compat
- Loading branch information
Showing
4 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Extended_PostInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "script_component.hpp" | ||
|
||
// Compat for ace_cookoff: Extinguish cook-off | ||
if (["ace_cookoff"] call EFUNC(common,isModLoaded)) then { | ||
[missionNamespace, "lxRF_water_droppedOnVehicle", { | ||
params ["_vehicle"]; | ||
|
||
if (_vehicle getVariable [QEGVAR(cookoff,isAmmoDetonating), false]) then { | ||
_vehicle setVariable [QEGVAR(cookoff,interruptAmmoCookoff), true, true]; | ||
}; | ||
}] call BIS_fnc_addScriptedEventHandler; | ||
}; | ||
|
||
// Compat for ace_fire: Extinguish burning units | ||
if (["ace_fire"] call EFUNC(common,isModLoaded)) then { | ||
["CBA_settingsInitialized", { | ||
if (!EGVAR(fire,enabled)) exitWith {}; | ||
|
||
[missionNamespace, "lxRF_water_droppedOnUnit", { | ||
params ["_unit"]; | ||
|
||
if (_unit call EFUNC(fire,isBurning)) then { | ||
_unit setVariable [QEGVAR(fire,intensity), nil, true]; | ||
}; | ||
}] call BIS_fnc_addScriptedEventHandler; | ||
}] call CBA_fnc_addEventHandler; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,6 @@ class CfgPatches { | |
}; | ||
}; | ||
|
||
#include "CfgEventHandlers.hpp" | ||
#include "CfgWeapons.hpp" | ||
#include "CfgVehicles.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters