Cookoff - Fix box cookoff (#8542)

* Cookoff - fix box cookoff

* rename
This commit is contained in:
PabstMirror 2021-10-17 15:01:41 -05:00 committed by GitHub
parent 88eb4c6cd3
commit 525f3c5ce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 11 deletions

View File

@ -1,5 +1,5 @@
PREP(handleDamage); PREP(handleDamageBox);
PREP(engineFire); PREP(engineFire);
PREP(cookOff); PREP(cookOff);
PREP(smoke); PREP(smoke);

View File

@ -25,7 +25,7 @@ GVAR(cacheTankDuplicates) = call CBA_fnc_createNamespace;
["ReammoBox_F", "init", { ["ReammoBox_F", "init", {
(_this select 0) addEventHandler ["HandleDamage", { (_this select 0) addEventHandler ["HandleDamage", {
if ((_this select 0) getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmobox)]) then { 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; }, nil, nil, true] call CBA_fnc_addClassEventHandler;

View File

@ -1,7 +1,7 @@
#include "script_component.hpp" #include "script_component.hpp"
/* /*
* Author: KoffeinFlummi, commy2 * Author: KoffeinFlummi, commy2
* Handles all incoming damage for tanks (including wheeled APCs). * Handles all incoming damage for boxi
* *
* Arguments: * Arguments:
* HandleDamage EH <ARRAY> * HandleDamage EH <ARRAY>
@ -10,7 +10,7 @@
* Damage to be inflicted. <NUMBER> * Damage to be inflicted. <NUMBER>
* *
* Example: * Example:
* _this call ace_cookoff_fnc_handleDamage * _this call ace_cookoff_fnc_handleDamageBox
* *
* Public: No * Public: No
*/ */
@ -23,13 +23,6 @@ if (damage _vehicle >= 1) exitWith {};
// If cookoff is disabled exit // If cookoff is disabled exit
if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith {}; 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 // get hitpoint name
private _hitpoint = "#structural"; private _hitpoint = "#structural";