Cookoff - Fix enable setting (#8649)

This commit is contained in:
Filip Maciejewski 2021-10-30 00:20:02 +02:00 committed by GitHub
parent 0ddb7185c0
commit 58f43288ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,8 @@ params ["_vehicle", "_intensity", ["_instigator", objNull], ["_smokeDelayEnabled
if (GVAR(enable) == 0) exitWith {};
if !(GVAR(enableFire)) exitWith {};
if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith {};
if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] isEqualTo 2 && {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} == -1}) exitWith {};
// exit if cook-off enabled only for players and no players in vehicle crew found
if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] isEqualTo 1 && {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} == -1}) exitWith {};
TRACE_8("cooking off",_vehicle,_intensity,_instigator,_smokeDelayEnabled,_ammoDetonationChance,_detonateAfterCookoff,_fireSource,_canRing);