Add new combat function

This commit is contained in:
A Man
2022-05-05 17:58:09 +02:00
parent 38f7e1d1c3
commit effb78fe13
5 changed files with 17 additions and 16 deletions

View File

@@ -14,11 +14,6 @@ _timer150 = diag_ticktime;
player setVariable ["temperature",dayz_temperatur,true];
player setVariable["friendlies",DZE_Friends,true];
//[0,0] call player_humanityChange;
//player addMagazine "Hatchet_swing";
//player addWeapon "MeleeHatchet";
while {1 == 1} do {
//_start = diag_tickTime;
@@ -281,8 +276,7 @@ while {1 == 1} do {
_startcombattimer = player getVariable["startcombattimer", 0];
if (_startcombattimer == 1) then { //Do not use _PlayerNearby it makes building impossible, this is handled in player_onPause.sqf just fine
player setVariable["combattimeout", diag_tickTime + 30, false];
if !(player getVariable["inCombat",false]) then {player setVariable["inCombat",true,true];};
[player,true] call fnc_setCombat;
player setVariable["startcombattimer", 0, false];
};