More Permissive Combat Checks

This commit puts the conditions in which a player is put into combat
more in line with 1.0.5.1. Putting the player in combat for having
another player nearby will ruin building for players that are part of a
group. Putting the player into combat if zombies are nearby would make
building way too frustrating (especially if building on an elevated or
enclosed area where zombies are not a threat) and will attack the player
if not dealt with anyway.
This commit is contained in:
icomrade
2016-07-25 13:00:34 -04:00
parent 3a203b2720
commit 97a03c84d0

View File

@@ -359,15 +359,15 @@ while {1 == 1} do {
};
_startcombattimer = player getVariable["startcombattimer", 0];
if (_startcombattimer == 1 || _PlayerNearby) then {
if (_startcombattimer == 1) then { //if (_startcombattimer == 1 || _PlayerNearby) then { // do not use _PlayerNearby it makes building impossible, tthis is handled in player_onPause.sqf just fine
player setVariable["combattimeout", diag_tickTime + 30, false];
player setVariable["startcombattimer", 0, false];
} else {
if (_ZedsNearby && !_isPZombie) then {
}; /* else {
if (_ZedsNearby && !_isPZombie) then { //this makes building a nightmare, this is handled in player_onPause.sqf just fine
player setVariable["combattimeout", diag_tickTime + 10, false];
player setVariable["startcombattimer", 0, false];
};
};
}; */
//setGroupIconsVisible [false,false];
//clearGroupIcons group player;