Change FCS indentation to 4 spaces

This commit is contained in:
KoffeinFlummi 2015-01-14 21:07:41 +01:00
parent 66b33590d5
commit d567785518
11 changed files with 772 additions and 772 deletions

View File

@ -1,19 +1,19 @@
class Extended_PreInit_EventHandlers { class Extended_PreInit_EventHandlers {
class ADDON { class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit) ); init = QUOTE(call COMPILE_FILE(XEH_preInit) );
}; };
}; };
class Extended_PostInit_EventHandlers { class Extended_PostInit_EventHandlers {
class ADDON { class ADDON {
clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit) ); clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit) );
}; };
}; };
class Extended_Init_EventHandlers { class Extended_Init_EventHandlers {
class AllVehicles { class AllVehicles {
class ADDON { class ADDON {
clientInit = QUOTE(_this call FUNC(vehicleInit)); clientInit = QUOTE(_this call FUNC(vehicleInit));
};
}; };
};
}; };

View File

@ -1,254 +1,254 @@
#define MACRO_RANGEFINDER \ #define MACRO_RANGEFINDER \
class CA_Distance; \ class CA_Distance; \
class ACE_CA_Distance: CA_Distance { \ class ACE_CA_Distance: CA_Distance { \
idc = 1713151; \ idc = 1713151; \
text = "----"; \ text = "----"; \
}; \ }; \
class ACE_Rangehelper: RscMapControl { \ class ACE_Rangehelper: RscMapControl { \
onDraw = "((ctrlParent (_this select 0)) displayCtrl 1713151) ctrlShow (cameraView == 'GUNNER');"; \ onDraw = "((ctrlParent (_this select 0)) displayCtrl 1713151) ctrlShow (cameraView == 'GUNNER');"; \
w = 0; \ w = 0; \
h = 0; \ h = 0; \
}; };
class RscControlsGroup; class RscControlsGroup;
class RscMapControl; class RscMapControl;
class RscInGameUI { class RscInGameUI {
class RscUnitInfo; class RscUnitInfo;
class RscUnitInfo_AH64D_gunner { class RscUnitInfo_AH64D_gunner {
onLoad = ""; onLoad = "";
controls[] = {"CA_Distance", "ACE_CA_Distance"}; controls[] = {"CA_Distance", "ACE_CA_Distance"};
MACRO_RANGEFINDER MACRO_RANGEFINDER
}; };
class RscWeaponRangeFinder { class RscWeaponRangeFinder {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
controls[] = {"CA_Distance", "ACE_CA_Distance"}; controls[] = {"CA_Distance", "ACE_CA_Distance"};
MACRO_RANGEFINDER MACRO_RANGEFINDER
}; };
class RscWeaponRangeFinderPAS13 { class RscWeaponRangeFinderPAS13 {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
MACRO_RANGEFINDER
};
class RscOptics_Rangefinder: RscUnitInfo {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER MACRO_RANGEFINDER
};
}; };
}; class RscOptics_Rangefinder: RscUnitInfo {
class RscOptics_LaserDesignator { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
};
};
};
class RscOptics_LaserDesignator {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscWeaponRangeFinderMAAWS {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscWeaponRangeFinderAbramsCom {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
controls[] = {"CA_Distance", "ACE_CA_Distance"};
MACRO_RANGEFINDER MACRO_RANGEFINDER
};
}; };
}; class RscWeaponRangeFinderAbramsGun {
class RscWeaponRangeFinderMAAWS { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; controls[] = {"CA_Distance", "ACE_CA_Distance"};
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER MACRO_RANGEFINDER
};
}; };
}; class RscWeaponRangeFinderStrykerMGSGun {
class RscWeaponRangeFinderAbramsCom { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; controls[] = {"CA_Distance", "ACE_CA_Distance"};
controls[] = {"CA_Distance", "ACE_CA_Distance"};
MACRO_RANGEFINDER
};
class RscWeaponRangeFinderAbramsGun {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
controls[] = {"CA_Distance", "ACE_CA_Distance"};
MACRO_RANGEFINDER
};
class RscWeaponRangeFinderStrykerMGSGun {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
controls[] = {"CA_Distance", "ACE_CA_Distance"};
MACRO_RANGEFINDER
};
class RscOptics_crows: RscUnitInfo {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER MACRO_RANGEFINDER
};
}; };
}; class RscOptics_crows: RscUnitInfo {
class RscOptics_strider_commander { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
};
class RscOptics_strider_commander {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
}; };
};
class RscWeaponRangeZeroing: RscUnitInfo { class RscWeaponRangeZeroing: RscUnitInfo {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
controls[] = {"CA_Zeroing", "CA_DistanceText", "CA_Distance", "ACE_CA_Distance", "ACE_Rangehelper"}; controls[] = {"CA_Zeroing", "CA_DistanceText", "CA_Distance", "ACE_CA_Distance", "ACE_Rangehelper"};
MACRO_RANGEFINDER
};
class RscOptics_sos: RscUnitInfo {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER MACRO_RANGEFINDER
};
}; };
}; class RscOptics_sos: RscUnitInfo {
class RscOptics_nightstalker: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_nightstalker: RscUnitInfo {
class RscOptics_tws: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_tws: RscUnitInfo {
class RscOptics_punisher { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_punisher {
class RscOptics_tws_sniper: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_tws_sniper: RscUnitInfo {
class RscOptics_SDV_periscope { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_SDV_periscope {
class RscOptics_Heli_Attack_02_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_Heli_Attack_02_gunner: RscUnitInfo {
class RscOptics_Heli_Attack_01_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_Heli_Attack_01_gunner: RscUnitInfo {
class RscOptics_UAV_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_UAV_gunner: RscUnitInfo {
class RscOptics_UGV_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_UGV_gunner: RscUnitInfo {
class RscOptics_APC_Tracked_01_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_APC_Tracked_01_gunner: RscUnitInfo {
class RscOptics_APC_Tracked_03_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_APC_Tracked_03_gunner: RscUnitInfo {
class RscOptics_APC_Wheeled_01_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_APC_Wheeled_01_gunner: RscUnitInfo {
class RscOptics_APC_Wheeled_03_commander: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_APC_Wheeled_03_commander: RscUnitInfo {
class RscOptics_APC_Wheeled_03_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_APC_Wheeled_03_gunner: RscUnitInfo {
class RscOptics_MBT_01_commander: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_MBT_01_commander: RscUnitInfo {
class RscOptics_MBT_01_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_MBT_01_gunner: RscUnitInfo {
class RscOptics_MBT_02_commander: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_MBT_02_commander: RscUnitInfo {
class RscOptics_MBT_02_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
}; };
}; class RscOptics_MBT_02_gunner: RscUnitInfo {
class RscOptics_MBT_03_gunner: RscUnitInfo { onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; class CA_IGUI_elements_group: RscControlsGroup {
class CA_IGUI_elements_group: RscControlsGroup { class controls {
class controls { MACRO_RANGEFINDER
MACRO_RANGEFINDER };
}; };
};
class RscOptics_MBT_03_gunner: RscUnitInfo {
onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
}; };
};
}; };

View File

@ -1,373 +1,373 @@
#include "script_component.hpp" #include "script_component.hpp"
class CfgPatches { class CfgPatches {
class ADDON { class ADDON {
units[] = {}; units[] = {};
weapons[] = {}; weapons[] = {};
requiredVersion = 0.60; requiredVersion = 0.60;
requiredAddons[] = {ace_common, ace_interaction}; requiredAddons[] = {ace_common, ace_interaction};
version = QUOTE(VERSION); version = QUOTE(VERSION);
versionStr = QUOTE(VERSION); versionStr = QUOTE(VERSION);
versionAr[] = {VERSION_AR}; versionAr[] = {VERSION_AR};
author[] = {"KoffeinFlummi","BadGuy (simon84)"}; author[] = {"KoffeinFlummi","BadGuy (simon84)"};
authorUrl = "https://github.com/KoffeinFlummi/"; authorUrl = "https://github.com/KoffeinFlummi/";
}; };
}; };
#include "CfgEventHandlers.hpp" #include "CfgEventHandlers.hpp"
class ACE_Default_Keys { class ACE_Default_Keys {
class laseTarget { class laseTarget {
displayName = $STR_ACE_FCS_LaseTarget; displayName = $STR_ACE_FCS_LaseTarget;
condition = QUOTE(call FUNC(canUseRangefinder) || FUNC(canUseFCS)); condition = QUOTE(call FUNC(canUseRangefinder) || FUNC(canUseFCS));
statement = QUOTE([_vehicle] call FUNC(keyDown)); statement = QUOTE([_vehicle] call FUNC(keyDown));
conditionUp = QUOTE(GVAR(enabled) && FUNC(canUseFCS)); conditionUp = QUOTE(GVAR(enabled) && FUNC(canUseFCS));
statementUp = QUOTE([_vehicle] call FUNC(keyUp)); statementUp = QUOTE([_vehicle] call FUNC(keyUp));
key = 15; key = 15;
shift = 0; shift = 0;
control = 0; control = 0;
alt = 0; alt = 0;
}; };
class adjustRangeUp { class adjustRangeUp {
displayName = $STR_ACE_FCS_AdjustRangeUp; displayName = $STR_ACE_FCS_AdjustRangeUp;
condition = QUOTE(call FUNC(canUseRangefinder) || FUNC(canUseFCS)); condition = QUOTE(call FUNC(canUseRangefinder) || FUNC(canUseFCS));
statement = QUOTE([_vehicle, 50] call FUNC(adjustRange)); statement = QUOTE([_vehicle, 50] call FUNC(adjustRange));
key = 201; key = 201;
shift = 0; shift = 0;
control = 0; control = 0;
alt = 0; alt = 0;
allowHolding = 1; allowHolding = 1;
}; };
class adjustRangeDown: adjustRangeUp { class adjustRangeDown: adjustRangeUp {
displayName = $STR_ACE_FCS_AdjustRangeDown; displayName = $STR_ACE_FCS_AdjustRangeDown;
statement = QUOTE([_vehicle, -50] call FUNC(adjustRange)); statement = QUOTE([_vehicle, -50] call FUNC(adjustRange));
key = 209; key = 209;
}; };
}; };
class CfgVehicles { class CfgVehicles {
class All { class All {
class Turrets; class Turrets;
};
class AllVehicles: All {
GVAR(Enabled) = 0;
GVAR(MinDistance) = 200;
GVAR(MaxDistance) = 9990;
GVAR(DistanceInterval) = 5;
class NewTurret {
class Turrets;
}; };
class CargoTurret;
};
class Land: AllVehicles {}; class AllVehicles: All {
GVAR(Enabled) = 0;
class LandVehicle: Land { GVAR(MinDistance) = 200;
class CommanderOptics; GVAR(MaxDistance) = 9990;
}; GVAR(DistanceInterval) = 5;
class NewTurret {
// WHEELED class Turrets;
class Car: LandVehicle {
class ACE_SelfActions {
class ResetFCS {
displayName = $STR_ACE_FCS_ResetFCS;
enableInside = 1;
condition = QUOTE(call FUNC(canResetFCS));
statement = QUOTE([vehicle _player] call FUNC(reset););
showDisabled = 0;
priority = 1;
icon = "";
};
};
};
class Car_F: Car {
class Turrets {
class MainTurret;
};
};
class Wheeled_APC_F: Car_F {
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics;
}; };
}; class CargoTurret;
}; };
};
class APC_Wheeled_01_base_F: Wheeled_APC_F {}; class Land: AllVehicles {};
class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {};
class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F {
GVAR(Enabled) = 1;
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
class APC_Wheeled_03_base_F: Wheeled_APC_F { class LandVehicle: Land {
GVAR(Enabled) = 1; class CommanderOptics;
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
}; };
};
// TRACKED // WHEELED
class Tank: LandVehicle { class Car: LandVehicle {
GVAR(Enabled) = 1; // all tracked vehicles get one by default class ACE_SelfActions {
class ACE_SelfActions { class ResetFCS {
class ResetFCS { displayName = $STR_ACE_FCS_ResetFCS;
displayName = $STR_ACE_FCS_ResetFCS; enableInside = 1;
enableInside = 1; condition = QUOTE(call FUNC(canResetFCS));
condition = QUOTE(call FUNC(canResetFCS)); statement = QUOTE([vehicle _player] call FUNC(reset););
statement = QUOTE([vehicle _player] call FUNC(reset);); showDisabled = 0;
showDisabled = 0; priority = 1;
priority = 1; icon = "";
icon = ""; };
};
};
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics;
}; };
};
}; };
};
class Tank_F: Tank { class Car_F: Car {
class Turrets {
class MainTurret: NewTurret {
class Turrets { class Turrets {
class CommanderOptics; class MainTurret;
}; };
};
}; };
};
class MBT_01_base_F: Tank_F { class Wheeled_APC_F: Car_F {
class Turrets: Turrets { class Turrets {
class MainTurret: MainTurret { class MainTurret: NewTurret {
discreteDistance[] = {}; class Turrets {
discreteDistanceInitIndex = 0; class CommanderOptics;
}; };
};
};
}; };
};
class B_MBT_01_base_F: MBT_01_base_F {}; class APC_Wheeled_01_base_F: Wheeled_APC_F {};
class B_MBT_01_cannon_F: B_MBT_01_base_F {}; class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {};
class B_MBT_01_TUSK_F: B_MBT_01_cannon_F { class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F {
class Turrets: Turrets { GVAR(Enabled) = 1;
class MainTurret: MainTurret { class Turrets: Turrets {
discreteDistance[] = {}; class MainTurret: MainTurret {
discreteDistanceInitIndex = 0; discreteDistance[] = {};
}; discreteDistanceInitIndex = 0;
};
};
}; };
};
class MBT_01_arty_base_F: MBT_01_base_F {
GVAR(Enabled) = 0;
};
class MBT_01_mlrs_base_F: MBT_01_base_F {
GVAR(Enabled) = 0;
};
class MBT_02_base_F: Tank_F { class APC_Wheeled_03_base_F: Wheeled_APC_F {
class Turrets: Turrets { GVAR(Enabled) = 1;
class MainTurret: MainTurret { class Turrets: Turrets {
discreteDistance[] = {}; class MainTurret: MainTurret {
discreteDistanceInitIndex = 0; discreteDistance[] = {};
}; discreteDistanceInitIndex = 0;
};
};
}; };
};
class MBT_02_arty_base_F: MBT_02_base_F {
GVAR(Enabled) = 0;
};
class MBT_03_base_F: Tank_F { // TRACKED
class Turrets: Turrets { class Tank: LandVehicle {
class MainTurret: MainTurret { GVAR(Enabled) = 1; // all tracked vehicles get one by default
discreteDistance[] = {}; class ACE_SelfActions {
discreteDistanceInitIndex = 0; class ResetFCS {
}; displayName = $STR_ACE_FCS_ResetFCS;
enableInside = 1;
condition = QUOTE(call FUNC(canResetFCS));
statement = QUOTE([vehicle _player] call FUNC(reset););
showDisabled = 0;
priority = 1;
icon = "";
};
};
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics;
};
};
};
}; };
};
class APC_Tracked_01_base_F: Tank_F {}; class Tank_F: Tank {
class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {}; class Turrets {
class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F { class MainTurret: NewTurret {
GVAR(Enabled) = 0; class Turrets {
}; class CommanderOptics;
class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { };
GVAR(Enabled) = 0; };
}; };
class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Red"};
};
}; };
};
class APC_Tracked_02_base_F: Tank_F {}; class MBT_01_base_F: Tank_F {
class O_APC_Tracked_02_base_F: APC_Tracked_02_base_F {}; class Turrets: Turrets {
class O_APC_Tracked_02_AA_F: O_APC_Tracked_02_base_F { class MainTurret: MainTurret {
class Turrets: Turrets { discreteDistance[] = {};
class MainTurret: MainTurret { discreteDistanceInitIndex = 0;
magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Green"}; };
}; };
}; };
};
class APC_Tracked_03_base_F: Tank_F { class B_MBT_01_base_F: MBT_01_base_F {};
class Turrets: Turrets { class B_MBT_01_cannon_F: B_MBT_01_base_F {};
class MainTurret: MainTurret { class B_MBT_01_TUSK_F: B_MBT_01_cannon_F {
discreteDistance[] = {}; class Turrets: Turrets {
discreteDistanceInitIndex = 0; class MainTurret: MainTurret {
}; discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
class MBT_01_arty_base_F: MBT_01_base_F {
GVAR(Enabled) = 0;
};
class MBT_01_mlrs_base_F: MBT_01_base_F {
GVAR(Enabled) = 0;
}; };
};
// HELICOPTERS class MBT_02_base_F: Tank_F {
class Air: AllVehicles {}; class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
class MBT_02_arty_base_F: MBT_02_base_F {
GVAR(Enabled) = 0;
};
class Helicopter: Air { class MBT_03_base_F: Tank_F {
class ACE_SelfActions { class Turrets: Turrets {
class ResetFCS { class MainTurret: MainTurret {
displayName = $STR_ACE_FCS_ResetFCS; discreteDistance[] = {};
enableInside = 1; discreteDistanceInitIndex = 0;
condition = QUOTE(call FUNC(canResetFCS)); };
statement = QUOTE([vehicle _player] call FUNC(reset);); };
showDisabled = 0;
priority = 1;
icon = "";
};
}; };
class Turrets {
class MainTurret;
};
};
class Helicopter_Base_F: Helicopter { class APC_Tracked_01_base_F: Tank_F {};
class Turrets: Turrets { class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {};
class CopilotTurret; class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F {
GVAR(Enabled) = 0;
};
class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F {
GVAR(Enabled) = 0;
};
class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Red"};
};
};
}; };
};
class Heli_Attack_01_base_F: Helicopter_Base_F { class APC_Tracked_02_base_F: Tank_F {};
GVAR(Enabled) = 1; class O_APC_Tracked_02_base_F: APC_Tracked_02_base_F {};
class Turrets: Turrets { class O_APC_Tracked_02_AA_F: O_APC_Tracked_02_base_F {
class MainTurret: MainTurret { class Turrets: Turrets {
discreteDistance[] = {}; class MainTurret: MainTurret {
discreteDistanceInitIndex = 0; magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Green"};
}; };
};
}; };
};
class Heli_Attack_02_base_F: Helicopter_Base_F { class APC_Tracked_03_base_F: Tank_F {
GVAR(Enabled) = 1; class Turrets: Turrets {
class Turrets: Turrets { class MainTurret: MainTurret {
class MainTurret: MainTurret { discreteDistance[] = {};
discreteDistance[] = {}; discreteDistanceInitIndex = 0;
discreteDistanceInitIndex = 0; };
}; };
};
// HELICOPTERS
class Air: AllVehicles {};
class Helicopter: Air {
class ACE_SelfActions {
class ResetFCS {
displayName = $STR_ACE_FCS_ResetFCS;
enableInside = 1;
condition = QUOTE(call FUNC(canResetFCS));
statement = QUOTE([vehicle _player] call FUNC(reset););
showDisabled = 0;
priority = 1;
icon = "";
};
};
class Turrets {
class MainTurret;
};
};
class Helicopter_Base_F: Helicopter {
class Turrets: Turrets {
class CopilotTurret;
};
};
class Heli_Attack_01_base_F: Helicopter_Base_F {
GVAR(Enabled) = 1;
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
class Heli_Attack_02_base_F: Helicopter_Base_F {
GVAR(Enabled) = 1;
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
}; };
};
}; };
class CfgWeapons { class CfgWeapons {
// disable locking, so it doesn't interfere with our system // disable locking, so it doesn't interfere with our system
class CannonCore; class CannonCore;
class cannon_120mm: CannonCore { class cannon_120mm: CannonCore {
canLock = 0; canLock = 0;
ballisticsComputer = 0; ballisticsComputer = 0;
}; };
class autocannon_Base_F: CannonCore { class autocannon_Base_F: CannonCore {
canLock = 0; canLock = 0;
ballisticsComputer = 0; ballisticsComputer = 0;
}; };
class autocannon_35mm: CannonCore { class autocannon_35mm: CannonCore {
canLock = 0; canLock = 0;
ballisticsComputer = 0; ballisticsComputer = 0;
magazines[] += {"ACE_120Rnd_35mm_ABM_shells","ACE_120Rnd_35mm_ABM_shells_Tracer_Red","ACE_120Rnd_35mm_ABM_shells_Tracer_Green","ACE_120Rnd_35mm_ABM_shells_Tracer_Yellow"}; magazines[] += {"ACE_120Rnd_35mm_ABM_shells","ACE_120Rnd_35mm_ABM_shells_Tracer_Red","ACE_120Rnd_35mm_ABM_shells_Tracer_Green","ACE_120Rnd_35mm_ABM_shells_Tracer_Yellow"};
}; };
// fix mrco having an invisible rangefinder // fix mrco having an invisible rangefinder
class ItemCore; class ItemCore;
class optic_MRCO: ItemCore { class optic_MRCO: ItemCore {
weaponInfoType = "RscWeaponZeroing"; weaponInfoType = "RscWeaponZeroing";
}; };
}; };
class CfgMagazines { class CfgMagazines {
class 680Rnd_35mm_AA_shells; class 680Rnd_35mm_AA_shells;
class 680Rnd_35mm_AA_shells_Tracer_Red; class 680Rnd_35mm_AA_shells_Tracer_Red;
class 680Rnd_35mm_AA_shells_Tracer_Green; class 680Rnd_35mm_AA_shells_Tracer_Green;
class 680Rnd_35mm_AA_shells_Tracer_Yellow; class 680Rnd_35mm_AA_shells_Tracer_Yellow;
class ACE_120Rnd_35mm_ABM_shells: 680Rnd_35mm_AA_shells { class ACE_120Rnd_35mm_ABM_shells: 680Rnd_35mm_AA_shells {
ammo = "ACE_B_35mm_ABM"; ammo = "ACE_B_35mm_ABM";
count = 120; count = 120;
displayName = "35mm ABM Shells"; displayName = "35mm ABM Shells";
displayNameShort = "35mm ABM"; displayNameShort = "35mm ABM";
}; };
class ACE_120Rnd_35mm_ABM_shells_Tracer_Red: 680Rnd_35mm_AA_shells_Tracer_Red { class ACE_120Rnd_35mm_ABM_shells_Tracer_Red: 680Rnd_35mm_AA_shells_Tracer_Red {
ammo = "ACE_B_35mm_ABM_Tracer_Red"; ammo = "ACE_B_35mm_ABM_Tracer_Red";
count = 120; count = 120;
displayName = "35mm ABM Shells"; displayName = "35mm ABM Shells";
displayNameShort = "35mm ABM-T"; displayNameShort = "35mm ABM-T";
}; };
class ACE_120Rnd_35mm_ABM_shells_Tracer_Green: 680Rnd_35mm_AA_shells_Tracer_Green { class ACE_120Rnd_35mm_ABM_shells_Tracer_Green: 680Rnd_35mm_AA_shells_Tracer_Green {
ammo = "ACE_B_35mm_ABM_Tracer_Green"; ammo = "ACE_B_35mm_ABM_Tracer_Green";
count = 120; count = 120;
displayName = "35mm ABM Shells"; displayName = "35mm ABM Shells";
displayNameShort = "35mm ABM-T"; displayNameShort = "35mm ABM-T";
}; };
class ACE_120Rnd_35mm_ABM_shells_Tracer_Yellow: 680Rnd_35mm_AA_shells_Tracer_Yellow { class ACE_120Rnd_35mm_ABM_shells_Tracer_Yellow: 680Rnd_35mm_AA_shells_Tracer_Yellow {
ammo = "ACE_B_35mm_ABM_Tracer_Yellow"; ammo = "ACE_B_35mm_ABM_Tracer_Yellow";
count = 120; count = 120;
displayName = "35mm ABM Shells"; displayName = "35mm ABM Shells";
displayNameShort = "35mm ABM-T"; displayNameShort = "35mm ABM-T";
}; };
}; };
class CfgAmmo { class CfgAmmo {
class B_35mm_AA; class B_35mm_AA;
class B_35mm_AA_Tracer_Red; class B_35mm_AA_Tracer_Red;
class B_35mm_AA_Tracer_Green; class B_35mm_AA_Tracer_Green;
class B_35mm_AA_Tracer_Yellow; class B_35mm_AA_Tracer_Yellow;
class ACE_B_35mm_ABM: B_35mm_AA { class ACE_B_35mm_ABM: B_35mm_AA {
GVAR(Airburst) = 1; GVAR(Airburst) = 1;
deflecting = 0; deflecting = 0;
}; };
class ACE_B_35mm_ABM_Tracer_Red: B_35mm_AA_Tracer_Red { class ACE_B_35mm_ABM_Tracer_Red: B_35mm_AA_Tracer_Red {
GVAR(Airburst) = 1; GVAR(Airburst) = 1;
deflecting = 0; deflecting = 0;
}; };
class ACE_B_35mm_ABM_Tracer_Green: B_35mm_AA_Tracer_Green { class ACE_B_35mm_ABM_Tracer_Green: B_35mm_AA_Tracer_Green {
GVAR(Airburst) = 1; GVAR(Airburst) = 1;
deflecting = 0; deflecting = 0;
}; };
class ACE_B_35mm_ABM_Tracer_Yellow: B_35mm_AA_Tracer_Yellow { class ACE_B_35mm_ABM_Tracer_Yellow: B_35mm_AA_Tracer_Yellow {
GVAR(Airburst) = 1; GVAR(Airburst) = 1;
deflecting = 0; deflecting = 0;
}; };
class ACE_B_35mm_ABM_Helper: B_35mm_AA { class ACE_B_35mm_ABM_Helper: B_35mm_AA {
indirectHitRange = 6; indirectHitRange = 6;
simulation = "shotRocket"; simulation = "shotRocket";
timeToLive = 0; timeToLive = 0;
}; };
}; };
#include <CfgOptics.hpp> #include <CfgOptics.hpp>

View File

@ -29,9 +29,9 @@ if !(_magazineType in _FCSMagazines) exitWith {};
// GET ELEVATION OFFSET OF CURRENT MAGAZINE // GET ELEVATION OFFSET OF CURRENT MAGAZINE
_offset = 0; _offset = 0;
{ {
if (_x == _magazineType) exitWith { if (_x == _magazineType) exitWith {
_offset = _FCSElevation select _forEachIndex; _offset = _FCSElevation select _forEachIndex;
}; };
} forEach _FCSMagazines; } forEach _FCSMagazines;
[_round, (_unit getVariable QGVAR(Azimuth)), _offset, 0] call EFUNC(common,changeProjectileDirection); [_round, (_unit getVariable QGVAR(Azimuth)), _offset, 0] call EFUNC(common,changeProjectileDirection);
@ -39,24 +39,24 @@ _offset = 0;
// Air burst missile // Air burst missile
// may need to get rewritten // may need to get rewritten
if (getNumber (configFile >> "CfgAmmo" >> _ammoType >> "ACE_Airburst") == 1) then { if (getNumber (configFile >> "CfgAmmo" >> _ammoType >> "ACE_Airburst") == 1) then {
_this spawn { _this spawn {
_vehicle = _this select 0; _vehicle = _this select 0;
_projectile = _this select 6; _projectile = _this select 6;
_distance = _vehicle getVariable [QGVAR(Distance), currentZeroing _vehicle]; _distance = _vehicle getVariable [QGVAR(Distance), currentZeroing _vehicle];
if (_distance < 50) exitWith {}; if (_distance < 50) exitWith {};
if (_distance > 1500) exitWith {}; if (_distance > 1500) exitWith {};
waitUntil {_projectile distance _vehicle > _distance || {!alive _projectile}}; waitUntil {_projectile distance _vehicle > _distance || {!alive _projectile}};
if (!alive _projectile) exitWith {}; if (!alive _projectile) exitWith {};
_position = getPosATL _projectile; _position = getPosATL _projectile;
_subMunition = createVehicle ["ACE_B_35mm_ABM_Helper", _position, [], 0, "FLY"]; _subMunition = createVehicle ["ACE_B_35mm_ABM_Helper", _position, [], 0, "FLY"];
_subMunition setPosATL _position; _subMunition setPosATL _position;
_subMunition setVelocity [0, 0, -10]; _subMunition setVelocity [0, 0, -10];
deleteVehicle _projectile; deleteVehicle _projectile;
}; };
}; };

View File

@ -32,40 +32,40 @@ _simulationStep = _this select 6;
if (_simulationStep == 0) exitWith {_angleTarget}; if (_simulationStep == 0) exitWith {_angleTarget};
FUNC(traceBullet) = { FUNC(traceBullet) = {
private ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_angle", "_posTargetX", "_posTargetY", "_posX", "_posY", "_velocityX", "_velocityY", "_velocityMagnitude"]; private ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_angle", "_posTargetX", "_posTargetY", "_posX", "_posY", "_velocityX", "_velocityY", "_velocityMagnitude"];
_distance = _this select 0; _distance = _this select 0;
_angleTarget = _this select 1; _angleTarget = _this select 1;
_maxElev = _this select 2; _maxElev = _this select 2;
_initSpeed = _this select 3; _initSpeed = _this select 3;
_airFriction = _this select 4; _airFriction = _this select 4;
_timeToLive = _this select 5; _timeToLive = _this select 5;
_simulationStep = _this select 6; _simulationStep = _this select 6;
_angle = _this select 7; _angle = _this select 7;
_angle = _angle - _angleTarget; _angle = _angle - _angleTarget;
_angleTarget = 0; _angleTarget = 0;
_posTargetX = (cos _angleTarget) * _distance; _posTargetX = (cos _angleTarget) * _distance;
_posTargetY = (sin _angleTarget) * _distance; _posTargetY = (sin _angleTarget) * _distance;
_posX = 0; _posX = 0;
_posY = 0; _posY = 0;
_velocityX = (cos _angle) * _initSpeed; _velocityX = (cos _angle) * _initSpeed;
_velocityY = (sin _angle) * _initSpeed; _velocityY = (sin _angle) * _initSpeed;
// trace the path of the bullet // trace the path of the bullet
for "_i" from 1 to ((floor (_timeToLive / _simulationStep)) + 1) do { for "_i" from 1 to ((floor (_timeToLive / _simulationStep)) + 1) do {
_velocityMagnitude = sqrt (_velocityX^2 + _velocityY^2); _velocityMagnitude = sqrt (_velocityX^2 + _velocityY^2);
_velocityX = _velocityX + _simulationStep * (_velocityX * _velocityMagnitude * _airFriction); _velocityX = _velocityX + _simulationStep * (_velocityX * _velocityMagnitude * _airFriction);
_velocityY = _velocityY + _simulationStep * (_velocityY * _velocityMagnitude * _airFriction - 9.81); _velocityY = _velocityY + _simulationStep * (_velocityY * _velocityMagnitude * _airFriction - 9.81);
_posX = _posX + _velocityX * _simulationStep; _posX = _posX + _velocityX * _simulationStep;
_posY = _posY + _velocityY * _simulationStep; _posY = _posY + _velocityY * _simulationStep;
if (_posX >= _posTargetX) exitWith {}; // bullet passed the target if (_posX >= _posTargetX) exitWith {}; // bullet passed the target
}; };
_posY - _posTargetY _posY - _posTargetY
}; };
if ((_this + [_maxElev]) call FUNC(traceBullet) < 0) exitWith {_maxElev - _angleTarget}; if ((_this + [_maxElev]) call FUNC(traceBullet) < 0) exitWith {_maxElev - _angleTarget};
@ -78,12 +78,12 @@ _f1 = (_this + [_angle1]) call FUNC(traceBullet);
if ((abs _f1) <= PRECISION) exitWith {0}; if ((abs _f1) <= PRECISION) exitWith {0};
while {(abs _f1) > PRECISION} do { while {(abs _f1) > PRECISION} do {
_f2 = (_this + [_angle2]) call FUNC(traceBullet); _f2 = (_this + [_angle2]) call FUNC(traceBullet);
_temp = _angle2-_f2*(_angle2-_angle1)/(_f2-_f1); _temp = _angle2-_f2*(_angle2-_angle1)/(_f2-_f1);
_angle1 = _angle2; _angle1 = _angle2;
_angle2 = _temp; _angle2 = _temp;
_f1 = _f2; _f1 = _f2;
_it2 = _it2+1; _it2 = _it2+1;
}; };
//player globalChat format ["it1: %1 | _angle1: %2 | it2: %3 | _angle2: %4",_it1, _angle-_angleTarget, _it2, _angle2-_angleTarget]; //player globalChat format ["it1: %1 | _angle1: %2 | it2: %3 | _angle2: %4",_it1, _angle-_angleTarget, _it2, _angle2-_angleTarget];

View File

@ -23,13 +23,13 @@ GVAR(Enabled) = true;
GVAR(Time) = time; GVAR(Time) = time;
if (_distance == 0) then { if (_distance == 0) then {
_distance = [5, 5000, 0] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision _distance = [5, 5000, 0] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision
}; };
_weaponDirection = _vehicle weaponDirection currentWeapon _vehicle; _weaponDirection = _vehicle weaponDirection currentWeapon _vehicle;
GVAR(Position) = [ GVAR(Position) = [
(getPos _vehicle select 0) + _distance * (_weaponDirection select 0), (getPos _vehicle select 0) + _distance * (_weaponDirection select 0),
(getPos _vehicle select 1) + _distance * (_weaponDirection select 1), (getPos _vehicle select 1) + _distance * (_weaponDirection select 1),
(getPos _vehicle select 2) + _distance * (_weaponDirection select 2) (getPos _vehicle select 2) + _distance * (_weaponDirection select 2)
]; ];

View File

@ -22,78 +22,78 @@ if !(GVAR(enabled) && FUNC(canUseFCS)) exitWith {};
_magazines = magazines _vehicle; _magazines = magazines _vehicle;
if (_distance == 0) then { if (_distance == 0) then {
_distance = [ _distance = [
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(DistanceInterval)), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(DistanceInterval)),
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(MaxDistance)), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(MaxDistance)),
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(MinDistance)) getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(MinDistance))
] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision ] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision
}; };
_weaponDirection = _vehicle weaponDirection currentWeapon _vehicle; _weaponDirection = _vehicle weaponDirection currentWeapon _vehicle;
_angleTarget = asin (_weaponDirection select 2); _angleTarget = asin (_weaponDirection select 2);
if (count _this > 2) then { if (count _this > 2) then {
_distance = _this select 2; _distance = _this select 2;
}; };
if (!(isNil QGVAR(backgroundCalculation)) and {!(scriptDone GVAR(backgroundCalculation))}) then { if (!(isNil QGVAR(backgroundCalculation)) and {!(scriptDone GVAR(backgroundCalculation))}) then {
terminate GVAR(backgroundCalculation); terminate GVAR(backgroundCalculation);
}; };
// MOVING TARGETS // MOVING TARGETS
_movingAzimuth = 0; _movingAzimuth = 0;
if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then { if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
// calculate speed of target // calculate speed of target
_posTarget = [ _posTarget = [
(getPos _vehicle select 0) + _distance * (_weaponDirection select 0), (getPos _vehicle select 0) + _distance * (_weaponDirection select 0),
(getPos _vehicle select 1) + _distance * (_weaponDirection select 1), (getPos _vehicle select 1) + _distance * (_weaponDirection select 1),
(getPos _vehicle select 2) + _distance * (_weaponDirection select 2) (getPos _vehicle select 2) + _distance * (_weaponDirection select 2)
]; ];
_velocityTarget = [ _velocityTarget = [
((_posTarget select 0) - (GVAR(position) select 0)) / (time - GVAR(time)), ((_posTarget select 0) - (GVAR(position) select 0)) / (time - GVAR(time)),
((_posTarget select 1) - (GVAR(position) select 1)) / (time - GVAR(time)), ((_posTarget select 1) - (GVAR(position) select 1)) / (time - GVAR(time)),
((_posTarget select 2) - (GVAR(position) select 2)) / (time - GVAR(time)) ((_posTarget select 2) - (GVAR(position) select 2)) / (time - GVAR(time))
]; ];
// estimate time to target // estimate time to target
_magazineType = currentMagazine _vehicle; _magazineType = currentMagazine _vehicle;
_ammoType = getText (configFile >> "CfgMagazines" >> _magazineType >> "ammo"); _ammoType = getText (configFile >> "CfgMagazines" >> _magazineType >> "ammo");
_initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazineType >> "initSpeed"); _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazineType >> "initSpeed");
_airFriction = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "airFriction"); _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "airFriction");
_timeToLive = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "timeToLive"); _timeToLive = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "timeToLive");
_simulationStep = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "simulationStep"); _simulationStep = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "simulationStep");
if (_simulationStep != 0) then { if (_simulationStep != 0) then {
_posX = 0; _posX = 0;
_velocityX = _initSpeed; _velocityX = _initSpeed;
_velocityY = 0; _velocityY = 0;
_timeToTarget = 0; _timeToTarget = 0;
for "_i" from 1 to ((floor (_timeToLive / _simulationStep)) + 1) do { for "_i" from 1 to ((floor (_timeToLive / _simulationStep)) + 1) do {
_posX = _posX + _velocityX * _simulationStep; _posX = _posX + _velocityX * _simulationStep;
if (_posX >= _distance) exitWith { // bullet passed the target if (_posX >= _distance) exitWith { // bullet passed the target
_timeToTarget = _i * _simulationStep; _timeToTarget = _i * _simulationStep;
}; };
_velocityMagnitude = sqrt (_velocityX^2 + _velocityY^2); _velocityMagnitude = sqrt (_velocityX^2 + _velocityY^2);
_velocityX = _velocityX + _velocityX * _velocityMagnitude * _airFriction * _simulationStep; _velocityX = _velocityX + _velocityX * _velocityMagnitude * _airFriction * _simulationStep;
_velocityY = _velocityY + _velocityY * _velocityMagnitude * _airFriction * _simulationStep - 9.81 * _simulationStep; _velocityY = _velocityY + _velocityY * _velocityMagnitude * _airFriction * _simulationStep - 9.81 * _simulationStep;
};
// calculate offsets
_posArrival = [
(_posTarget select 0) + (_velocityTarget select 0) * _timeToTarget,
(_posTarget select 1) + (_velocityTarget select 1) * _timeToTarget,
(_posTarget select 2) + (_velocityTarget select 2) * _timeToTarget
];
_dirArrival = [
((_posArrival select 0) - (getPos _vehicle select 0)) / (_posArrival distance (getPos _vehicle)),
((_posArrival select 1) - (getPos _vehicle select 1)) / (_posArrival distance (getPos _vehicle)),
((_posArrival select 2) - (getPos _vehicle select 2)) / (_posArrival distance (getPos _vehicle))
];
_movingAzimuth = ((_dirArrival select 0) atan2 (_dirArrival select 1)) - ((_weaponDirection select 0) atan2 (_weaponDirection select 1));
_angleTarget = asin (_dirArrival select 2);
_distance = floor (_posArrival distance (getPos _vehicle));
}; };
// calculate offsets
_posArrival = [
(_posTarget select 0) + (_velocityTarget select 0) * _timeToTarget,
(_posTarget select 1) + (_velocityTarget select 1) * _timeToTarget,
(_posTarget select 2) + (_velocityTarget select 2) * _timeToTarget
];
_dirArrival = [
((_posArrival select 0) - (getPos _vehicle select 0)) / (_posArrival distance (getPos _vehicle)),
((_posArrival select 1) - (getPos _vehicle select 1)) / (_posArrival distance (getPos _vehicle)),
((_posArrival select 2) - (getPos _vehicle select 2)) / (_posArrival distance (getPos _vehicle))
];
_movingAzimuth = ((_dirArrival select 0) atan2 (_dirArrival select 1)) - ((_weaponDirection select 0) atan2 (_weaponDirection select 1));
_angleTarget = asin (_dirArrival select 2);
_distance = floor (_posArrival distance (getPos _vehicle));
};
}; };
GVAR(enabled) = false; GVAR(enabled) = false;
GVAR(time) = -1; GVAR(time) = -1;
@ -102,7 +102,7 @@ GVAR(time) = -1;
_viewDiff = _vehicle getVariable QGVAR(ViewDiff); _viewDiff = _vehicle getVariable QGVAR(ViewDiff);
_FCSAzimuth = _movingAzimuth; _FCSAzimuth = _movingAzimuth;
if (_viewDiff != 0) then { if (_viewDiff != 0) then {
_FCSAzimuth = (atan (_distance / _viewDiff) - (abs _viewDiff / _viewDiff) * 90) + _movingAzimuth; _FCSAzimuth = (atan (_distance / _viewDiff) - (abs _viewDiff / _viewDiff) * 90) + _movingAzimuth;
}; };
// CALCULATE OFFSET FOR CURRENT WEAPON // CALCULATE OFFSET FOR CURRENT WEAPON
@ -112,16 +112,16 @@ _FCSElevation = [];
_magazineType = currentMagazine _vehicle; _magazineType = currentMagazine _vehicle;
_ammoType = getText (configFile >> "CfgMagazines" >> _magazineType >> "ammo"); _ammoType = getText (configFile >> "CfgMagazines" >> _magazineType >> "ammo");
if !(getText (configFile >> "CfgAmmo" >> _ammoType >> "simulation") == "shotMissile") then { if !(getText (configFile >> "CfgAmmo" >> _ammoType >> "simulation") == "shotMissile") then {
_maxElev = getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "Turrets" >> "MainTurret" >> "maxElev"); _maxElev = getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "Turrets" >> "MainTurret" >> "maxElev");
_initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazineType >> "initSpeed"); _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazineType >> "initSpeed");
_airFriction = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "airFriction"); _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "airFriction");
_timeToLive = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "timeToLive"); _timeToLive = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "timeToLive");
_simulationStep = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "simulationStep"); _simulationStep = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "simulationStep");
_offset = [_distance, _angleTarget, _maxElev, _initSpeed, _airFriction, _timeToLive, _simulationStep] call FUNC(getAngle); _offset = [_distance, _angleTarget, _maxElev, _initSpeed, _airFriction, _timeToLive, _simulationStep] call FUNC(getAngle);
_FCSMagazines = _FCSMagazines + [_magazineType]; _FCSMagazines = _FCSMagazines + [_magazineType];
_FCSElevation = _FCSElevation + [_offset]; _FCSElevation = _FCSElevation + [_offset];
}; };
_vehicle setVariable [QGVAR(Distance), _distance, true]; _vehicle setVariable [QGVAR(Distance), _distance, true];
@ -131,33 +131,33 @@ _vehicle setVariable [QGVAR(Azimuth), _FCSAzimuth, true];
// CALCULATE OFFSETS FOR OTHER WEAPONS IN THE BACKGROUND // CALCULATE OFFSETS FOR OTHER WEAPONS IN THE BACKGROUND
GVAR(backgroundCalculation) = [_vehicle, _magazines, _distance, _angleTarget, _FCSMagazines, _FCSElevation] spawn { GVAR(backgroundCalculation) = [_vehicle, _magazines, _distance, _angleTarget, _FCSMagazines, _FCSElevation] spawn {
_vehicle = _this select 0; _vehicle = _this select 0;
_magazines = _this select 1; _magazines = _this select 1;
_distance = _this select 2; _distance = _this select 2;
_angleTarget = _this select 3; _angleTarget = _this select 3;
_FCSMagazines = _this select 4; _FCSMagazines = _this select 4;
_FCSElevation = _this select 5; _FCSElevation = _this select 5;
{ {
if !(_x in _FCSMagazines) then { if !(_x in _FCSMagazines) then {
_ammoType = getText (configFile >> "CfgMagazines" >> _x >> "ammo"); _ammoType = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
if !(getText (configFile >> "CfgAmmo" >> _ammoType >> "simulation") == "shotMissile") then { if !(getText (configFile >> "CfgAmmo" >> _ammoType >> "simulation") == "shotMissile") then {
_maxElev = getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "Turrets" >> "MainTurret" >> "maxElev"); _maxElev = getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "Turrets" >> "MainTurret" >> "maxElev");
_initSpeed = getNumber (configFile >> "CfgMagazines" >> _x >> "initSpeed"); _initSpeed = getNumber (configFile >> "CfgMagazines" >> _x >> "initSpeed");
_airFriction = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "airFriction"); _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "airFriction");
_timeToLive = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "timeToLive"); _timeToLive = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "timeToLive");
_simulationStep = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "simulationStep"); _simulationStep = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "simulationStep");
_offset = [_distance, _angleTarget, _maxElev, _initSpeed, _airFriction, _timeToLive, _simulationStep] call FUNC(getAngle); _offset = [_distance, _angleTarget, _maxElev, _initSpeed, _airFriction, _timeToLive, _simulationStep] call FUNC(getAngle);
_FCSMagazines = _FCSMagazines + [_x]; _FCSMagazines = _FCSMagazines + [_x];
_FCSElevation = _FCSElevation + [_offset]; _FCSElevation = _FCSElevation + [_offset];
}; };
}; };
} forEach _magazines; } forEach _magazines;
_vehicle setVariable [QGVAR(Magazines), _FCSMagazines, true]; _vehicle setVariable [QGVAR(Magazines), _FCSMagazines, true];
_vehicle setVariable [QGVAR(Elevation), _FCSElevation, true]; _vehicle setVariable [QGVAR(Elevation), _FCSElevation, true];
}; };
[format ["%1: %2", localize "STR_ACE_FCS_ZeroedTo", _distance]] call EFUNC(common,displayTextStructured); [format ["%1: %2", localize "STR_ACE_FCS_ZeroedTo", _distance]] call EFUNC(common,displayTextStructured);

