diff --git a/pre-packaged pbo/a3_exile_occupation.pbo b/pre-packaged pbo/a3_exile_occupation.pbo index 50c4388..9686ff2 100644 Binary files a/pre-packaged pbo/a3_exile_occupation.pbo and b/pre-packaged pbo/a3_exile_occupation.pbo differ diff --git a/source/a3_exile_occupation/changeLog.txt b/source/a3_exile_occupation/changeLog.txt index 1cc773c..263910f 100644 --- a/source/a3_exile_occupation/changeLog.txt +++ b/source/a3_exile_occupation/changeLog.txt @@ -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) ================================================================================= diff --git a/source/a3_exile_occupation/config.cpp b/source/a3_exile_occupation/config.cpp index 86e8dd1..b05e3a8 100644 --- a/source/a3_exile_occupation/config.cpp +++ b/source/a3_exile_occupation/config.cpp @@ -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"}; }; diff --git a/source/a3_exile_occupation/scripts/functions/fnc_findsafePos.sqf b/source/a3_exile_occupation/scripts/functions/fnc_findsafePos.sqf index 5fec08b..9672a04 100644 --- a/source/a3_exile_occupation/scripts/functions/fnc_findsafePos.sqf +++ b/source/a3_exile_occupation/scripts/functions/fnc_findsafePos.sqf @@ -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 diff --git a/source/a3_exile_occupation/scripts/functions/fnc_isSafePos.sqf b/source/a3_exile_occupation/scripts/functions/fnc_isSafePos.sqf index 9af776c..3657100 100644 --- a/source/a3_exile_occupation/scripts/functions/fnc_isSafePos.sqf +++ b/source/a3_exile_occupation/scripts/functions/fnc_isSafePos.sqf @@ -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 \ No newline at end of file diff --git a/source/a3_exile_occupation/scripts/occupationRandomSpawn.sqf b/source/a3_exile_occupation/scripts/occupationRandomSpawn.sqf index dbf51b7..664ba38 100644 --- a/source/a3_exile_occupation/scripts/occupationRandomSpawn.sqf +++ b/source/a3_exile_occupation/scripts/occupationRandomSpawn.sqf @@ -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 diff --git a/source/a3_exile_occupation/scripts/occupationVehicle.sqf b/source/a3_exile_occupation/scripts/occupationVehicle.sqf index 2fa20d1..49cf04d 100644 --- a/source/a3_exile_occupation/scripts/occupationVehicle.sqf +++ b/source/a3_exile_occupation/scripts/occupationVehicle.sqf @@ -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];