Do not set player in combat for throwing flare or chemlight

Vanilla commit:

848b03042d
This commit is contained in:
ebayShopper
2017-12-04 14:59:21 -05:00
parent b39a15cdd7
commit da7ea3bb4e
2 changed files with 12 additions and 9 deletions

View File

@@ -21,14 +21,16 @@ private ["_handled"];
// Both the firer and those nearby (<=8m) go into "combat" to prevent ALT-F4
//diag_log ("DEBUG: AMMO TYPE: " +str(_ammo));
_firer setVariable["startcombattimer", 1];
if !(_firer getVariable["inCombat",false]) then {
_firer setVariable["inCombat",true,true];
};
if (_distance <= 8) then {
_unit setVariable["startcombattimer", 1];
if !(_unit getVariable["inCombat",false]) then {
_unit setVariable["inCombat",true,true];
if !(_ammo isKindOf "LitObject") then {
_firer setVariable["startcombattimer", 1];
if !(_firer getVariable["inCombat",false]) then {
_firer setVariable["inCombat",true,true];
};
if (_distance <= 8) then {
_unit setVariable["startcombattimer", 1];
if !(_unit getVariable["inCombat",false]) then {
_unit setVariable["inCombat",true,true];
};
};
};