diff --git a/addons/cookoff/functions/fnc_handleDamageBox.sqf b/addons/cookoff/functions/fnc_handleDamageBox.sqf index b7ac629613..bf52632fe1 100644 --- a/addons/cookoff/functions/fnc_handleDamageBox.sqf +++ b/addons/cookoff/functions/fnc_handleDamageBox.sqf @@ -29,8 +29,10 @@ if !(_box getVariable [QGVAR(enableAmmoCookoff), true]) exitWith {}; if !(_hitPoint == "" && {_damage > 0.5}) exitWith {}; // "" means structural damage -// Catch fire when hit by an explosive round -if (IS_EXPLOSIVE_AMMO(_ammo)) then { +private _ammoConfig = _ammo call CBA_fnc_getObjectConfig; + +// Catch fire when hit by an explosive or incendiary round +if ((getNumber (_ammoConfig >> "explosive") >= 0.5) || {getNumber (_ammoConfig >> QEGVAR(vehicle_damage,incendiary)) > random 1}) then { [QGVAR(cookOffBox), [_box, _source, _instigator]] call CBA_fnc_serverEvent; } else { // There is a small chance of cooking a box off if it's shot by tracer ammo diff --git a/addons/cookoff/script_component.hpp b/addons/cookoff/script_component.hpp index 7c812cd84b..bf8fd62dd5 100644 --- a/addons/cookoff/script_component.hpp +++ b/addons/cookoff/script_component.hpp @@ -16,10 +16,8 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define IS_EXPLOSIVE_AMMO(ammo) (getNumber (ammo call CBA_fnc_getObjectConfig >> "explosive") > 0.5) - // Stages of cookoff in order (in seconds) -// Should be no un-synced randomness in these as the effects must be ran on each client +// Should be no un-synced randomness in these as the effects must be run on each client #define SMOKE_DELAY 10.5 #define DETONATION_DELAY 3 #define COOKOFF_TIME 14 // Cook off time should be 20s at most due to length of sound files