Fix Special Mission spawning and fix AI distance check

This commit is contained in:
Ryan Davies
2018-03-19 09:18:32 +13:00
parent 6d45755efc
commit b594deadd7
2 changed files with 6 additions and 3 deletions

View File

@ -84,8 +84,8 @@ if (diag_fps >= DMS_MinServerFPS && {_playerCount >= DMS_MinPlayerCount}) then
if
(
(_playerCount > _minPlayers) &&
{_playerCount < _maxPlayers} &&
(_playerCount >= _minPlayers) &&
{_playerCount <= _maxPlayers} &&
{_maxTimesPerRestart > _timesSpawned} &&
{(_time - (missionNamespace getVariable format["DMS_SpecialMissionLastSpawn_%1",_mission])) > _timeBetween}
) then

View File

@ -33,7 +33,10 @@ try
}
else
{
_x setVariable ["DMS_LastAIDistanceCheck",time];
if ((time - _lastDistanceCheckTime)>=DMS_AIDistanceCheckFrequency) then
{
_x setVariable ["DMS_LastAIDistanceCheck",time];
};
throw _x;
};
} forEach (_this call DMS_fnc_GetAllUnits); // DMS_fnc_GetAllUnits will return living AI unit objects only, so we only need to check for runaway units