V62 Tweaks

This commit is contained in:
second_coming 2016-08-25 14:12:05 +01:00
parent b40614a5d3
commit 9b4f003f07
7 changed files with 10 additions and 14 deletions

View File

@ -1,3 +1,8 @@
=================================================================================
V62 (25-08-2016)
=================================================================================
Couple of tweaks to the random spawn positioning to fix a performance issue
=================================================================================
V61 (24-08-2016)
=================================================================================

View File

@ -4,7 +4,7 @@ class CfgPatches
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
a3_exile_occupation_version = "V61 (24-08-2016)";
a3_exile_occupation_version = "V62 (25-08-2016)";
requiredAddons[] = {"a3_dms"};
author[]= {"second_coming"};
};

View File

@ -47,7 +47,6 @@ while{!_validspot} do
if (isNil "_nearRoads" OR count _nearRoads == 0) then
{
_validspot = false;
diag_log format["BIS_fnc_findSafePos no roads found near position %1",_position];
}
else
{
@ -57,12 +56,7 @@ while{!_validspot} do
if(!_isEmpty) then
{
_validspot = false;
}
else
{
diag_log format["BIS_fnc_findSafePos checking road found at %1",_position];
};
};
};
};
@ -71,7 +65,6 @@ while{!_validspot} do
if(!_waterSpawn && _isOverWater) then
{
_validspot = false;
diag_log format["BIS_fnc_findSafePos none waterspawn over water %1",_position];
};
if(_validspot) then

View File

@ -19,7 +19,7 @@ private _validspot = true;
if(_distance < _blacklistRadius) then
{
_validspot = false;
diag_log format["%1 is %2m from blacklisted position %3 (blacklisted)",_position,_distance,_blacklistPos];
diag_log format["[OCCUPATION]:: %1 is %2m from blacklisted position %3 (blacklisted)",_position,_distance,_blacklistPos];
};
};
}forEach SC_blackListedAreas;
@ -48,7 +48,6 @@ if(_validspot) then
if ((_markerPos distance2D _position) < 350) exitWith { _validspot = false; };
}
forEach allMapMarkers;
};
_validspot

View File

@ -282,12 +282,12 @@ _livePlayers call BIS_fnc_arrayShuffle;
// Find a safe position to spawn
_suitableLocation = false;
_attempts = 1;
while{!_suitableLocation && _attempts < 50} do
while{!_suitableLocation && _attempts < 5} do
{
_spawnLocation = [_playersPosition,250,450,15,0,20,0] call BIS_fnc_findSafePos;
_suitableLocation = [ _spawnLocation ] call SC_fnc_isSafePosRandom;
_attempts = _attempts + 1;
sleep 0.1;
sleep 1;
};
if(!_suitableLocation) then

View File

@ -73,7 +73,6 @@ if(_vehiclesToSpawn > 0) then
if(count _locationArray > 0) then
{
_randomLocation = _locationArray call BIS_fnc_selectRandom;
diag_log format["_randomLocation: %1",_randomLocation];
_spawnLocation = _randomLocation select 0;
_radius = _randomLocation select 1;
_locationArray = _locationArray - [_randomLocation];