Update combat handling

- Remove startcombattimer variable
- Add combatNoTimeout variable to handle a combat without a time limit
This commit is contained in:
A Man
2022-06-26 15:57:15 +02:00
parent 36f5c8707a
commit b6c7364c56
11 changed files with 122 additions and 137 deletions

View File

@@ -1,10 +1,10 @@
local _object = _this select 0;
local _setCombatOverTime = _this select 1;
local _setCombatOverTime = _this select 1; // if true, combat has a time limit
if (_setCombatOverTime) then {
_object setVariable["combattimeout", diag_tickTime + DZE_CombatTimer];
if (_setCombatOverTime) then {
_object setVariable["combatTimeout", diag_tickTime + DZE_CombatTimer]; // Combat time limited based on DZE_CombatTimer
} else {
_object setVariable["startcombattimer", 1];
_object setVariable["combatNoTimeout", 1]; // Endless combat until the combat variable will be resetted
};
if !(_object getVariable ["inCombat",false]) then {