diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index 783a5be569..41615696ac 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -33,9 +33,10 @@ GVAR(AtmosphericDensitySimulationEnabled) = true; GVAR(currentGrid) = 0; GVAR(INIT_MESSAGE_ENABLED) = false; -GVAR(extensionAvailable) = "ace_advanced_ballistics" callExtension "version" == "1.0"; +GVAR(extensionVersion) = ("ace_advanced_ballistics" callExtension "version"); +GVAR(extensionAvailable) = (GVAR(extensionVersion) == EXTENSION_REQUIRED_VERSION); if (!GVAR(extensionAvailable)) exitWith { - if ("ace_advanced_ballistics" callExtension "version" == "") then { + if (GVAR(extensionVersion) == "") then { diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is missing"; } else { diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is incompatible"; diff --git a/addons/advanced_ballistics/script_component.hpp b/addons/advanced_ballistics/script_component.hpp index 273afa2f49..70c2f47990 100644 --- a/addons/advanced_ballistics/script_component.hpp +++ b/addons/advanced_ballistics/script_component.hpp @@ -24,3 +24,5 @@ #define STD_AIR_DENSITY_ICAO 1.22498 #define STD_AIR_DENSITY_ASM 1.20885 #define GET_TEMPERATURE_AT_HEIGHT(h) (EGVAR(weather,currentTemperature) - 0.0065 * (h)) + +#define EXTENSION_REQUIRED_VERSION "1.0"