Cook off - Fix ammo box cook off when setting is Players only (#8066)

* Fix ammo box cook off when setting is Players only

* Update addons/cookoff/functions/fnc_handleDamage.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
Dystopian 2021-02-27 21:50:09 +04:00 committed by GitHub
parent 4d71607e81
commit 98e74ab3d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,11 @@ if (damage _vehicle >= 1) 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}) exitWith {};
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";