View File

@ -15,22 +15,22 @@
private ["_gunBeg", "_gunnerView", "_gunBegPos", "_gunnerViewPos", "_viewDiff"]; private ["_gunBeg", "_gunnerView", "_gunBegPos", "_gunnerViewPos", "_viewDiff"];
if (getNumber (configFile >> "CfgVehicles" >> (typeOf (_this select 0)) >> QGVAR(Enabled)) == 1) then { if (getNumber (configFile >> "CfgVehicles" >> (typeOf (_this select 0)) >> QGVAR(Enabled)) == 1) then {
(_this select 0) addEventHandler ["Fired", {_this call FUNC(firedEH)}]; (_this select 0) addEventHandler ["Fired", {_this call FUNC(firedEH)}];
(_this select 0) setVariable [QGVAR(Distance), 0, true]; (_this select 0) setVariable [QGVAR(Distance), 0, true];
(_this select 0) setVariable [QGVAR(Magazines), [], true]; (_this select 0) setVariable [QGVAR(Magazines), [], true];
(_this select 0) setVariable [QGVAR(Elevation), [], true]; (_this select 0) setVariable [QGVAR(Elevation), [], true];
(_this select 0) setVariable [QGVAR(Azimuth), 0, true]; (_this select 0) setVariable [QGVAR(Azimuth), 0, true];
// calculate offset between gunner camera and muzzle position // calculate offset between gunner camera and muzzle position
if !((_this select 0) isKindOf "Air") then { if !((_this select 0) isKindOf "Air") then {
_gunBeg = getText (configFile >> "CfgVehicles" >> (typeOf (_this select 0)) >> "Turrets" >> "MainTurret" >> "gunBeg"); _gunBeg = getText (configFile >> "CfgVehicles" >> (typeOf (_this select 0)) >> "Turrets" >> "MainTurret" >> "gunBeg");
_gunnerView = getText (configFile >> "CfgVehicles" >> (typeOf (_this select 0)) >> "Turrets" >> "MainTurret" >> "memoryPointGunnerOptics"); _gunnerView = getText (configFile >> "CfgVehicles" >> (typeOf (_this select 0)) >> "Turrets" >> "MainTurret" >> "memoryPointGunnerOptics");
_gunBegPos = ((_this select 0) selectionPosition _gunBeg) select 0; _gunBegPos = ((_this select 0) selectionPosition _gunBeg) select 0;
_gunnerViewPos = ((_this select 0) selectionPosition _gunnerView) select 0; _gunnerViewPos = ((_this select 0) selectionPosition _gunnerView) select 0;
_viewDiff = _gunBegPos - _gunnerViewPos; _viewDiff = _gunBegPos - _gunnerViewPos;
(_this select 0) setVariable [QGVAR(ViewDiff), _viewDiff, true]; (_this select 0) setVariable [QGVAR(ViewDiff), _viewDiff, true];
} else { } else {
(_this select 0) setVariable [QGVAR(ViewDiff), 0, true]; (_this select 0) setVariable [QGVAR(ViewDiff), 0, true];
}; };
}; };

