mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 09:10:27 +03:00
Update combat handling
- Remove startcombattimer variable - Add combatNoTimeout variable to handle a combat without a time limit
This commit is contained in:
@@ -260,12 +260,6 @@ while {1 == 1} do {
|
||||
pickupInit = true;
|
||||
};
|
||||
|
||||
_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,true] call fnc_setCombat;
|
||||
player setVariable["startcombattimer", 0, false];
|
||||
};
|
||||
|
||||
uiSleep 2;
|
||||
|
||||
_myPos = player getVariable["lastPos",[]];
|
||||
|
||||
@@ -9,7 +9,7 @@ sched_playerActions = {
|
||||
};
|
||||
|
||||
//combat check
|
||||
if ((player getVariable ["combattimeout",0] < diag_tickTime) && {player getVariable ["inCombat",false]} && {player getVariable["startcombattimer", 0] == 0}) then {
|
||||
if ((player getVariable ["combatTimeout",0] < diag_tickTime) && {player getVariable ["inCombat",false]} && {player getVariable["combatNoTimeout", 0] == 0}) then {
|
||||
player setVariable ["inCombat", false, true];
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ sched_throwable = {
|
||||
sched_throwable_prevmuzz = currentMuzzle player;
|
||||
sched_throwable_time = diag_tickTime+11;
|
||||
};
|
||||
if (((player getVariable["combattimeout", diag_tickTime])-diag_tickTime)>27) then {
|
||||
if (((player getVariable["combatTimeout", diag_tickTime])-diag_tickTime)>27) then {
|
||||
sched_throwable_time = diag_tickTime+21;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user