2015-04-05 19:08:55 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
#include "initKeybinds.sqf"
|
|
|
|
|
2015-04-13 10:56:18 +00:00
|
|
|
GVAR(currentbulletID) = -1;
|
|
|
|
|
2015-04-05 19:08:55 +00:00
|
|
|
GVAR(Protractor) = false;
|
2015-05-21 16:42:44 +00:00
|
|
|
GVAR(ProtractorStart) = ACE_time;
|
2015-08-16 17:49:47 +00:00
|
|
|
GVAR(allBullets) = [];
|
2015-04-11 16:18:38 +00:00
|
|
|
GVAR(currentGrid) = 0;
|
2015-04-05 19:08:55 +00:00
|
|
|
|
2015-04-25 08:38:28 +00:00
|
|
|
GVAR(extensionAvailable) = true;
|
2015-05-01 08:25:59 +00:00
|
|
|
/* @TODO: Remove this until versioning is in sync with cmake/build versioning
|
2015-04-16 11:42:28 +00:00
|
|
|
GVAR(extensionVersion) = ("ace_advanced_ballistics" callExtension "version");
|
|
|
|
GVAR(extensionAvailable) = (GVAR(extensionVersion) == EXTENSION_REQUIRED_VERSION);
|
2015-04-13 10:56:18 +00:00
|
|
|
if (!GVAR(extensionAvailable)) exitWith {
|
2015-04-16 11:42:28 +00:00
|
|
|
if (GVAR(extensionVersion) == "") then {
|
2015-04-13 10:56:18 +00:00
|
|
|
diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is missing";
|
|
|
|
} else {
|
|
|
|
diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is incompatible";
|
|
|
|
};
|
|
|
|
};
|
2015-04-22 00:04:16 +00:00
|
|
|
*/
|
2015-04-05 19:08:55 +00:00
|
|
|
[] call FUNC(initializeTerrainExtension);
|
2016-02-06 21:48:26 +00:00
|
|
|
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
|
|
|
|
["SettingsInitialized", {
|
|
|
|
//If not enabled, dont't add PFEH
|
|
|
|
if (!GVAR(enabled)) exitWith {};
|
|
|
|
|
|
|
|
// Register fire event handler
|
|
|
|
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
|
|
|
|
["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
|
|
|
|
|
|
|
|
}] call EFUNC(common,addEventHandler);
|
2016-02-19 03:45:00 +00:00
|
|
|
|
|
|
|
#ifdef DEBUG_MODE_FULL
|
|
|
|
call FUNC(diagnoseWeapons);
|
|
|
|
#endif
|