Skip to content

Commit

Permalink
mapsize workarounds for old maps
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisum committed Jan 22, 2016
1 parent 2799fff commit cfed778
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions helpers/spawnBluforHQ.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,25 @@ testSpawnPositions = {
_distance = _this select 2;
_result = [2,nil,nil];
_mapsizeknown = false;


// check for arma3 map size
_mapSize = worldSize;
if (_mapSize < 2000) then {
_mapSizeKnown = false; diag_log format ["Calculating Spawnposis: Map Size < 2000 or unknown."];

// check for utes/chernarus
_mapSize = getNumber (configFile>>"CfgWorlds">>worldName>>"grid">>"zoom1">>"stepX")*(parseNumber mapGridPosition [0,0,0]);

// check for OA terrains / takistan
if (_mapSize < 2000) then {
_mapSize = getNumber (configFile>>"CfgWorlds">>worldName>>"grid">>"offsety");
};

// now im out of functions to get map size correctly
if (_mapSize < 2000) then {
_mapSizeKnown = false; diag_log format ["Calculating Spawnposis: Map Size < 2000 or unknown."];
};


} else {_mapSizeKnown = true;};


Expand Down

0 comments on commit cfed778

Please sign in to comment.