Change inCombat to bool instead of number

When a variable is only going to be 0 or 1 it makes more sense to use a
bool.

Also avoided unnecessary network broadcasts of inCombat from e446603
This commit is contained in:
ebaydayz
2016-10-01 13:07:59 -04:00
parent 76273d06cd
commit 0a17804e36
11 changed files with 31 additions and 24 deletions

View File

@@ -7,8 +7,8 @@ sched_playerActions = {
call fnc_usec_upgradeActions;
//combat check
if ((player getVariable ["combattimeout",0] < diag_tickTime) && {player getVariable ["inCombat", 0] > 0}) then {
player setVariable ["inCombat", 0, true];
if ((player getVariable ["combattimeout",0] < diag_tickTime) && {player getVariable ["inCombat",false]}) then {
player setVariable ["inCombat", false, true];
};
objNull