mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 10:26:28 +03:00
Fix combat logging
In the initialize section of the fsm r_player_unconscious and r_player_timeout return their default values (false and 0). Also, the Vanilla server-side combat check doesn't appear to work, or it doesn't work with the antihack disabled (I haven't tested with it enabled). New variable inCombat is set more quickly than the combatTimeout variable
This commit is contained in:
@@ -34,6 +34,7 @@ while {(alive _projectile) && !(isNull _projectile) && (_callCount < 85)} do {
|
||||
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
|
||||
if ((alive _nearVehicle) and _isInCombat == 0) then {
|
||||
_nearVehicle setVariable["startcombattimer", 1];
|
||||
_nearVehicle setVariable["inCombat", 1, true];
|
||||
diag_log("Now in Combat (Player): " + name _unit);
|
||||
};
|
||||
};
|
||||
@@ -43,6 +44,7 @@ while {(alive _projectile) && !(isNull _projectile) && (_callCount < 85)} do {
|
||||
_isInCombat = _x getVariable["startcombattimer",0];
|
||||
if (isPlayer _x and _isInCombat == 0 and alive _x) then {
|
||||
_x setVariable["startcombattimer", 1];
|
||||
_x setVariable["inCombat", 1, true];
|
||||
diag_log("Now in Combat (Crew): " + name _x);
|
||||
};
|
||||
} forEach (crew _nearVehicle);
|
||||
|
||||
Reference in New Issue
Block a user