From ea783b6c7a04b31574bd1fd1b7cd0a58ae4317be Mon Sep 17 00:00:00 2001 From: Pepijn Holster Date: Tue, 12 Sep 2023 20:04:06 +0200 Subject: [PATCH] Advanced Ballistics - Fix `_mapSize` sometimes 0 by using engine command (#9394) Update fnc_initializeTerrainExtension.sqf --- .../functions/fnc_initializeTerrainExtension.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 8ff8052745..256493381d 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -19,7 +19,7 @@ if (!hasInterface) exitWith {}; if (!GVAR(enabled)) exitWith {}; private _initStartTime = diag_tickTime; -private _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); +private _mapSize = worldSize; if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith { INFO_1("Terrain already initialized [world: %1]", worldName);