diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index b2f73b4c81..783a5be569 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -2,6 +2,8 @@ #include "initKeybinds.sqf" +GVAR(currentbulletID) = -1; + GVAR(bulletDatabase) = []; GVAR(bulletDatabaseStartTime) = []; GVAR(bulletDatabaseSpeed) = []; @@ -31,4 +33,13 @@ GVAR(AtmosphericDensitySimulationEnabled) = true; GVAR(currentGrid) = 0; GVAR(INIT_MESSAGE_ENABLED) = false; +GVAR(extensionAvailable) = "ace_advanced_ballistics" callExtension "version" == "1.0"; +if (!GVAR(extensionAvailable)) exitWith { + if ("ace_advanced_ballistics" callExtension "version" == "") then { + diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is missing"; + } else { + diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is incompatible"; + }; +}; + [] call FUNC(initializeTerrainExtension); diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 5403cc5e50..6791d26350 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -12,7 +12,8 @@ */ #include "script_component.hpp" -if ("ace_advanced_ballistics" callExtension "version" != "1.0") exitWith {}; +if (!hasInterface) exitWith {}; +if (!GVAR(extensionAvailable)) exitWith {}; private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"];