Minor code change in the extension detection logic

This commit is contained in:
ulteq 2015-04-16 13:42:28 +02:00
parent aa724129d1
commit 15240ac87c
2 changed files with 5 additions and 2 deletions

View File

@ -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";

View File

@ -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"