Updated startcombattimer variable

This commit is contained in:
Florian Kinder
2014-02-20 18:01:16 +01:00
parent 6c0581bda9
commit bf13a783d9
5 changed files with 50 additions and 50 deletions

View File

@@ -27,22 +27,22 @@ while {(alive _projectile) && !(isNull _projectile) && _callCount < 85;} do {
{
_nearVehicle = _x;
_listNear = _listNear - [_x];
//diag_log ("3");
if (isPlayer _nearVehicle) then {
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
if ((alive _nearVehicle) and _isInCombat == 0) then {
_nearVehicle setVariable["startcombattimer", 1, true];
_nearVehicle setVariable["startcombattimer", 1];
diag_log("Now in Combat (Player): " + name _unit);
};
};
if (_nearVehicle isKindOf "AllVehicles") then {
{
_isInCombat = _x getVariable["startcombattimer",0];
if (isPlayer _x and _isInCombat == 0 and alive _x) then {
_x setVariable["startcombattimer", 1, true];
_x setVariable["startcombattimer", 1];
diag_log("Now in Combat (Crew): " + name _x);
};
} forEach (crew _nearVehicle);