View File

@ -2,11 +2,11 @@
#include "\z\ace\Addons\main\script_mod.hpp" #include "\z\ace\Addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_FCS #ifdef DEBUG_ENABLED_FCS
#define DEBUG_MODE_FULL #define DEBUG_MODE_FULL
#endif #endif
#ifdef DEBUG_SETTINGS_FCS #ifdef DEBUG_SETTINGS_FCS
#define DEBUG_SETTINGS DEBUG_SETTINGS_FCS #define DEBUG_SETTINGS DEBUG_SETTINGS_FCS
#endif #endif
#include "\z\ace\Addons\main\script_macros.hpp" #include "\z\ace\Addons\main\script_macros.hpp"

View File

@ -2,11 +2,11 @@
#include "\z\ace\Addons\main\script_mod.hpp" #include "\z\ace\Addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_FCS #ifdef DEBUG_ENABLED_FCS
#define DEBUG_MODE_FULL #define DEBUG_MODE_FULL
#endif #endif
#ifdef DEBUG_SETTINGS_FCS #ifdef DEBUG_SETTINGS_FCS
#define DEBUG_SETTINGS DEBUG_SETTINGS_FCS #define DEBUG_SETTINGS DEBUG_SETTINGS_FCS
#endif #endif
#include "\z\ace\Addons\main\script_macros.hpp" #include "\z\ace\Addons\main\script_macros.hpp"

