Added an error message when the ab extension is missing

This commit is contained in:
ulteq 2015-04-13 12:56:18 +02:00
parent c8aa3032fe
commit 63760acc4f
2 changed files with 13 additions and 1 deletions

View File

@ -2,6 +2,8 @@
#include "initKeybinds.sqf" #include "initKeybinds.sqf"
GVAR(currentbulletID) = -1;
GVAR(bulletDatabase) = []; GVAR(bulletDatabase) = [];
GVAR(bulletDatabaseStartTime) = []; GVAR(bulletDatabaseStartTime) = [];
GVAR(bulletDatabaseSpeed) = []; GVAR(bulletDatabaseSpeed) = [];
@ -31,4 +33,13 @@ GVAR(AtmosphericDensitySimulationEnabled) = true;
GVAR(currentGrid) = 0; GVAR(currentGrid) = 0;
GVAR(INIT_MESSAGE_ENABLED) = false; 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); [] call FUNC(initializeTerrainExtension);

View File

@ -12,7 +12,8 @@
*/ */
#include "script_component.hpp" #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"]; private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"];