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;
|
2016-03-02 10:01:39 +00:00
|
|
|
GVAR(ProtractorStart) = CBA_missionTime;
|
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
|
|
|
*/
|
2016-02-06 21:48:26 +00:00
|
|
|
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
|
2016-05-24 13:13:11 +00:00
|
|
|
["ace_settingsInitialized", {
|
2016-02-06 21:48:26 +00:00
|
|
|
//If not enabled, dont't add PFEH
|
|
|
|
if (!GVAR(enabled)) exitWith {};
|
|
|
|
|
2016-03-24 17:23:48 +00:00
|
|
|
//Run the terrain processor
|
|
|
|
[] call FUNC(initializeTerrainExtension);
|
|
|
|
|
2016-02-06 21:48:26 +00:00
|
|
|
// Register fire event handler
|
2016-05-24 13:13:11 +00:00
|
|
|
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
|
|
|
["ace_firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
2016-02-06 21:48:26 +00:00
|
|
|
|
2016-03-24 16:53:55 +00:00
|
|
|
//Add warnings for missing compat PBOs (only if AB is on)
|
|
|
|
{
|
|
|
|
_x params ["_modPBO", "_compatPBO"];
|
|
|
|
if ((isClass (configFile >> "CfgPatches" >> _modPBO)) && {!isClass (configFile >> "CfgPatches" >> _compatPBO)}) then {
|
|
|
|
ACE_LOGWARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO);
|
|
|
|
};
|
|
|
|
} forEach [
|
2016-03-29 15:00:54 +00:00
|
|
|
["RH_acc","ace_compat_rh_acc"],
|
|
|
|
["RH_de_cfg","ace_compat_rh_de"],
|
|
|
|
["RH_m4_cfg","ace_compat_rh_m4"],
|
|
|
|
["RH_PDW","ace_compat_rh_pdw"],
|
|
|
|
["RKSL_PMII","ace_compat_rksl_pm_ii"],
|
|
|
|
["iansky_opt","ace_compat_sma3_iansky"],
|
|
|
|
["R3F_Armes","ace_compat_r3f"]
|
2016-03-24 16:53:55 +00:00
|
|
|
];
|
2016-05-22 15:29:05 +00:00
|
|
|
}] call CBA_fnc_addEventHandler;
|
2016-02-19 03:45:00 +00:00
|
|
|
|
|
|
|
#ifdef DEBUG_MODE_FULL
|
|
|
|
call FUNC(diagnoseWeapons);
|
|
|
|
#endif
|