View File

@ -1,81 +1,81 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2014-12-19 --> <!-- Edited with tabler - 2014-12-19 -->
<Project name="ACE"> <Project name="ACE">
<Package name="FCS"> <Package name="FCS">
<Key ID="STR_ACE_FCS_LaseTarget"> <Key ID="STR_ACE_FCS_LaseTarget">
<English>Lase Target / Measure Distance</English> <English>Lase Target / Measure Distance</English>
<German>Ziel anlasern / Entfernung Messen</German> <German>Ziel anlasern / Entfernung Messen</German>
<French>Télémétrer la cible</French> <French>Télémétrer la cible</French>
<Polish>Naświetl cel / Zmierz odległość</Polish> <Polish>Naświetl cel / Zmierz odległość</Polish>
<Czech>Označit cíl / Změřit vzdálenost</Czech> <Czech>Označit cíl / Změřit vzdálenost</Czech>
<Spanish>Iluminar objetivo / Medir distancia</Spanish> <Spanish>Iluminar objetivo / Medir distancia</Spanish>
<!-- Outdated <!-- Outdated
<Russian>Установить зероинг</Russian> <Russian>Установить зероинг</Russian>
<Hungarian>Lézeres célmegjelölés</Hungarian> <Hungarian>Lézeres célmegjelölés</Hungarian>
<Portuguese>Marcar Alvo</Portuguese> <Portuguese>Marcar Alvo</Portuguese>
<Italian>Designatore Laser</Italian> <Italian>Designatore Laser</Italian>
--> -->
<Russian>Подсветить цель / Измерить расстояние</Russian> <Russian>Подсветить цель / Измерить расстояние</Russian>
</Key> </Key>
<Key ID="STR_ACE_FCS_ZeroedTo"> <Key ID="STR_ACE_FCS_ZeroedTo">
<English>Zeroed To</English> <English>Zeroed To</English>
<German>Haltepunkt</German> <German>Haltepunkt</German>
<Spanish>Fijado a</Spanish> <Spanish>Fijado a</Spanish>
<Polish>Wyzerowany na</Polish> <Polish>Wyzerowany na</Polish>
<Czech>Nastaveno na</Czech> <Czech>Nastaveno na</Czech>
<French>Zéroté à</French> <French>Zéroté à</French>
<Russian>Зероинг</Russian> <Russian>Зероинг</Russian>
<Hungarian>Nullázás</Hungarian> <Hungarian>Nullázás</Hungarian>
<Portuguese>Fixado em</Portuguese> <Portuguese>Fixado em</Portuguese>
<Italian>Azzeramento a</Italian> <Italian>Azzeramento a</Italian>
</Key> </Key>
<Key ID="STR_ACE_FCS_AdjustRangeUp"> <Key ID="STR_ACE_FCS_AdjustRangeUp">
<English>Adjust FCS Range (Up)</English> <English>Adjust FCS Range (Up)</English>
<German>Entfernung des FLS erhöhen</German> <German>Entfernung des FLS erhöhen</German>
<Polish>Zwiększ zasięg FCS</Polish> <Polish>Zwiększ zasięg FCS</Polish>
<Spanish>Ajustar distancia del FCS (arriba)</Spanish> <Spanish>Ajustar distancia del FCS (arriba)</Spanish>
<Czech>Nastavit FCS Náměr (nahoru)</Czech> <Czech>Nastavit FCS Náměr (nahoru)</Czech>
<French>Augmenter la distance du SCT</French> <French>Augmenter la distance du SCT</French>
<Hungarian>FCS tartomány állítása (Fel)</Hungarian> <Hungarian>FCS tartomány állítása (Fel)</Hungarian>
<Portuguese>Ajustar distância do FCS (Acima)</Portuguese> <Portuguese>Ajustar distância do FCS (Acima)</Portuguese>
<Italian>Aumentare la distanza dell'FCS</Italian> <Italian>Aumentare la distanza dell'FCS</Italian>
<Russian>Диапазон СУО (Выше)</Russian> <Russian>Диапазон СУО (Выше)</Russian>
</Key> </Key>
<Key ID="STR_ACE_FCS_AdjustRangeDown"> <Key ID="STR_ACE_FCS_AdjustRangeDown">
<English>Adjust FCS Range (Down)</English> <English>Adjust FCS Range (Down)</English>
<German>Entfernung des FLS verringern</German> <German>Entfernung des FLS verringern</German>
<Polish>Zmniejsz zasięg FCS</Polish> <Polish>Zmniejsz zasięg FCS</Polish>
<Spanish>Ajustar distancia del FCS (abajo)</Spanish> <Spanish>Ajustar distancia del FCS (abajo)</Spanish>
<Czech>Nastavit FCS Náměr (dolů)</Czech> <Czech>Nastavit FCS Náměr (dolů)</Czech>
<French>Réduire la distance du SCT</French> <French>Réduire la distance du SCT</French>
<Hungarian>FCS tartomány állítása (Le)</Hungarian> <Hungarian>FCS tartomány állítása (Le)</Hungarian>
<Portuguese>Ajustar distância do FCS (Abaixo)</Portuguese> <Portuguese>Ajustar distância do FCS (Abaixo)</Portuguese>
<Italian>Ridurre la distanza dell'FCS</Italian> <Italian>Ridurre la distanza dell'FCS</Italian>
<Russian>Диапазон СУО (Ниже)</Russian> <Russian>Диапазон СУО (Ниже)</Russian>
</Key> </Key>
<Key ID="STR_ACE_FCS_ResetFCS"> <Key ID="STR_ACE_FCS_ResetFCS">
<English>Reset FCS</English> <English>Reset FCS</English>
<German>FLS zurücksetzen</German> <German>FLS zurücksetzen</German>
<Spanish>Reiniciar FCS</Spanish> <Spanish>Reiniciar FCS</Spanish>
<French>Réinitialiser le SCT</French> <French>Réinitialiser le SCT</French>
<Polish>Resetuj FCS</Polish> <Polish>Resetuj FCS</Polish>
<Czech>Resetovat FCS</Czech> <Czech>Resetovat FCS</Czech>
<Hungarian>FCS visszaállítása</Hungarian> <Hungarian>FCS visszaállítása</Hungarian>
<Portuguese>Reiniciar FCS</Portuguese> <Portuguese>Reiniciar FCS</Portuguese>
<Italian>Azzeramento dell'FCS</Italian> <Italian>Azzeramento dell'FCS</Italian>
<Russian>Обнулить СУО</Russian> <Russian>Обнулить СУО</Russian>
</Key> </Key>
<Key ID="STR_ACE_FCS_HasBeenReset"> <Key ID="STR_ACE_FCS_HasBeenReset">
<English>FCS has been reset.</English> <English>FCS has been reset.</English>
<German>FLS wurde zurückgesetzt.</German> <German>FLS wurde zurückgesetzt.</German>
<Spanish>FCS reiniciado</Spanish> <Spanish>FCS reiniciado</Spanish>
<French>SCT réinitialisé.</French> <French>SCT réinitialisé.</French>
<Polish>FCS został zresetowany.</Polish> <Polish>FCS został zresetowany.</Polish>
<Czech>FCS byl resetován.</Czech> <Czech>FCS byl resetován.</Czech>
<Hungarian>Az FCS visszaállítva</Hungarian> <Hungarian>Az FCS visszaállítva</Hungarian>
<Portuguese>FCS reiniciado.</Portuguese> <Portuguese>FCS reiniciado.</Portuguese>
<Italian>L'FCS è stato azzerato</Italian> <Italian>L'FCS è stato azzerato</Italian>
<Russian>СУО обнулен</Russian> <Russian>СУО обнулен</Russian>
</Key> </Key>
</Package> </Package>
</Project> </Project>