From 525f3c5ce3dffad4ed75f835af8a57d88c1ebc17 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 17 Oct 2021 15:01:41 -0500 Subject: [PATCH] Cookoff - Fix box cookoff (#8542) * Cookoff - fix box cookoff * rename --- addons/cookoff/XEH_PREP.hpp | 2 +- addons/cookoff/XEH_postInit.sqf | 2 +- .../{fnc_handleDamage.sqf => fnc_handleDamageBox.sqf} | 11 ++--------- 3 files changed, 4 insertions(+), 11 deletions(-) rename addons/cookoff/functions/{fnc_handleDamage.sqf => fnc_handleDamageBox.sqf} (82%) diff --git a/addons/cookoff/XEH_PREP.hpp b/addons/cookoff/XEH_PREP.hpp index 728ebc8578..b9708b7c58 100644 --- a/addons/cookoff/XEH_PREP.hpp +++ b/addons/cookoff/XEH_PREP.hpp @@ -1,5 +1,5 @@ -PREP(handleDamage); +PREP(handleDamageBox); PREP(engineFire); PREP(cookOff); PREP(smoke); diff --git a/addons/cookoff/XEH_postInit.sqf b/addons/cookoff/XEH_postInit.sqf index ab8619570d..889e252d90 100644 --- a/addons/cookoff/XEH_postInit.sqf +++ b/addons/cookoff/XEH_postInit.sqf @@ -25,7 +25,7 @@ GVAR(cacheTankDuplicates) = call CBA_fnc_createNamespace; ["ReammoBox_F", "init", { (_this select 0) addEventHandler ["HandleDamage", { if ((_this select 0) getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmobox)]) then { - _this call FUNC(handleDamage); + _this call FUNC(handleDamageBox); }; }]; }, nil, nil, true] call CBA_fnc_addClassEventHandler; diff --git a/addons/cookoff/functions/fnc_handleDamage.sqf b/addons/cookoff/functions/fnc_handleDamageBox.sqf similarity index 82% rename from addons/cookoff/functions/fnc_handleDamage.sqf rename to addons/cookoff/functions/fnc_handleDamageBox.sqf index de29feb860..2bbb6f4b6b 100644 --- a/addons/cookoff/functions/fnc_handleDamage.sqf +++ b/addons/cookoff/functions/fnc_handleDamageBox.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" /* * Author: KoffeinFlummi, commy2 - * Handles all incoming damage for tanks (including wheeled APCs). + * Handles all incoming damage for boxi * * Arguments: * HandleDamage EH @@ -10,7 +10,7 @@ * Damage to be inflicted. * * Example: - * _this call ace_cookoff_fnc_handleDamage + * _this call ace_cookoff_fnc_handleDamageBox * * Public: No */ @@ -23,13 +23,6 @@ if (damage _vehicle >= 1) exitWith {}; // If cookoff is disabled exit if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith {}; -// Check for players and exit if none found and the enable for players only setting is true -if ( - _vehicle getVariable [QGVAR(enable), GVAR(enable)] isEqualTo 1 - && {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} == -1} - && {_simulationType isNotEqualTo "box"} -) exitWith {}; - // get hitpoint name private _hitpoint = "#structural";