diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..0deca3d2ab
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,13 @@
+root = true
+
+[*]
+end_of_line = crlf
+insert_final_newline = true
+charset = utf-8
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = true
+
+[*.md]
+trim_trailing_whitespace = false
+
diff --git a/TO_MERGE/agm/Captives/agm_cabletie.p3d b/TO_MERGE/agm/Captives/agm_cabletie.p3d
deleted file mode 100644
index e0804b8c5f..0000000000
Binary files a/TO_MERGE/agm/Captives/agm_cabletie.p3d and /dev/null differ
diff --git a/TO_MERGE/agm/Captives/clientInit.sqf b/TO_MERGE/agm/Captives/clientInit.sqf
deleted file mode 100644
index bb7c5ebbb0..0000000000
--- a/TO_MERGE/agm/Captives/clientInit.sqf
+++ /dev/null
@@ -1,3 +0,0 @@
-// by commy2
-
-[missionNamespace, "playerChanged", {_this call AGM_Captives_fnc_handlePlayerChanged}] call AGM_Core_fnc_addCustomEventhandler;
diff --git a/TO_MERGE/agm/Captives/config.cpp b/TO_MERGE/agm/Captives/config.cpp
deleted file mode 100644
index 56b3f8bc32..0000000000
--- a/TO_MERGE/agm/Captives/config.cpp
+++ /dev/null
@@ -1,363 +0,0 @@
-class CfgPatches {
- class AGM_Captives {
- units[] = {};
- weapons[] = {"AGM_CableTie"};
- requiredVersion = 0.60;
- requiredAddons[] = {AGM_Core, AGM_Interaction};
- version = "0.95";
- versionStr = "0.95";
- versionAr[] = {0,95,0};
- author[] = {"commy2", "KoffeinFlummi"};
- authorUrl = "https://github.com/commy2/";
- };
-};
-
-class CfgFunctions {
- class AGM_Captives {
- class AGM_Captives {
- file = "\AGM_Captives\functions";
- class canFriskPerson;
- class canLoadCaptive;
- class canUnloadCaptive;
- class escortCaptive;
- class handleGetOut;
- class handleKnockedOut;
- class handlePlayerChanged;
- class handleWokeUp;
- class initPost;
- class initUnit;
- class loadCaptive;
- class openFriskMenu;
- class setCaptive;
- class surrender;
- class unloadCaptive;
- };
- };
-};
-
-//release escorted captive when entering a vehicle
-class Extended_GetIn_EventHandlers {
- class All {
- class AGM_Captives_AutoDetachCaptive {
- getIn = "if (local (_this select 2) && {(_this select 2) getVariable ['AGM_isEscorting', false]}) then {(_this select 2) setVariable ['AGM_isEscorting', false, true]}";
- };
- };
-};
-
-//reset captive animation after leaving vehicle
-class Extended_GetOut_EventHandlers {
- class All {
- class AGM_Captives_LeaveVehicle {
- getOut = "if (local (_this select 2) && {(_this select 2) getVariable ['AGM_isCaptive', false]}) then {_this call AGM_Captives_fnc_handleGetOut}";
- };
- };
-};
-
-//reset captivity and escorting status when getting killed
-class Extended_Killed_EventHandlers {
- class CAManBase {
- class AGM_Captives_AutoDetachCaptive {
- killed = "if ((_this select 0) getVariable ['AGM_isCaptive', false]) then {(_this select 0) setVariable ['AGM_isCaptive', false, true]}; if ((_this select 0) getVariable ['AGM_isEscorting', false]) then {(_this select 0) setVariable ['AGM_isEscorting', false, true]};";
- };
- };
-};
-
-//handle captive and unconsciousness state
-class Extended_Init_EventHandlers {
- class CAManBase {
- class AGM_Captives_AutoDetachCaptive {
- init = "_this call AGM_Captives_fnc_initUnit";
- };
- };
-};
-
-//mission start
-class Extended_InitPost_EventHandlers {
- class CAManBase {
- class AGM_Captives_InitPost {
- init = "if (local (_this select 0)) then {_this call AGM_Captives_fnc_initPost};";
- };
- };
-};
-
-class Extended_PostInit_EventHandlers {
- class AGM_Captives {
- clientInit = "call compile preprocessFileLineNumbers '\AGM_Captives\clientInit.sqf'";
- };
-};
-
-class AGM_Core_canInteractConditions {
- class AGM_Interaction_isNotEscorting {
- condition = "!(_player getVariable ['AGM_isEscorting', false])";
- };
- class AGM_Interaction_isNotCaptive {
- condition = "!(_player getVariable ['AGM_isCaptive', false])";
- };
- class AGM_Interaction_isNotSurrendering {
- condition = "!(_player getVariable ['AGM_isSurrender', false])";
- };
-};
-
-class CfgVehicles {
- class Man;
- class CAManBase: Man {
- class AGM_Actions {
- class AGM_SetCaptive {
- displayName = "$STR_AGM_Captives_SetCaptive";
- distance = 4;
- condition = "'AGM_CableTie' in items _player && {alive _target} && {!(_target getVariable ['AGM_isCaptive', false])}";
- statement = "player removeItem 'AGM_CableTie'; [_target, true] call AGM_Captives_fnc_setCaptive";
- showDisabled = 0;
- priority = 2.4;
- icon = "\AGM_Captives\UI\handcuff_ca.paa";
- hotkey = "C";
- };
- class AGM_ReleaseCaptive {
- displayName = "$STR_AGM_Captives_ReleaseCaptive";
- distance = 4;
- condition = "_target getVariable ['AGM_isCaptive', false] && {isNull (attachedTo _target)}";
- statement = "[_target, false] call AGM_Captives_fnc_setCaptive";
- exceptions[] = {"AGM_Interaction_isNotEscorting"};
- showDisabled = 0;
- priority = 2.4;
- icon = "\AGM_Captives\UI\handcuff_ca.paa";
- hotkey = "R";
- };
- class AGM_EscortCaptive {
- displayName = "$STR_AGM_Captives_EscortCaptive";
- distance = 4;
- condition = "_target getVariable ['AGM_isCaptive', false] && {isNull (attachedTo _target)} && {alive _target} && {!(_target getVariable ['AGM_isUnconscious', false])}";
- statement = "[_target, true] call AGM_Captives_fnc_escortCaptive";
- exceptions[] = {"AGM_Interaction_isNotEscorting"};
- showDisabled = 0;
- icon = "\AGM_Captives\UI\captive_ca.paa";
- priority = 2.3;
- hotkey = "E";
- };
- class AGM_StopEscorting {
- displayName = "$STR_AGM_Captives_StopEscorting";
- distance = 4;
- condition = "_target getVariable ['AGM_isCaptive', false] && {_target in attachedObjects _player}";
- statement = "[_target, false] call AGM_Captives_fnc_escortCaptive";
- exceptions[] = {"AGM_Interaction_isNotEscorting"};
- showDisabled = 0;
- icon = "\AGM_Captives\UI\captive_ca.paa";
- priority = 2.3;
- hotkey = "E";
- };
- class AGM_LoadCaptive {
- displayName = "$STR_AGM_Captives_LoadCaptive";
- distance = 4;
- condition = "[_player, _target, objNull] call AGM_Captives_fnc_canLoadCaptive";
- statement = "[_player, _target, objNull] call AGM_Captives_fnc_loadCaptive";
- exceptions[] = {"AGM_Interaction_isNotEscorting"};
- showDisabled = 0;
- icon = "\AGM_Captives\UI\captive_ca.paa";
- priority = 2.2;
- hotkey = "L";
- };
- class AGM_FriskPerson {
- displayName = "$STR_AGM_Captives_FriskPerson";
- distance = 2;
- condition = "[_player, _target] call AGM_Captives_fnc_canFriskPerson";
- statement = "[_player, _target] call AGM_Captives_fnc_openFriskMenu";
- showDisabled = 0;
- //icon = ""; //@todo
- priority = 3;
- hotkey = "F";
- };
- };
-
- class AGM_SelfActions {
- class AGM_StopEscortingSelf {
- displayName = "$STR_AGM_Captives_StopEscorting";
- condition = "(_player getVariable ['AGM_escortedUnit', objNull]) getVariable ['AGM_isCaptive', false] && {(_player getVariable ['AGM_escortedUnit', objNull]) in attachedObjects _player}";
- statement = "[_player getVariable ['AGM_escortedUnit', objNull], false] call AGM_Captives_fnc_escortCaptive;";
- exceptions[] = {"AGM_Interaction_isNotEscorting"};
- showDisabled = 0;
- priority = 2.3;
- hotkey = "C";
- };
- /*class AGM_LoadCaptiveSelf {
- displayName = "$STR_AGM_Captives_LoadCaptive";
- condition = "[_player, objNull, objNull] call AGM_Captives_fnc_canLoadCaptiveIntoVehicle";
- statement = "[_player, objNull, objNull] call AGM_Captives_fnc_loadCaptiveIntoVehicle";
- exceptions[] = {"AGM_Interaction_isNotEscorting"};
- showDisabled = 0;
- priority = 2.2;
- hotkey = "K";
- };*/
- };
- };
-
- #define MACRO_LOADUNLOADCAPTIVE \
- class AGM_Actions { \
- class AGM_LoadCaptive { \
- displayName = "$STR_AGM_Captives_LoadCaptive"; \
- distance = 4; \
- condition = "[_player, objNull, _target] call AGM_Captives_fnc_canLoadCaptive"; \
- statement = "[_player, objNull, _target] call AGM_Captives_fnc_loadCaptive"; \
- exceptions[] = {"AGM_Interaction_isNotEscorting"}; \
- showDisabled = 0; \
- priority = 1.2; \
- hotkey = "L"; \
- }; \
- class AGM_UnloadCaptive { \
- displayName = "$STR_AGM_Captives_UnloadCaptive"; \
- distance = 4; \
- condition = "[_player, _target] call AGM_Captives_fnc_canUnloadCaptive"; \
- statement = "[_player, _target] call AGM_Captives_fnc_unloadCaptive"; \
- showDisabled = 0; \
- priority = 1.2; \
- hotkey = "C"; \
- }; \
- };
-
- class LandVehicle;
- class Car: LandVehicle {
- MACRO_LOADUNLOADCAPTIVE
- };
- class Tank: LandVehicle {
- MACRO_LOADUNLOADCAPTIVE
- };
-
- class Air;
- class Helicopter: Air {
- MACRO_LOADUNLOADCAPTIVE
- };
- class Plane: Air {
- MACRO_LOADUNLOADCAPTIVE
- };
-
- class Ship;
- class Ship_F: Ship {
- MACRO_LOADUNLOADCAPTIVE
- };
-
- class StaticWeapon: LandVehicle {
- MACRO_LOADUNLOADCAPTIVE
- };
-
- class StaticMortar;
- class Mortar_01_base_F: StaticMortar {
- MACRO_LOADUNLOADCAPTIVE
- };
-
- #define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
- name = #ITEM; \
- count = COUNT; \
- };
-
- class Box_NATO_Support_F;
- class AGM_Box_Misc: Box_NATO_Support_F {
- class TransportItems {
- MACRO_ADDITEM(AGM_CableTie,12)
- };
- };
-};
-
-class CfgWeapons {
- class AGM_ItemCore;
- class InventoryItem_Base_F;
-
- class AGM_CableTie: AGM_ItemCore {
- displayName = "$STR_AGM_Captives_CableTie";
- descriptionShort = "$STR_AGM_Captives_CableTieDescription";
- model = "\AGM_Captives\agm_cabletie.p3d";
- picture = "\AGM_Captives\UI\agm_cabletie_x_ca.paa";
- scope = 2;
- class ItemInfo: InventoryItem_Base_F {
- mass = 1;
- };
- };
-};
-
-/*class CfgMovesBasic;
-class CfgMovesMaleSdr: CfgMovesBasic {
- class States {
- class CutSceneAnimationBase;
- class AmovPercMstpSnonWnonDnon_EaseIn: CutSceneAnimationBase {
- head = "headDefault";
- static = 1;
- disableWeapons = 0;
- forceAim = 0;
- InterpolateTo[] = {"AmovPercMstpSnonWnonDnon_EaseOut",0.02,"Unconscious",0.1};
- };
- class AmovPercMstpSnonWnonDnon_Ease: AmovPercMstpSnonWnonDnon_EaseIn {
- looped = 1;
- InterpolateTo[] = {"Unconscious",0.1};
- };
- class AmovPercMstpSnonWnonDnon_EaseOut: AmovPercMstpSnonWnonDnon_EaseIn {
- InterpolateTo[] = {"AmovPercMstpSnonWnonDnon_EaseIn",0.02,"Unconscious",0.1};
- };
-
- class AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon: CutSceneAnimationBase {
- InterpolateTo[] = {"Unconscious",0.01,"AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
- };
-
- class AmovPercMstpSsurWnonDnon: AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
- looped = 1;
- InterpolateTo[] = {"Unconscious",0.01};
- };
-
- class AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
- InterpolateTo[] = {"Unconscious",0.01,"AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
- };
- };
-};*/
-
-class CfgMovesBasic {
- class Actions {
- class CivilStandActions;
- class AGM_CivilStandCaptiveActions: CivilStandActions {
- turnL = "";
- turnR = "";
- stop = "AGM_AmovPercMstpScapWnonDnon";
- StopRelaxed = "AGM_AmovPercMstpScapWnonDnon";
- default = "AGM_AmovPercMstpScapWnonDnon";
- getOver = "";
- throwPrepare = "";
- throwGrenade[] = {"","Gesture"};
- };
- };
-};
-
-class CfgMovesMaleSdr: CfgMovesBasic {
- class StandBase;
- class States {
- class AmovPercMstpSnonWnonDnon: StandBase {
- ConnectTo[] += {"AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1};
- };
-
- class CutSceneAnimationBase;
- class AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon: CutSceneAnimationBase {
- actions = "AGM_CivilStandCaptiveActions";
- file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_EaseIn";
- speed = 1;
- looped = 0;
- interpolationRestart = 2;
- ConnectTo[] = {"AGM_AmovPercMstpScapWnonDnon",0.1};
- InterpolateTo[] = {"Unconscious",0.01,"AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
- };
-
- class AGM_AmovPercMstpScapWnonDnon: AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
- file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_Ease";
- speed = 0;
- ConnectTo[] = {"AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
- InterpolateTo[] = {"Unconscious",0.01};
- looped = 1;
- };
-
- class AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon: AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
- actions = "CivilStandActions";
- file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\amovpercmstpsnonwnondnon_easeout";
- ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
- InterpolateTo[] = {"Unconscious",0.01,"AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1};
- };
- };
-};
-
-/*
-player playMove "AGM_AmovPercMstpScapWnonDnon";
-player switchMove "AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon";
-*/
diff --git a/TO_MERGE/agm/Captives/functions/fn_canFriskPerson.sqf b/TO_MERGE/agm/Captives/functions/fn_canFriskPerson.sqf
deleted file mode 100644
index 77ad6f6446..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_canFriskPerson.sqf
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * By: bux578
- *
- * Checks the conditions for being able to frisk a unit
- *
- * Arguments:
- * 0: caller (player) (Object)
- * 1: target (Object)
- *
- * Return Value:
- * Boolean
- */
-
-private ["_unit", "_target"];
-
-_unit = _this select 0;
-_target = _this select 1;
-
- _target getVariable ["AGM_isCaptive", false]
-|| {_target getVariable ["AGM_isSearchable", false]}
-|| {_target getVariable ["AGM_isUnconscious", false]}
diff --git a/TO_MERGE/agm/Captives/functions/fn_canLoadCaptive.sqf b/TO_MERGE/agm/Captives/functions/fn_canLoadCaptive.sqf
deleted file mode 100644
index 637a4889af..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_canLoadCaptive.sqf
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Author: commy2
- *
- * Check if the unit can load the target object into a vehicle.
- *
- * Argument:
- * 0: Unit that wants to load a captive (Object)
- * 1: A captive. ObjNull for the first escorted captive (Object)
- * 2: Vehicle to load the captive into. ObjNull for the nearest vehicle (Object)
- *
- * Return value:
- * Boolean (Bool)
- */
-
-private ["_unit", "_target", "_vehicle", "_objects"];
-
-_unit = _this select 0;
-_target = _this select 1;
-_vehicle = _this select 2;
-
-if (isNull _target) then {
- _objects = attachedObjects _unit;
- _objects = [_objects, {_this getVariable ["AGM_isCaptive", false]}] call AGM_Core_fnc_filter;
- _target = _objects select 0;
-};
-
-if (isNull _vehicle) then {
- _objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship_F"], 10];
- _vehicle = _objects select 0;
-};
-
-_unit getVariable ["AGM_isEscorting", false]
-&& {!isNil "_target"}
-&& {!isNil "_vehicle"}
-&& {_vehicle emptyPositions "cargo" > 0}
diff --git a/TO_MERGE/agm/Captives/functions/fn_canUnloadCaptive.sqf b/TO_MERGE/agm/Captives/functions/fn_canUnloadCaptive.sqf
deleted file mode 100644
index 8c52bac0b0..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_canUnloadCaptive.sqf
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Author: commy2
- *
- * Check if the unit can unload a captive from the vehicle.
- *
- * Argument:
- * 0: Unit that wants to unload a captive (Object)
- * 1: Vehicle to unload a captive from. (Object)
- *
- * Return value:
- * Boolean (Bool)
- */
-
-private ["_unit", "_vehicle", "_cargo"];
-
-_unit = _this select 0;
-_vehicle = _this select 1;
-
-_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway.
-
-_cargo = [_cargo, {_this getVariable ["AGM_isCaptive", false]}] call AGM_Core_fnc_filter;
-
-count _cargo > 0
diff --git a/TO_MERGE/agm/Captives/functions/fn_escortCaptive.sqf b/TO_MERGE/agm/Captives/functions/fn_escortCaptive.sqf
deleted file mode 100644
index 55244cf2f8..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_escortCaptive.sqf
+++ /dev/null
@@ -1,43 +0,0 @@
-//author : Nic547
-//Attaches a Captive to the player
-
-private ["_unit", "_state"];
-
-_unit = _this select 0;
-_state = _this select 1;
-
-if !("AGM_Handcuffed" in ([_unit] call AGM_Core_fnc_getCaptivityStatus)) exitWith {
- [localize "STR_AGM_Captives_NoCaptive"] call AGM_Core_fnc_displayTextStructured;
-};
-
-if (_state) then {
- if (player getVariable ["AGM_isEscorting", false]) exitWith {};
-
- [player, _unit] call AGM_Core_fnc_claim;
- player setVariable ["AGM_isEscorting", true, true];
-
- _unit attachTo [player, [0, 1, 0]];
-
- player setVariable ["AGM_escortedUnit", _unit, true];
- _actionID = player addAction [format ["%1", localize "STR_AGM_Captives_StopEscorting"], "[player getVariable ['AGM_escortedUnit', objNull], false] call AGM_Captives_fnc_escortCaptive;", nil, 20, false, true, "", "!isNull (player getVariable ['AGM_escortedUnit', objNull])"];
-
- [_unit, _actionID] spawn {
- _unit = _this select 0;
- _actionID = _this select 1;
-
- while {player getVariable ["AGM_isEscorting", false]} do {
- sleep 0.2;
-
- if (!alive _unit || {!alive player} || {!canStand _unit} || {!canStand player} || {_unit getVariable ["AGM_isUnconscious", false]} || {player getVariable ["AGM_isUnconscious", false]} || {!isNull (attachedTo player)}) then {
- player setVariable ["AGM_isEscorting", false, true];
- };
- };
- [objNull, _unit] call AGM_Core_fnc_claim;
-
- detach _unit;
- player removeAction _actionID;
- };
-} else {
- player setVariable ["AGM_isEscorting", false, true];
- player setVariable ["AGM_escortedUnit", objNull, true];
-};
diff --git a/TO_MERGE/agm/Captives/functions/fn_handleGetOut.sqf b/TO_MERGE/agm/Captives/functions/fn_handleGetOut.sqf
deleted file mode 100644
index 0cb88b0a8e..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_handleGetOut.sqf
+++ /dev/null
@@ -1,14 +0,0 @@
-// by commy2
-
-private ["_vehicle", "_unit", "_cargoIndex"];
-
-_vehicle = _this select 0;
-_unit = _this select 2;
-
-_cargoIndex = _unit getVariable ["AGM_Captives_CargoIndex", -1];
-
-if (_cargoIndex != -1) exitWith {
- _unit moveInCargo [_vehicle, _cargoIndex];
-};
-
-[_unit, 'AGM_AmovPercMstpScapWnonDnon', 2] call AGM_Core_fnc_doAnimation;
diff --git a/TO_MERGE/agm/Captives/functions/fn_handleKnockedOut.sqf b/TO_MERGE/agm/Captives/functions/fn_handleKnockedOut.sqf
deleted file mode 100644
index 3257d544ca..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_handleKnockedOut.sqf
+++ /dev/null
@@ -1,2 +0,0 @@
-// by commy2
-
diff --git a/TO_MERGE/agm/Captives/functions/fn_handlePlayerChanged.sqf b/TO_MERGE/agm/Captives/functions/fn_handlePlayerChanged.sqf
deleted file mode 100644
index 5bece824f9..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_handlePlayerChanged.sqf
+++ /dev/null
@@ -1,12 +0,0 @@
-// by commy2
-
-private ["_unit", "_oldUnit"];
-
-_unit = _this select 0;
-_oldUnit = _this select 1;
-
-if (_unit getVariable ["AGM_isCaptive", false]) then {
- showHUD false;
-} else {
- showHUD true;
-};
diff --git a/TO_MERGE/agm/Captives/functions/fn_handleWokeUp.sqf b/TO_MERGE/agm/Captives/functions/fn_handleWokeUp.sqf
deleted file mode 100644
index facbf9b31f..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_handleWokeUp.sqf
+++ /dev/null
@@ -1,10 +0,0 @@
-// by commy2
-
-private "_unit";
-
-_unit = _this select 0;
-
-if (_unit getVariable ["AGM_isCaptive", false] && {vehicle _unit == _unit}) then {
- [_unit] call AGM_Core_fnc_fixLoweredRifleAnimation;
- [_unit, "AGM_AmovPercMstpScapWnonDnon", 0] call AGM_Core_fnc_doAnimation;
-};
diff --git a/TO_MERGE/agm/Captives/functions/fn_initPost.sqf b/TO_MERGE/agm/Captives/functions/fn_initPost.sqf
deleted file mode 100644
index 73c9674f7a..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_initPost.sqf
+++ /dev/null
@@ -1,11 +0,0 @@
-// by commy2
-
-private "_unit";
-
-_unit = _this select 0;
-
-// reset status on mission start
-if (_unit getVariable ["AGM_isCaptive", false]) then {
- _unit setVariable ["AGM_isCaptive", false];
- [_unit, true] call AGM_Captives_fnc_setCaptive;
-};
diff --git a/TO_MERGE/agm/Captives/functions/fn_initUnit.sqf b/TO_MERGE/agm/Captives/functions/fn_initUnit.sqf
deleted file mode 100644
index 76d4671b7f..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_initUnit.sqf
+++ /dev/null
@@ -1,12 +0,0 @@
-// by commy2
-
-[_this select 0, "knockedOut", {
- if (local (_this select 0)) then {_this call AGM_Captives_fnc_handleKnockedOut};
-}] call AGM_Core_fnc_addCustomEventhandler;
-
-[_this select 0, "wokeUp", {
- if (local (_this select 0)) then {_this call AGM_Captives_fnc_handleWokeUp};
-}] call AGM_Core_fnc_addCustomEventhandler;
-
-// prevent players from throwing grenades
-[_this select 0, "Throw", {(_this select 1) getVariable ["AGM_isCaptive", false]}, {}] call AGM_Core_fnc_addActionEventhandler;
diff --git a/TO_MERGE/agm/Captives/functions/fn_loadCaptive.sqf b/TO_MERGE/agm/Captives/functions/fn_loadCaptive.sqf
deleted file mode 100644
index 12bcb35f9b..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_loadCaptive.sqf
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Author: commy2
- *
- * Unit loads the target object into a vehicle.
- *
- * Argument:
- * 0: Unit that wants to load a captive (Object)
- * 1: A captive. ObjNull for the first escorted captive (Object)
- * 2: Vehicle to load the captive into. ObjNull for the nearest vehicle (Object)
- *
- * Return value:
- * Nothing
- */
-
-private ["_unit", "_target", "_vehicle", "_objects"];
-
-_unit = _this select 0;
-_target = _this select 1;
-_vehicle = _this select 2;
-
-if (isNull _target) then {
- _objects = attachedObjects _unit;
- _objects = [_objects, {_this getVariable ["AGM_isCaptive", false]}] call AGM_Core_fnc_filter;
- _target = _objects select 0;
-};
-
-if (isNull _vehicle) then {
- _objects = nearestObjects [_unit, ["Car_F", "Tank_F", "Helicopter_F", "Boat_F", "Plane_F"], 10];
- _vehicle = _objects select 0;
-};
-
-if (!isNil "_target" && {!isNil "_vehicle"}) then {
- _unit setVariable ["AGM_isEscorting", false];
- [[_target, _vehicle], "{(_this select 0) moveInCargo (_this select 1); (_this select 0) assignAsCargo (_this select 1); (_this select 0) setVariable ['AGM_Captives_CargoIndex', (_this select 1) getCargoIndex (_this select 0), true];}", _target] call AGM_Core_fnc_execRemoteFnc;
-};
diff --git a/TO_MERGE/agm/Captives/functions/fn_openFriskMenu.sqf b/TO_MERGE/agm/Captives/functions/fn_openFriskMenu.sqf
deleted file mode 100644
index c7f60ba2e6..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_openFriskMenu.sqf
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- Name: AGM_Captives_fnc_openFriskMenu
-
- Author: bux578
-
- Description:
- Open the select menu with the "personal" items of a frisked unit
- It only shows "handgunWeapon", "uniformItems", "vestItems", "backpackItems" and "assignedItems" because every other item is visible on the character
-
- Parameters:
- 0: Object - player unit
- 1: Object - unit
-
- Returns:
- Nothing
-*/
-
-private ["_player", "_unit", "_weapon", "_listedItemClasses", "_actions", "_allGear"];
-
-_player = _this select 0;
-_unit = _this select 1;
-
-_weapon = currentWeapon _player;
-if (_weapon == primaryWeapon _player && {_weapon != ""}) then {
- [_player, "AmovPercMstpSlowWrflDnon", 0] call AGM_Core_fnc_doAnimation;
-};
-
-_listedItemClasses = [];
-
-_actions = [localize "STR_AGM_Captives_FriskMenuHeader", localize "STR_AGM_Captives_CancelSelection"] call AGM_Interaction_fnc_prepareSelectMenu;
-
-_allGear = [];
-
-if ((handgunWeapon _unit) != "") then {
- _allGear pushBack (handgunWeapon _unit);
-};
-if (count (uniformItems _unit) > 0) then {
- _allGear = _allGear + (uniformItems _unit);
-};
-if (count (vestItems _unit) > 0) then {
- _allGear = _allGear + (vestItems _unit);
-};
-if (count (backpackItems _unit) > 0) then {
- _allGear = _allGear + (backpackItems _unit);
-};
-if (count (assignedItems _unit) > 0) then {
- _allGear = _allGear + (assignedItems _unit);
-};
-
-// Handgun
-// Uniform Items
-// Vest Items
-// Backpack Items
-// Assigned Items
-{
- if (!(_x in _listedItemClasses)) then {
- private "_item";
- _item = configFile >> "CfgMagazines" >> _x;
- if (isNil "_item" || str _item == "") then { //str _item ?
- _item = configFile >> "CfgWeapons" >> _x;
- };
- _actions = [_actions, getText(_item >> "displayName"), getText(_item >> "picture"), _x] call AGM_Interaction_fnc_addSelectableItem;
- _listedItemClasses pushBack _x;
- };
-} forEach (_allGear);
-
-[_actions, {call AGM_Interaction_fnc_hideMenu;}, {call AGM_Interaction_fnc_hideMenu;}] call AGM_Interaction_fnc_openSelectMenu;
-
-// don't need an "Ok" Button
-ctrlShow [8860, false];
diff --git a/TO_MERGE/agm/Captives/functions/fn_setCaptive.sqf b/TO_MERGE/agm/Captives/functions/fn_setCaptive.sqf
deleted file mode 100644
index a2e4ed7e3e..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_setCaptive.sqf
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Author: Nic547, commy2
- *
- * Makes a civilian unable to move.
- *
- * Argument:
- * 0: Unit (Object)
- * 1: True to take captive, false to release captive (Object)
- *
- * Return value:
- * Nothing
- */
-
-private ["_unit", "_state"];
-
-_unit = _this select 0;
-_state = _this select 1;
-
-if (!local _unit) exitWith {[[_unit, _state, true], _fnc_scriptName, _unit] call AGM_Core_fnc_execRemoteFnc};
-
-if (_state) then {
- if (_unit getVariable ["AGM_isCaptive", false]) exitWith {};
-
- _unit setVariable ["AGM_isCaptive", true, true];
-
- // fix anim on mission start (should work on dedicated servers)
- _unit spawn {
- [_this, "AGM_Handcuffed", true] call AGM_Core_fnc_setCaptivityStatus;
-
- if (_this getVariable ["AGM_isCaptive", false] && {vehicle _this == _this}) then {
- [_this] call AGM_Core_fnc_fixLoweredRifleAnimation;
- [_this, "AGM_AmovPercMstpScapWnonDnon", 0] spawn AGM_Core_fnc_doAnimation;
- };
- };
-
- _unit setVariable ["AGM_Captives_CargoIndex", vehicle _unit getCargoIndex _unit, true];
-
- if (_unit == AGM_player) then {
- showHUD false;
- };
-} else {
- if !(_unit getVariable ["AGM_isCaptive", false]) exitWith {};
-
- _unit setVariable ["AGM_isCaptive", false, true];
- [_unit, "AGM_Handcuffed", false] call AGM_Core_fnc_setCaptivityStatus;
- if (vehicle _unit == _unit) then {
- [_unit, "AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call AGM_Core_fnc_doAnimation;
- };
-
- if (_unit getVariable ["AGM_Captives_CargoIndex", -1] != -1) then {
- _unit setVariable ["AGM_Captives_CargoIndex", -1, true];
- };
-
- if (_unit == AGM_player) then {
- showHUD true;
- };
-};
diff --git a/TO_MERGE/agm/Captives/functions/fn_surrender.sqf b/TO_MERGE/agm/Captives/functions/fn_surrender.sqf
deleted file mode 100644
index 9ba1dbcfc2..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_surrender.sqf
+++ /dev/null
@@ -1,50 +0,0 @@
-// by commy2
-
-private ["_unit", "_state"];
-
-_unit = _this select 0;
-_state = _this select 1;
-
-if (!local _unit) exitWith {[_this, _fnc_scriptName, _unit] call AGM_Core_fnc_execRemoteFnc};
-
-if (_state) then {
- if (_unit getVariable ["AGM_isSurrender", false]) exitWith {};
-
- _unit setVariable ["AGM_isSurrender", true, true];
- [_unit, "AGM_Surrendered", true] call AGM_Core_fnc_setCaptivityStatus;
-
- _unit spawn {
- // fix for lowered rifle animation glitch
- if (currentWeapon _this != "" && {currentWeapon _this == primaryWeapon _this} && {weaponLowered _this} && {stance _this == "STAND"}) then {
- _this playMove "amovpercmstpsraswrfldnon";
- };
-
- while {_this getVariable ["AGM_isSurrender", false]} do {
- sleep 0.001; //sleep in UI
-
- if (isPlayer _this) then {showHUD false};
-
- if (!alive _this || {_this getVariable ["AGM_isUnconscious", false]}) then {
- _this setVariable ["AGM_isSurrender", false, true];
- } else {
- _this playMove "amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon";
- };
- };
- if !(_this getVariable ["AGM_isUnconscious", false]) then {
- _this playMoveNow "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
- } else {
- _this playMoveNow "unconscious";
- };
-
- [_this, "AGM_Surrendered", false] call AGM_Core_fnc_setCaptivityStatus;
-
- if (isPlayer _this) then {showHUD true};
- };
-} else {
- _unit setVariable ["AGM_isSurrender", false, true];
-};
-
-/*
-player playMove "AmovPercMstpSsurWnonDnon"
-player switchMove "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon"
-*/
diff --git a/TO_MERGE/agm/Captives/functions/fn_unloadCaptive.sqf b/TO_MERGE/agm/Captives/functions/fn_unloadCaptive.sqf
deleted file mode 100644
index e7849f1c0e..0000000000
--- a/TO_MERGE/agm/Captives/functions/fn_unloadCaptive.sqf
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Author: commy2
- *
- * Unit unloads a captive from a vehicle.
- *
- * Argument:
- * 0: Unit that wants to unload a captive (Object)
- * 1: Vehicle to unload a captive from. (Object)
- *
- * Return value:
- * Nothing
- */
-
-private ["_unit", "_vehicle", "_cargo", "_target"];
-
-_unit = _this select 0;
-_vehicle = _this select 1;
-
-_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway.
-
-_cargo = [_cargo, {_this getVariable ["AGM_isCaptive", false]}] call AGM_Core_fnc_filter;
-
-if (count _cargo > 0) then {
- _target = _cargo select 0;
-
- _target setVariable ["AGM_Captives_CargoIndex", -1, true];
-
- moveOut _target;
- [_target, "AGM_AmovPercMstpScapWnonDnon", 2] call AGM_Core_fnc_doAnimation;
- [_target, "{unassignVehicle _this}", _target] call AGM_Core_fnc_execRemoteFnc;
-};
diff --git a/TO_MERGE/cse/sys_misc/functions/fn_moduleAmbianceSoundLoop.sqf b/TO_MERGE/cse/sys_misc/functions/fn_moduleAmbianceSoundLoop.sqf
deleted file mode 100644
index 4b4d93d453..0000000000
--- a/TO_MERGE/cse/sys_misc/functions/fn_moduleAmbianceSoundLoop.sqf
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * fn_moduleAmbianceSoundLoop.sqf
- * @Descr: N/A
- * @Author: Glowbal
- *
- * @Arguments: []
- * @Return:
- * @PublicAPI: false
- */
-
-private ["_logic", "_units", "_activated","_ambianceSounds", "_soundFiles", "_minimalDistance","_maximalDistance", "_minimalDistance", "_maxDelayBetweenSounds", "_allUnits", "_newPos", "_targetUnit", "_soundToPlay", "_soundPath", "_unparsedSounds", "_list", "_splittedList", "_nilCheckPassedList"];
-_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
-_units = [_this,1,[],[[]]] call BIS_fnc_param;
-_activated = [_this,2,true,[true]] call BIS_fnc_param;
-
-if (_activated && isServer) then {
- _ambianceSounds = [];
- _unparsedSounds = _logic getvariable ["soundFiles", ""];
- _minimalDistance = (_logic getvariable ["minimalDistance", 400]) max 1;
- _maximalDistance = (_logic getvariable ["maximalDistance", 10]) max _minimalDistance;
- _minDelayBetweensounds = (_logic getvariable ["minimalDelay", 10]) max 1;
- _maxDelayBetweenSounds = (_logic getvariable ["maximalDelay", 170]) max _minDelayBetweensounds;
- _volume = (_logic getvariable ["soundVolume", 30]) max 1;
- _followPlayers = _logic getvariable ["followPlayers", false];
-
- _splittedList = [_unparsedSounds, ","] call BIS_fnc_splitString;
-
- _nilCheckPassedList = "";
- {
- _x = [_x] call cse_fnc_string_removeWhiteSpace;
- _splittedList set [_foreachIndex, _x];
- }foreach _splittedList;
-
- _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
- {
- if (isclass (missionConfigFile >> "CfgSounds" >> _x)) then {
- _ambianceSounds pushback (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0));
- } else {
- if (isclass (configFile >> "CfgSounds" >> _x)) then {
- _ambianceSounds pushback ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
- };
- };
- }foreach _splittedList;
-
- if (count _ambianceSounds == 0) exitwith {
- [format["No Ambiance sounds available"]] call cse_fnc_debug;
- };
- {
- if !([".", _x, true] call BIS_fnc_inString) then {
- [format["Ambiance soundfile does not contain a file extension %1", _x]] call cse_fnc_debug;
- _ambianceSounds set [_foreachIndex, _x + ".wss"];
- };
- }foreach _ambianceSounds;
- [format["Ambiance sounds %1", _ambianceSounds]] call cse_fnc_debug;
-
- while {alive _logic} do {
- _allUnits = switch (true) do {
- case isMultiplayer: {playableUnits};
- case isDedicated: {[_logic]};
- default {[player]};
- };
-
- if (count _allUnits > 0) then {
- _targetUnit = _allUnits select (round(random((count _allUnits)-1)));
-
- _newPos = (getPos _targetUnit);
- if (!_followPlayers) then {
- _newPos = getPos _logic;
- };
-
- if (random(1) >= 0.5) then {
- if (random(1) >= 0.5) then {
- _newPos set [0, (_newPos select 0) + (_minimalDistance + random(_maximalDistance))];
- } else {
- _newPos set [0, (_newPos select 0) - (_minimalDistance + random(_maximalDistance))];
- };
- } else {
- if (random(1) >= 0.5) then {
- _newPos set [1, (_newPos select 1) + (_minimalDistance + random(_maximalDistance))];
- } else {
- _newPos set [1, (_newPos select 1) - (_minimalDistance + random(_maximalDistance))];
- };
- };
-
- if ({(_newPos distance _x < (_minimalDistance / 2))}count _allUnits == 0) then {
-
- _soundToPlay = _ambianceSounds select (round(random((count _ambianceSounds)-1)));
- playSound3D [_soundToPlay, _targetUnit, false, _newPos, _volume, 1, 1000];
-
- [format["Played a sound %1", _soundToPlay]] call cse_fnc_debug;
-
- sleep (_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds;
- };
- };
- };
-};
-
-true;
\ No newline at end of file
diff --git a/addons/aircraft/CfgAmmo.hpp b/addons/aircraft/CfgAmmo.hpp
index 2c9d6a91e6..177753223f 100644
--- a/addons/aircraft/CfgAmmo.hpp
+++ b/addons/aircraft/CfgAmmo.hpp
@@ -1,302 +1,43 @@
class CfgAmmo {
- class BulletBase;
- class B_20mm: BulletBase {
- deflecting = 3;
- hit = 100;
- indirectHit = 10;
- indirectHitRange = 2;
- model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
- };
-
+ // adjust minigun caliber and deflection to other ammo
class SubmunitionBullet;
class B_65x39_Minigun_Caseless: SubmunitionBullet {
- hit = 10;
- indirectHit = 0;
- indirectHitRange = 0;
caliber = 1;
- deflecting = 5;
- typicalSpeed = 850;
+ deflecting = 15;
};
class B_762x51_Minigun_Tracer_Red: SubmunitionBullet {
- hit = 12;
- indirectHit = 0;
- indirectHitRange = 0;
- model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
caliber = 1.6;
- deflecting = 5;
- typicalSpeed = 850;
- };
-
- class M_Titan_AA;
- class M_Zephyr: M_Titan_AA {
- proxyShape = "\A3\Weapons_F\Ammo\Missile_AA_02_F.p3d";
- model = "\A3\Weapons_F\Ammo\Missile_AA_02_fly_F.p3d";
- airFriction = 0.078;
- sideAirFriction = 0.18;
- maneuvrability = 24;
- class CamShakeFire {};
- class CamShakePlayerFire {};
- };
-
- class M_Zephyr_Mi06: M_Zephyr {
- maverickWeaponIndexOffset = 6;
- };
-
- class MissileBase;
- class M_Air_AA: MissileBase {
- model = "\A3\Weapons_F\Ammo\Missile_AT_02_fly_F";
- proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_02_F";
- hit = 280;
- indirectHit = 85;
- indirectHitRange = 10;
- maneuvrability = 27;
- simulationStep = 0.002;
- airLock = 1;
- irLock = 1;
- cost = 1500;
- //maxSpeed = 2400;
- timeToLive = 40;
- airFriction = 0.05;
- sideAirFriction = 0.1;
- trackOversteer = 1;
- trackLead = 1;
- initTime = 0;
- thrustTime = 12;
- thrust = 340;
- fuseDistance = 500;
- weaponLockSystem = "2 + 16";
- maxControlRange = 8000;
- class CamShakeExplode {};
- class CamShakeHit {};
- class CamShakeFire {};
- class CamShakePlayerFire {};
- };
-
- class Missile_AA_04_F: MissileBase {
- hit = 800;
- indirectHit = 60;
- indirectHitRange = 12;
- airLock = 2;
- irLock = 1;
- laserLock = 0;
- nvLock = 0;
- weaponLockSystem = "2 + 16";
- cmimmunity = 0.8;
- initTime = 0;
- thrust = 380;
- thrustTime = 9.5;
- airFriction = 0.04;
- sideAirFriction = 0.08;
- //maxSpeed = 2600;
- maneuvrability = 14;
- simulationStep = 0.002;
- fuseDistance = 500;
- timeToLive = 19;
- trackLead = 1;
- trackOversteer = 1;
+ deflecting = 15;
};
+ // also adjust tracer, "muh lightshow"; also adjust splash damage radius
+ class BulletBase;
class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
- model = "\A3\Weapons_f\Data\bullettracer\tracer_red.p3d";
- cost = 20;
hit = 80;
indirectHit = 12;
- indirectHitRange = 3;
+ indirectHitRange = 3; //2;
caliber = 1.4;
- explosive = 0.6;
- airlock = 1;
deflecting = 3;
- airFriction = -0.00042;
- typicalSpeed = 960;
- visibleFire = 32;
- audibleFire = 32;
- visibleFireTime = 3;
fuseDistance = 3;
- tracerScale = 2.5;
tracerStartTime = 0.02;
- tracerEndTime = 4.7;
- multiSoundHit[] = {"soundHit1",0.2,"soundHit2",0.2,"soundHit3",0.2,"soundHit4",0.1,"soundHit5",0.15,"soundHit6",0.15};
- soundFly[] = {"A3\Sounds_F\weapons\Explosion\cannon_fly",1,1,50};
- explosionSoundEffect = "DefaultExplosion";
- explosionEffects = "ExploAmmoExplosion";
- craterEffects = "ExploAmmoCrater";
- soundHit1[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_1",3.16228,1,1600};
- soundHit2[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_2",3.16228,1,1600};
- soundHit3[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_3",3.16228,1,1600};
- soundHit4[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_4",3.16228,1,1600};
- soundHit5[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_5",3.16228,1,1600};
- soundHit6[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_6",3.16228,1,1600};
- class CamShakeExplode {};
- class CamShakeHit {};
- class CamShakeFire {};
- class CamShakePlayerFire {};
};
+
+ // helper projectiles to simulate a rof > fps
class ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy: Gatling_30mm_HE_Plane_CAS_01_F {
simulation = "shotSubmunitions";
triggerTime = 0;
submunitionAmmo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Sub";
submunitionConeType[] = {"custom", {{0,0}, {0,0}, {0,0}} };
};
- class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {
- };
+ class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {};
+
+ // adjust damage and splash damage, closer to bluefor gatling with same caliber
class Cannon_30mm_HE_Plane_CAS_02_F: Gatling_30mm_HE_Plane_CAS_01_F {
- model = "\A3\Weapons_f\Data\bullettracer\tracer_green.p3d";
- hit = 70;
- indirectHit = 11;
+ hit = 70; //40;
+ indirectHit = 11; //14;
indirectHitRange = 3;
- caliber = 2;
- explosive = 0.6;
};
-
- class Missile_AGM_02_F: MissileBase {
- model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_02_fly_F.p3d";
- proxyShape = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_02_F.p3d";
- maverickWeaponIndexOffset = 2;
- cost = 1500;
- hit = 2100;
- indirectHit = 85;
- indirectHitRange = 8;
- manualControl = 0;
- maxControlRange = 8000;
- airLock = 0;
- irLock = 1;
- laserLock = 0;
- nvLock = 0;
- weaponLockSystem = "2 + 16";
- cmimmunity = 0.8;
- initTime = 0;
- thrust = 240;
- thrustTime = 5;
- airFriction = 0.05;
- sideAirFriction = 0.1;
- maxSpeed = 828;
- maneuvrability = 27;
- simulationStep = 0.002;
- fuseDistance = 500;
- timeToLive = 40;
- trackLead = 1;
- trackOversteer = 1;
- craterEffects = "AAMissileCrater";
- effectsMissile = "missile3";
- explosionEffects = "AAMissileExplosion";
- muzzleEffect = "BIS_fnc_effectFiredHeliRocket";
- whistleDist = 20;
- class CamShakeExplode {};
- class CamShakeHit {};
- class CamShakeFire {};
- class CamShakePlayerFire {};
- };
-
- class LaserBombCore;
- class Bomb_04_F: LaserBombCore {
- model = "\A3\Weapons_F_EPC\Ammo\Bomb_04_fly_F.p3d";
- proxyShape = "\A3\Weapons_F_EPC\Ammo\Bomb_04_F.p3d";
- maverickWeaponIndexOffset = 8;
- hit = 6000;
- indirectHit = 1400;
- indirectHitRange = 15;
- nvLock = 1;
- weaponLockSystem = "2 + 16 + 4";
- maneuvrability = 20;
- fuseDistance = 35;
- trackLead = 0.95;
- trackOversteer = 1;
- craterEffects = "BombCrater";
- explosionEffects = "BombExplosion";
- explosionSoundEffect = "DefaultExplosion";
- explosionTime = 2;
- multiSoundHit[] = {"soundHit1",0.2,"soundHit2",0.2,"soundHit3",0.2,"soundHit4",0.2,"soundHit5",0.2};
- soundHit1[] = {"\A3\Sounds_F\weapons\Explosion\expl_big_1",2.51189,1,2400};
- soundHit2[] = {"\A3\Sounds_F\weapons\Explosion\expl_big_2",2.51189,1,2400};
- soundHit3[] = {"\A3\Sounds_F\weapons\Explosion\expl_big_3",2.51189,1,2400};
- soundHit4[] = {"\A3\Sounds_F\weapons\Explosion\expl_shell_1",2.51189,1,2400};
- soundHit5[] = {"\A3\Sounds_F\weapons\Explosion\expl_shell_2",2.51189,1,2400};
- whistleDist = 24;
- };
-
- class Rocket_04_HE_F: MissileBase {
- model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_HE_fly_F.p3d";
- proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_04_HE_F.p3d";
- maverickWeaponIndexOffset = 12;
- cost = 500;
- hit = 210;
- indirectHit = 55;
- indirectHitRange = 15;
- manualControl = 0;
- maxControlRange = 8000;
- airLock = 0;
- irLock = 1;
- laserLock = 0;
- nvLock = 0;
- weaponLockSystem = 0;
- cmimmunity = 1;
- initTime = 0.002;
- thrust = 1600;
- thrustTime = 0.7;
- airFriction = 0.0046;
- sideAirFriction = 0.005;
- maxSpeed = 610;
- maneuvrability = 0;
- fuseDistance = 50;
- timeToLive = 60;
- effectsMissileInit = "MissileDAR1";
- whistleDist = 30;
- class CamShakeExplode {};
- class CamShakeHit {};
- class CamShakeFire {};
- class CamShakePlayerFire {};
- };
-
- class Rocket_04_AP_F: Rocket_04_HE_F {
- model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_AP_fly_F.p3d";
- proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_04_AP_F.p3d";
- maverickWeaponIndexOffset = 19;
- hit = 400;
- indirectHit = 20;
- indirectHitRange = 10;
- };
-
- class Missile_AA_03_F: Missile_AA_04_F {
- model = "\A3\Weapons_F_EPC\Ammo\Missile_AA_03_fly_F.p3d";
- proxyShape = "\A3\Weapons_F_EPC\Ammo\Missile_AA_03_F.p3d";
- maverickWeaponIndexOffset = 0;
- hit = 900;
- indirectHit = 50;
- indirectHitRange = 15;
- };
-
- class Missile_AGM_01_F: Missile_AGM_02_F {
- model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_01_fly_F.p3d";
- proxyShape = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_01_F.p3d";
- maverickWeaponIndexOffset = 2;
- hit = 2200;
- indirectHit = 90;
- indirectHitRange = 10;
- };
-
- class Bomb_03_F: Bomb_04_F {
- model = "\A3\Weapons_F_EPC\Ammo\Bomb_03_F.p3d";
- proxyShape = "\A3\Weapons_F_EPC\Ammo\Bomb_03_F.p3d";
- maverickWeaponIndexOffset = 6;
- hit = 6400;
- indirectHit = 1400;
- indirectHitRange = 16;
- };
-
- class Rocket_03_HE_F: Rocket_04_HE_F {
- model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_fly_F.p3d";
- proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
- maverickWeaponIndexOffset = 8;
- };
-
- class Rocket_03_AP_F: Rocket_04_AP_F {
- model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_AP_fly_F.p3d";
- proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_03_AP_F.p3d";
- maverickWeaponIndexOffset = 28;
- };
-
- class RocketBase;
};
diff --git a/addons/aircraft/CfgMagazines.hpp b/addons/aircraft/CfgMagazines.hpp
index 7328eda091..0c306f8f04 100644
--- a/addons/aircraft/CfgMagazines.hpp
+++ b/addons/aircraft/CfgMagazines.hpp
@@ -1,202 +1,15 @@
class CfgMagazines {
+ // shoot helper object to tripple rof
class VehicleMagazine;
- class 24Rnd_PG_missiles;
-
- class 12Rnd_PG_missiles: 24Rnd_PG_missiles {
- count = 12;
- displayName = "$STR_A3_CfgMagazines_12Rnd_PG_missiles0";
- displayNameShort = "$STR_A3_CfgMagazines_12Rnd_PG_missiles_dns";
- descriptionShort = "$STR_A3_CfgMagazines_12Rnd_PG_missiles1";
- };
- class 12Rnd_missiles: VehicleMagazine {
- scope = 2;
- count = 12;
- ammo = "M_AT";
- displayName = "$STR_A3_CfgMagazines_24Rnd_PuG_missiles0";
- displayNameShort = "$STR_A3_CfgMagazines_24Rnd_PuG_missiles_dns";
- descriptionShort = "$STR_A3_CfgMagazines_24Rnd_PuG_missiles0";
- initSpeed = 44;
- maxLeadSpeed = 800;
- nameSound = "rockets";
- sound[] = {"A3\sounds_f\weapons\rockets\explosion_missile_01",1,1,1200};
- reloadSound[] = {"",0.000316228,1};
- };
-
- //minigun magazines, muzzle velocities and tracercounts
- class 200Rnd_65x39_Belt: VehicleMagazine {};
- class 2000Rnd_65x39_Belt: 200Rnd_65x39_Belt {};
- class 2000Rnd_65x39_Belt_Tracer_Red: 2000Rnd_65x39_Belt {
- };
- class 2000Rnd_65x39_Belt_Green: 2000Rnd_65x39_Belt {};
- class 2000Rnd_65x39_Belt_Tracer_Green: 2000Rnd_65x39_Belt_Green {
- tracersEvery = 1;
- };
- class 2000Rnd_65x39_Belt_Yellow: 2000Rnd_65x39_Belt {
- tracersEvery = 1;
- };
- class 2000Rnd_65x39_Belt_Tracer_Yellow: 2000Rnd_65x39_Belt_Yellow {
- tracersEvery = 1;
- };
-
- class 5000Rnd_762x51_Belt: 2000Rnd_65x39_Belt {
- tracersEvery = 1;
- count = 5000;
- };
- class 5000Rnd_762x51_Yellow_Belt: 5000Rnd_762x51_Belt {};
- class 4000Rnd_762x51_M134 : 5000Rnd_762x51_Belt {
- count = 4000;
- tracersEvery = 1;
- };
- class 2000Rnd_762x51_M134 : 4000Rnd_762x51_M134 {
- count = 2000;
- tracersEvery = 1;
- };
-
- class 2Rnd_AAA_missiles: VehicleMagazine {
- scope = 2;
- displayName = "$STR_A3_CfgMagazines_2Rnd_AAA_missiles0";
- displayNameShort = "$STR_A3_CfgMagazines_2Rnd_AAA_missiles_dns";
- ammo = "M_Air_AA";
- count = 2;
- maxLeadSpeed = 950;
- nameSound = "missiles";
- };
- class 2Rnd_AAA_missiles_MI02: 2Rnd_AAA_missiles {
- ammo = "M_Air_AA_MI02";
- };
- class 4Rnd_AAA_missiles: 2Rnd_AAA_missiles {
- displayName = "$STR_A3_CfgMagazines_4Rnd_AAA_missiles0";
- displayNameShort = "$STR_A3_CfgMagazines_4Rnd_AAA_missiles_dns";
- count = 4;
- };
- class 4Rnd_AAA_missiles_MI02: 4Rnd_AAA_missiles {
- ammo = "M_Air_AA_MI02";
- };
-
- class 4Rnd_GAA_missiles: VehicleMagazine {
- scope = 2;
- displayName = "$STR_A3_CfgMagazines_4Rnd_GAA_missiles0";
- displayNameShort = "$STR_A3_CfgMagazines_4Rnd_GAA_missiles_dns";
- count = 4;
- ammo = "M_Zephyr";
- maxLeadSpeed = 950;
- nameSound = "missiles";
- };
-
- class 300Rnd_20mm_shells: VehicleMagazine {
- scope = 2;
- displayName = "$STR_A3_CfgMagazines_300Rnd_20mm_shells0";
- displayNameShort = "$STR_A3_CfgMagazines_300Rnd_20mm_shells_dns";
- ammo = "B_20mm";
- count = 300;
- deflecting = 3;
- maxLeadSpeed = 300;
- tracersEvery = 5;
- nameSound = "cannon";
- };
-
class 1000Rnd_Gatling_30mm_Plane_CAS_01_F: VehicleMagazine {
- scope = 2;
- displayNameShort = "";
ammo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy";
count = 1170;
- //count = 390;
- //initSpeed = 3852;
- maxLeadSpeed = 300;
- nameSound = "cannon";
- tracersEvery = 1;
- };
-
- class 2Rnd_Missile_AA_04_F: VehicleMagazine {
- scope = 2;
- displayNameShort = "$STR_A3_CFGMAGAZINES_4RND_AAA_MISSILES_DNS";
- ammo = "Missile_AA_04_F";
- count = 2;
- maxLeadSpeed = 220;
- nameSound = "missiles";
- };
- class 6Rnd_Missile_AGM_02_F: VehicleMagazine {
- scope = 2;
- displayNameShort = "$STR_A3_CFGMAGAZINES_38RND_80MM_ROCKETS_DNS";
- ammo = "Missile_AGM_02_F";
- count = 6;
- maxLeadSpeed = 450;
- nameSound = "missiles";
- };
- class 2Rnd_Missile_AGM_02_F: VehicleMagazine {
- scope = 2;
- displayNameShort = "$STR_A3_CFGMAGAZINES_38RND_80MM_ROCKETS_DNS";
- ammo = "Missile_AGM_02_F";
- count = 2;
- maxLeadSpeed = 450;
- nameSound = "missiles";
- };
-
- class 7Rnd_Rocket_04_HE_F: VehicleMagazine {
- scope = 2;
- displayNameShort = "$STR_A3_CFGMAGAZINES_40RND_20MM_G_BELT_DNS";
- ammo = "Rocket_04_HE_F";
- count = 7;
- maxLeadSpeed = 200;
- nameSound = "rockets";
- };
- class 7Rnd_Rocket_04_AP_F: 7Rnd_Rocket_04_HE_F {
- displayNameShort = "$STR_A3_CFGMAGAZINES_TITAN_AP_DNS";
- ammo = "Rocket_04_AP_F";
- };
-
- class 4Rnd_Bomb_04_F: VehicleMagazine {
- scope = 2;
- displayNameShort = "$STR_A3_CFGVEHICLES_BOMB0";
- ammo = "Bomb_04_F";
- count = 4;
- maxLeadSpeed = 1000;
- nameSound = "cannon";
- };
-
- class 500Rnd_Cannon_30mm_Plane_CAS_02_F: 1000Rnd_Gatling_30mm_Plane_CAS_01_F {
- displayNameShort = "";
- ammo = "Cannon_30mm_HE_Plane_CAS_02_F";
- count = 500;
- };
-
- class 2Rnd_Missile_AA_03_F: 2Rnd_Missile_AA_04_F {
- displayNameShort = "$STR_A3_CFGMAGAZINES_4RND_AAA_MISSILES_DNS";
- ammo = "Missile_AA_03_F";
- count = 2;
- };
- class 4Rnd_Missile_AGM_01_F: 6Rnd_Missile_AGM_02_F {
- displayNameShort = "$STR_A3_CFGMAGAZINES_38RND_80MM_ROCKETS_DNS";
- ammo = "Missile_AGM_01_F";
- count = 4;
- };
-
- class 20Rnd_Rocket_03_HE_F: 7Rnd_Rocket_04_HE_F {
- displayNameShort = "$STR_A3_CFGMAGAZINES_40RND_20MM_G_BELT_DNS";
- ammo = "Rocket_03_HE_F";
- count = 20;
- };
- class 20Rnd_Rocket_03_AP_F: 7Rnd_Rocket_04_AP_F {
- displayNameShort = "$STR_A3_CFGMAGAZINES_TITAN_AP_DNS";
- ammo = "Rocket_03_AP_F";
- count = 20;
- };
-
- class 2Rnd_Bomb_03_F: 4Rnd_Bomb_04_F {
- displayNameShort = "$STR_A3_CFGVEHICLES_BOMB0";
- ammo = "Bomb_03_F";
- count = 2;
};
+ // an extended magazine for the comanche
+ class 300Rnd_20mm_shells;
class ACE_500Rnd_20mm_shells_Comanche: 300Rnd_20mm_shells {
- displayName = "20mm";
- displayNameShort = "20mm";
- ammo = "B_20mm";
count = 500;
- deflecting = 3;
- initSpeed = 1030;
- maxLeadSpeed = 300;
- tracersEvery = 5;
};
};
diff --git a/addons/aircraft/CfgVehicles.hpp b/addons/aircraft/CfgVehicles.hpp
index 18be36b9e8..5f419506c0 100644
--- a/addons/aircraft/CfgVehicles.hpp
+++ b/addons/aircraft/CfgVehicles.hpp
@@ -8,12 +8,9 @@ class CfgVehicles {
class NewTurret {
class Turrets;
};
- class CargoTurret;
};
- class Air: AllVehicles {
- class AnimationSources;
- };
+ class Air: AllVehicles {};
class Helicopter: Air {
class Turrets {
@@ -33,6 +30,7 @@ class CfgVehicles {
class Turrets: Turrets {
class CopilotTurret;
};
+ class AnimationSources;
};
class Helicopter_Base_H: Helicopter_Base_F {
@@ -46,7 +44,7 @@ class CfgVehicles {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
- //class MFD {};
+
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@@ -55,14 +53,11 @@ class CfgVehicles {
};
};
- class B_Heli_Light_01_F: Heli_Light_01_base_F {
+ class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {};
+
+ class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
-
- class CargoTurret_01: CargoTurret {};
- class CargoTurret_02: CargoTurret_01 {};
- class CargoTurret_03: CargoTurret_02 {};
- class CargoTurret_04: CargoTurret_01 {};
};*/
};
@@ -70,7 +65,7 @@ class CfgVehicles {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
- //class MFD {};
+
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@@ -84,7 +79,8 @@ class CfgVehicles {
driverCanEject = 1;
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
- magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"};
+ magazines[] = {"2000Rnd_762x51_Belt_T_Green","12Rnd_PG_missiles","168Rnd_CMFlare_Chaff_Magazine"};
+
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@@ -103,36 +99,7 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
- //class MFD {};
- class AnimationSources: AnimationSources {
- class HitGlass1 {
- source = "Hit";
- hitpoint = "HitGlass1";
- raw = 1;
- };
- class HitGlass2: HitGlass1 {
- hitpoint = "HitGlass2";
- };
- class HitGlass3: HitGlass1 {
- hitpoint = "HitGlass3";
- };
- class HitGlass4: HitGlass1 {
- hitpoint = "HitGlass4";
- };
- class Gatling {
- source = "revolving";
- weapon = "ACE_gatling_20mm_Comanche";
- };
- class Hide {
- source = "user";
- animPeriod = 0;
- initPhase = 0;
- };
- class Muzzle_flash {
- source = "ammorandom";
- weapon = "ACE_gatling_20mm_Comanche";
- };
- };
+
class Turrets: Turrets {
class MainTurret: MainTurret {
canEject = 1;
@@ -141,6 +108,15 @@ class CfgVehicles {
magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"};
};
};
+
+ class AnimationSources: AnimationSources {
+ class Gatling {
+ weapon = "ACE_gatling_20mm_Comanche";
+ };
+ class Muzzle_flash {
+ weapon = "ACE_gatling_20mm_Comanche";
+ };
+ };
};
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {};
@@ -149,6 +125,7 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
+
class Turrets: Turrets {
class MainTurret: MainTurret {
canEject = 1;
@@ -160,6 +137,7 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
+
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@@ -174,6 +152,7 @@ class CfgVehicles {
canEject = 1;
};
};
+
/*class UserActions {
class DoorL1_Open {
available = 1;
@@ -195,16 +174,14 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
- //class MFD {};
+
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
showHMD = 1;
};
-
- class CargoTurret_01: CargoTurret {};
- class CargoTurret_02: CargoTurret_01 {};
};
+
/*class UserActions: UserActions {
class DoorL1_Open {
available = 1;
@@ -246,9 +223,9 @@ class CfgVehicles {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
- //class MFD {};
weapons[] = {"M134_minigun","missiles_DAR","CMFlareLauncher"};
magazines[] = {"5000Rnd_762x51_Yellow_Belt","24Rnd_missiles","168Rnd_CMFlare_Chaff_Magazine"};
+
class Turrets: Turrets {
class MainTurret: MainTurret {
canEject = 1;
@@ -268,36 +245,37 @@ class CfgVehicles {
class I_Heli_light_03_F: I_Heli_light_03_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {};
-
- class CargoTurret_01: CargoTurret {};
- class CargoTurret_02: CargoTurret_01 {};
};
};
- class I_Heli_light_03_unarmed_base_F: I_Heli_light_03_base_F {
- //class MFD {};
- };
+ class I_Heli_light_03_unarmed_base_F: I_Heli_light_03_base_F {};
+
class I_Heli_light_03_unarmed_F: I_Heli_light_03_unarmed_base_F {};
class Plane_CAS_01_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
- //class MFD {};
+
class Turrets;
+
#include
};
class Plane_CAS_02_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
+
class Turrets;
+
#include
};
class Plane_Fighter_03_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
+
class Turrets;
+
#include
};
@@ -308,34 +286,34 @@ class CfgVehicles {
};
class UAV_02_base_F: UAV {
+ weapons[] = {};
+ magazines[] = {};
+
class Turrets {
class MainTurret;
};
- weapons[] = {};
- magazines[] = {};
};
class UAV_02_CAS_base_F: UAV_02_base_F {
+ weapons[] = {};
+ magazines[] = {};
+
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
- weapons[] = {};
- magazines[] = {};
};
class B_Heli_Transport_03_base_F: Helicopter_Base_H {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
+
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
};
//class MainTurret: MainTurret {};
class RightDoorGun: MainTurret {};
-
- class CargoTurret_01: CargoTurret {};
- class CargoTurret_02: CargoTurret_01 {};
};
};
@@ -346,9 +324,6 @@ class CfgVehicles {
};
//class MainTurret: MainTurret {};
//class RightDoorGun: MainTurret {};
-
- //class CargoTurret_01: CargoTurret {};
- //class CargoTurret_02: CargoTurret_01 {};
};
};
@@ -356,6 +331,7 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
+
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@@ -374,15 +350,6 @@ class CfgVehicles {
class LoadmasterTurret: LoadmasterTurret {
canEject = 1;
};
-
- class CargoTurret_01: CargoTurret {};
- class CargoTurret_02: CargoTurret_01 {};
- class CargoTurret_03: CargoTurret_01 {};
- class CargoTurret_04: CargoTurret_01 {};
- class CargoTurret_05: CargoTurret_01 {};
- class CargoTurret_06: CargoTurret_05 {};
- class CargoTurret_07: CargoTurret_05 {};
- class CargoTurret_08: CargoTurret_05 {};
};
};
@@ -394,9 +361,6 @@ class CfgVehicles {
class LoadmasterTurret: LoadmasterTurret {
canEject = 1;
};
-
- class CargoTurret_01: CargoTurret {};
- class CargoTurret_02: CargoTurret_01 {};
};
};
};
diff --git a/addons/aircraft/CfgWeapons.hpp b/addons/aircraft/CfgWeapons.hpp
index 321df4a3af..c5f22fc3a2 100644
--- a/addons/aircraft/CfgWeapons.hpp
+++ b/addons/aircraft/CfgWeapons.hpp
@@ -4,15 +4,10 @@ class Mode_Burst;
class Mode_FullAuto;
class CfgWeapons {
- class MGunCore;
- class MGun: MGunCore {};
-
- class LMG_RCWS: MGun {};
-
// Manual Switching Of Flare Mode
class SmokeLauncher;
class CMFlareLauncher: SmokeLauncher {
- modes[] = {"Single", "Burst", "AIBurst"};
+ modes[] = {"Single","Burst","AIBurst"};
class Single: Mode_SemiAuto {
reloadTime = 0.1;
};
@@ -21,13 +16,15 @@ class CfgWeapons {
};
};
+ // bigger mag for comanche
class CannonCore;
class gatling_20mm: CannonCore {
- magazines[] = {"2000Rnd_20mm_shells","1000Rnd_20mm_shells","300Rnd_20mm_shells","ACE_500Rnd_20mm_shells_Comanche"};
+ magazines[] += {"ACE_500Rnd_20mm_shells_Comanche"};
+ // buff gatling rof
class manual: CannonCore {
- reloadTime = 0.023;
- dispersion = 0.006;
+ reloadTime = 0.023; //0.04;
+ dispersion = 0.006; //0.0022;
};
class close: manual {};
class short: close {};
@@ -36,21 +33,14 @@ class CfgWeapons {
};
class ACE_gatling_20mm_Comanche: gatling_20mm {
- displayName = "XM301";
- class close: close {
- reloadTime = 0.04;
- dispersion = 0.0022;
- };
- class far: far {
- reloadTime = 0.04;
- dispersion = 0.0022;
- };
+ displayName = "$STR_ACE_Aircraft_gatling_20mm_Name";
+
class manual: manual {
reloadTime = 0.04;
dispersion = 0.0022;
- displayName = "XM301";
+ displayName = "$STR_ACE_Aircraft_gatling_20mm_Name";
};
- class medium: medium {
+ class close: close {
reloadTime = 0.04;
dispersion = 0.0022;
};
@@ -58,38 +48,53 @@ class CfgWeapons {
reloadTime = 0.04;
dispersion = 0.0022;
};
+ class medium: medium {
+ reloadTime = 0.04;
+ dispersion = 0.0022;
+ };
+ class far: far {
+ reloadTime = 0.04;
+ dispersion = 0.0022;
+ };
};
+ // buff gatling rof
+ class MGunCore;
+ class MGun: MGunCore {};
+
+ class LMG_RCWS: MGun {};
+
class LMG_Minigun: LMG_RCWS {
- magazines[] = {"1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt"};
class manual: MGun {
- reloadTime = 0.015;
- dispersion = 0.006;
+ reloadTime = 0.075; //0.015;
+ dispersion = 0.00093; //0.006;
};
class close: manual {};
class short: close {};
class medium: close {};
class far: close {};
};
+
class LMG_Minigun_heli: LMG_Minigun {
showAimCursorInternal = 0;
class manual: manual {
- reloadTime = 0.015;
- dispersion = 0.006;
+ reloadTime = 0.015; //0.033; Note: This is a way to fast ROF (requires over 60 FPS) @todo
+ dispersion = 0.006; //0.0087;
};
class close: manual {};
class short: close {};
class medium: close {};
class far: close {};
};
+
class M134_minigun: MGunCore {
class LowROF: Mode_FullAuto {
- reloadTime = 0.015;
- dispersion = 0.006;
+ reloadTime = 0.015; //0.03; same as above @todo
+ dispersion = 0.006; //0.0023;
};
class HighROF: LowROF {
- reloadTime = 0.015;
- dispersion = 0.006;
+ reloadTime = 0.015; //0.03;
+ dispersion = 0.006; //0.0023;
};
class close: HighROF {};
class short: close {};
@@ -100,19 +105,10 @@ class CfgWeapons {
class Gatling_30mm_Plane_CAS_01_F: CannonCore {
autoFire = 1;
burst = 1;
- reloadTime = 0.0154;
class LowROF: Mode_FullAuto {
autoFire = 0;
- //burst = 65;
- burst = 22;
- //reloadTime = 0.0154;
- reloadTime = 0.0462;
- //sound[] = {"A3\Sounds_F_epc\weapons\cas_02_cannon",1.77828,1,3800};
- sound[] = {"A3\Sounds_F_EPC\Weapons\gau_03_burst",2.51189,1,4500,{25704,32159}};
- weaponSoundEffect = "DefaultRifle";
- dispersion = 0.005;
- soundContinuous = 1;
- textureType = "burst";
+ burst = 22; //65;
+ reloadTime = 0.0462; //0.0154; //0.034;
multiplier = 3;
};
class close: LowROF {};
@@ -121,120 +117,4 @@ class CfgWeapons {
class medium: close {};
class far: close {};
};
-
- class RocketPods;
- class Missile_AA_04_Plane_CAS_01_F: RocketPods {
- holdsterAnimValue = 2;
- aiRateOfFire = 5;
- aiRateOfFireDistance = 500;
- autoFire = 0;
- cursor = "EmptyCursor";
- cursorAim = "missile";
- nameSound = "MissileLauncher";
- textureType = "fullAuto";
- weaponLockDelay = 3;
- minRange = 300;
- minRangeProbab = 0.25;
- midRange = 2500;
- midRangeProbab = 0.9;
- maxRange = 9000;
- maxRangeProbab = 0.01;
- };
-
- class MissileLauncher;
- class Missile_AGM_02_Plane_CAS_01_F: MissileLauncher {
- holdsterAnimValue = 3;
- magazineReloadTime = 30;
- reloadTime = 0.001;
- textureType = "semi";
- weaponLockDelay = 3;
- weaponSoundEffect = "DefaultRifle";
- };
-
- class Rocket_04_HE_Plane_CAS_01_F: RocketPods {
- holdsterAnimValue = 4;
- canLock = 1;
- modes[] = {"Far_AI","Medium_AI","Close_AI","Burst"};
- weaponLockDelay = 0;
- class Far_AI: RocketPods {
- canLock = 1;
- weaponLockDelay = 0;
- showToPlayer = 0;
- minRange = 800;
- minRangeProbab = 0.31;
- midRange = 2500;
- midRangeProbab = 0.71;
- maxRange = 3200;
- maxRangeProbab = 0.1;
- burst = 1;
- reloadTime = 0.001;
- autoFire = 0;
- aiRateOfFire = 5;
- aiRateOfFireDistance = 500;
- };
- class Medium_AI: Far_AI {};
- class Close_AI: Far_AI {};
- class Burst: RocketPods {
- burst = 1;
- reloadTime = 0.002;
- minRange = 300;
- minRangeProbab = 0.25;
- midRange = 400;
- midRangeProbab = 0.7;
- maxRange = 1300;
- maxRangeProbab = 0.1;
- aiRateOfFire = 5;
- aiRateOfFireDistance = 500;
- autoFire = 0;
- soundContinuous = 0;
- textureType = "fullAuto";
- weaponSoundEffect = "DefaultRifle";
- };
- };
-
- class Rocket_04_AP_Plane_CAS_01_F: Rocket_04_HE_Plane_CAS_01_F {
- holdsterAnimValue = 5;
- };
-
- class Bomb_04_Plane_CAS_01_F: RocketPods {
- holdsterAnimValue = 6;
- aiRateOfFire = 5;
- aiRateOfFireDistance = 500;
- missileLockCone = 180;
- nameSound = "";
- textureType = "fullAuto";
- weaponLockDelay = 1;
- };
-
- class Cannon_30mm_Plane_CAS_02_F: CannonCore {
- scope = 1;
- holdsterAnimValue = 1;
- ballisticsComputer = 2;
- canLock = 1;
- modes[] = {"LowROF","close","near","short","medium","far"};
- nameSound = "cannon";
- shotFromTurret = 0;
- muzzlePos = "Cannon_muzzleflash";
- muzzleEnd = "Cannon_barrel_end";
- selectionFireAnim = "Cannon_muzzleflash";
- autoFire = 1;
- burst = 5;
- reloadTime = 0.04;
- class GunParticles {
- class Effect {
- effectName = "MachineGun2";
- positionName = "Cannon_barrel_start";
- directionName = "Cannon_barrel_end";
- };
- };
- class LowROF: Mode_FullAuto {
- dispersion = 0.0055;
- reloadTime = 0.04;
- };
- class close: LowROF {};
- class near: close {};
- class short: close {};
- class medium: close {};
- class far: close {};
- };
};
diff --git a/addons/aircraft/config.cpp b/addons/aircraft/config.cpp
index 93e4eb8efe..86135c4bc9 100644
--- a/addons/aircraft/config.cpp
+++ b/addons/aircraft/config.cpp
@@ -6,7 +6,7 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"KoffeinFlummi","Crusty"};
+ author[] = {"KoffeinFlummi","Crusty","commy2"};
authorUrl = "https://github.com/KoffeinFlummi/";
VERSION_CONFIG;
};
diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml
index da013cac5e..4d1c49fff6 100644
--- a/addons/aircraft/stringtable.xml
+++ b/addons/aircraft/stringtable.xml
@@ -14,6 +14,18 @@
Rajada
Raffica
+
+ XM301
+ XM301
+ XM301
+ XM301
+ XM301
+ XM301
+ XM301
+ XM301
+ XM301
+ XM301
+
Open Cargo Door
Laderampe öffnen
@@ -35,4 +47,4 @@
Закрыть грузовой отсек
-
\ No newline at end of file
+
diff --git a/addons/attach/CfgEventHandlers.hpp b/addons/attach/CfgEventHandlers.hpp
index 4c2b8b16ca..f0a9f14d91 100644
--- a/addons/attach/CfgEventHandlers.hpp
+++ b/addons/attach/CfgEventHandlers.hpp
@@ -1,5 +1,6 @@
+
class Extended_PreInit_EventHandlers {
class ADDON {
- init = QUOTE( call COMPILE_FILE(XEH_preInit) );
+ init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
-};
\ No newline at end of file
+};
diff --git a/addons/attach/CfgMagazines.hpp b/addons/attach/CfgMagazines.hpp
index 282d36b964..d63b8db36b 100644
--- a/addons/attach/CfgMagazines.hpp
+++ b/addons/attach/CfgMagazines.hpp
@@ -1,10 +1,12 @@
+
class CfgMagazines {
class CA_Magazine;
class B_IR_Grenade: CA_Magazine {
ACE_Attachable = 1;
};
+
class SmokeShell;
class Chemlight_green: SmokeShell {
ACE_Attachable = 1;
};
-};
\ No newline at end of file
+};
diff --git a/addons/attach/CfgVehicles.hpp b/addons/attach/CfgVehicles.hpp
index bc1f52988a..b681c0f7f7 100644
--- a/addons/attach/CfgVehicles.hpp
+++ b/addons/attach/CfgVehicles.hpp
@@ -1,29 +1,30 @@
-#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
- name = #ITEM; \
- count = COUNT; \
- };
#define MACRO_ATTACHTOVEHICLE \
class ACE_Actions { \
- class GVAR(AttachVehicle) { \
- displayName = "$STR_ACE_Attach_AttachDetach"; \
- condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
- statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
- exceptions[] = {"ACE_Drag_isNotDragging"}; \
- showDisabled = 0; \
- priority = 0; \
- icon = PATHTOF(UI\attach_ca.paa); \
- distance = 4; \
- }; \
- class GVAR(DetachVehicle) { \
- displayName = "$STR_ACE_Attach_Detach"; \
- condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
- statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
- exceptions[] = {"ACE_Drag_isNotDragging"}; \
- showDisabled = 0; \
- priority = 0; \
- icon = PATHTOF(UI\detach_ca.paa); \
- distance = 4; \
+ class ACE_MainActions { \
+ selection = ""; \
+ distance = 5; \
+ condition = "true"; \
+ class GVAR(AttachVehicle) { \
+ displayName = "$STR_ACE_Attach_AttachDetach"; \
+ condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
+ statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
+ exceptions[] = {"ACE_Drag_isNotDragging"}; \
+ showDisabled = 0; \
+ priority = 0; \
+ icon = PATHTOF(UI\attach_ca.paa); \
+ distance = 4; \
+ }; \
+ class GVAR(DetachVehicle) { \
+ displayName = "$STR_ACE_Attach_Detach"; \
+ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
+ statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
+ exceptions[] = {"ACE_Drag_isNotDragging"}; \
+ showDisabled = 0; \
+ priority = 0; \
+ icon = PATHTOF(UI\detach_ca.paa); \
+ distance = 4; \
+ }; \
}; \
};
@@ -32,16 +33,20 @@ class CfgVehicles {
class Car: LandVehicle {
MACRO_ATTACHTOVEHICLE
};
+
class Tank: LandVehicle {
MACRO_ATTACHTOVEHICLE
};
+
class Air;
class Helicopter: Air {
MACRO_ATTACHTOVEHICLE
};
+
class Plane: Air {
MACRO_ATTACHTOVEHICLE
};
+
class Ship;
class Ship_F: Ship {
MACRO_ATTACHTOVEHICLE
@@ -83,19 +88,22 @@ class CfgVehicles {
simulation = "nvmarker";
class NVGMarker {
- diffuse[] = {0,0,0};
- ambient[] = {0,0,0};
- brightness = 0.004;
+ diffuse[] = {0.006, 0.006, 0.006, 1};
+ ambient[] = {0.005, 0.005, 0.005, 1};
+ brightness = 0.2;
name = "pozicni blik";
- drawLight = 1;
- drawLightSize = 0.005;
+ drawLightSize = 0.2;
drawLightCenterSize = 0.003;
activeLight = 0;
blinking=1;
+ blinkingStartsOn=1;
+ blinkingPattern[] = {2,2};
+ blinkingPatternGuarantee = false;
dayLight = 0;
onlyInNvg = 1;
useFlare = 0;
};
+
side = 7;//-1=NO_SIDE yellow box,3=CIV grey box,4=NEUTRAL yellow box,6=FRIENDLY green box,7=LOGIC no radar signature
accuracy = 1000;
cost = 0;
@@ -111,37 +119,36 @@ class CfgVehicles {
};
class NATO_Box_Base;
- class EAST_Box_Base;
- class IND_Box_Base;
- class FIA_Box_Base_F;
-
class Box_NATO_Support_F: NATO_Box_Base {
class TransportItems {
- MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
+ MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
+ class EAST_Box_Base;
class Box_East_Support_F: EAST_Box_Base {
class TransportItems {
- MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
+ MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
+ class IND_Box_Base;
class Box_IND_Support_F: IND_Box_Base {
class TransportItems {
- MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
+ MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
+ class FIA_Box_Base_F;
class Box_FIA_Support_F: FIA_Box_Base_F {
class TransportItems {
- MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
+ MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
- MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
+ MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
-};
\ No newline at end of file
+};
diff --git a/addons/attach/CfgWeapons.hpp b/addons/attach/CfgWeapons.hpp
index 8174f67b38..4ad34832c5 100644
--- a/addons/attach/CfgWeapons.hpp
+++ b/addons/attach/CfgWeapons.hpp
@@ -1,16 +1,19 @@
+
class CfgWeapons {
class ACE_ItemCore;
class InventoryItem_Base_F;
class ACE_IR_Strobe_Item: ACE_ItemCore {
+ ACE_attachable = 1;
+ author = "$STR_ACE_Common_ACETeam";
+ scope = 2;
displayName = "$STR_ACE_IrStrobe_Name";
descriptionShort = "$STR_ACE_IrStrobe_Description";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
picture = PATHTOF(UI\irstrobe_item.paa);
- scope = 2;
- ACE_attachable = 1;
+
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
-};
\ No newline at end of file
+};
diff --git a/addons/attach/config.cpp b/addons/attach/config.cpp
index 9accc9f253..dd7e1add3b 100644
--- a/addons/attach/config.cpp
+++ b/addons/attach/config.cpp
@@ -5,17 +5,14 @@ class CfgPatches {
units[] = {};
weapons[] = {"ACE_IR_Strobe_Item"};
requiredVersion = REQUIRED_VERSION;
- requiredAddons[] = {"ace_common", "ace_interaction"};
- author[] = {"KoffeinFlummi", "eRazeri", "CAA-Picard"};
+ requiredAddons[] = {"ace_interaction"};
+ author[] = {"KoffeinFlummi","eRazeri","CAA-Picard"};
authorUrl = "https://github.com/KoffeinFlummi/";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
-
-#include "CfgVehicles.hpp"
-
-#include "CfgWeapons.hpp"
-
#include "CfgMagazines.hpp"
+#include "CfgVehicles.hpp"
+#include "CfgWeapons.hpp"
diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf
index 9fd0cf7952..3aa06bacc2 100644
--- a/addons/attach/functions/fnc_attach.sqf
+++ b/addons/attach/functions/fnc_attach.sqf
@@ -20,31 +20,33 @@
PARAMS_3(_unit,_attachToVehicle,_itemName);
//Sanity Check (_unit has item in inventory, not over attach limit)
-if (!([_unit,_attachToVehicle,_itemName] call FUNC(canAttach))) exitWith {ERROR("Tried to attach, but check failed");};
+if !([_unit, _attachToVehicle, _itemName] call FUNC(canAttach)) exitWith {ERROR("Tried to attach, but check failed");};
+
+private ["_itemVehClass", "_onAtachText", "_selfAttachPosition"];
-_selfAttachPosition = [_unit, [-0.05,0,0.12], "rightshoulder"];
_itemVehClass = "";
_onAtachText = "";
+_selfAttachPosition = [_unit, [-0.05, 0, 0.12], "rightshoulder"];
-switch true do {
-case (_itemName == "ACE_IR_Strobe_Item"): {
+switch (true) do {
+ case (_itemName == "ACE_IR_Strobe_Item"): {
_itemVehClass = "ACE_IR_Strobe_Effect";
_onAtachText = localize "STR_ACE_Attach_IrStrobe_Attached";
- _selfAttachPosition = [_unit,[0,-0.11,0.16],"pilot"]; //makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri
+ //_selfAttachPosition = [_unit, [0, -0.11, 0.16], "pilot"]; //makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri
};
-case (_itemName == "B_IR_Grenade"): {
+ case (_itemName == "B_IR_Grenade"): {
_itemVehClass = "B_IRStrobe";
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
};
-case (_itemName == "O_IR_Grenade"): {
+ case (_itemName == "O_IR_Grenade"): {
_itemVehClass = "O_IRStrobe";
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
};
-case (_itemName == "I_IR_Grenade"): {
+ case (_itemName == "I_IR_Grenade"): {
_itemVehClass = "I_IRStrobe";
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
};
-case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}): {
+ case (toLower _itemName in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]): {
_itemVehClass = _itemName;
_onAtachText = localize "STR_ACE_Attach_Chemlight_Attached";
};
@@ -57,8 +59,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment
_attachedItem = _itemVehClass createVehicle [0,0,0];
_attachedItem attachTo _selfAttachPosition;
[_onAtachText] call EFUNC(common,displayTextStructured);
- _attachToVehicle setVariable ["ACE_AttachedObjects", [_attachedItem], true];
- _attachToVehicle setVariable ["ACE_AttachedItemNames", [_itemName], true];
+ _attachToVehicle setVariable [QGVAR(Objects), [_attachedItem], true];
+ _attachToVehicle setVariable [QGVAR(ItemNames), [_itemName], true];
} else {
GVAR(setupObject) = _itemVehClass createVehicleLocal [0,0,-10000];
GVAR(setupObject) enableSimulationGlobal false;
@@ -72,17 +74,17 @@ if (_unit == _attachToVehicle) then { //Self Attachment
private "_player";
_player = ACE_player;
//Stop if player switch or player gets to far from vehicle
- if ((GVAR(placer) != _player) || {(_player distance GVAR(SetupAttachVehicle)) > 7}) exitWith {
+ if (GVAR(placer) != _player || {_player distance GVAR(SetupAttachVehicle) > 7}) exitWith {
call FUNC(placeCancel);
};
GVAR(pfeh_running) = true;
_pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]);
GVAR(setupObject) setPosATL _pos;
- }] call BIS_fnc_addStackedEventHandler;
+ }] call BIS_fnc_addStackedEventHandler; // @todo replace with CBA PFH
//had to delay the mouseHint, not sure why
[{[localize "STR_ACE_Attach_PlaceAction", localize "STR_ACE_Attach_CancelAction"] call EFUNC(interaction,showMouseHint)}, [], 0, 0] call EFUNC(common,waitAndExecute);
- _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {GVAR(pfeh_running) AND !isNull (GVAR(setupObject))}, {call FUNC(placeApprove);}] call EFUNC(common,AddActionEventHandler)];
- _unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) AND !isNull (GVAR(setupObject))}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
+ _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeApprove);}] call EFUNC(common,AddActionEventHandler)];
+ _unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
};
diff --git a/addons/attach/functions/fnc_canAttach.sqf b/addons/attach/functions/fnc_canAttach.sqf
index ac646ef700..1c33f7b112 100644
--- a/addons/attach/functions/fnc_canAttach.sqf
+++ b/addons/attach/functions/fnc_canAttach.sqf
@@ -19,7 +19,9 @@
PARAMS_3(_unit,_attachToVehicle,_item);
-_attachLimit = if (_unit == _attachToVehicle) then {1} else {10};
-_attachedObjects = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
+private ["_attachLimit", "_attachedObjects"];
-canStand _unit && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_item in ((magazines _unit) + (items _unit) + [""])}
+_attachLimit = [10, 1] select (_unit == _attachToVehicle);
+_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
+
+canStand _unit && {alive _attachToVehicle} && {count _attachedObjects < _attachLimit} && {_item in (itemsWithMagazines _unit + [""])}
diff --git a/addons/attach/functions/fnc_canDetach.sqf b/addons/attach/functions/fnc_canDetach.sqf
index d099d2035e..ad2f68776c 100644
--- a/addons/attach/functions/fnc_canDetach.sqf
+++ b/addons/attach/functions/fnc_canDetach.sqf
@@ -16,24 +16,25 @@
*/
#include "script_component.hpp"
-private ["_attachedObjects", "_inRange", "_unitPos", "_objectPos"];
-
PARAMS_2(_unit,_attachToVehicle);
-_attachedObjects = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
+private ["_attachedObjects", "_inRange"];
+
+_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_inRange = false;
if (_unit == _attachToVehicle) then {
- _inRange = (count _attachedObjects) > 0;
+ _inRange = count _attachedObjects > 0;
} else {
//Scan if unit is within range (using 2d distance)
+ private ["_unitPos", "_objectPos"];
_unitPos = getPos _unit;
_unitPos set [2,0];
{
_objectPos = getPos _x;
_objectPos set [2, 0];
- if ((_objectPos distance _unitPos) < 4) exitWith {_inRange = true};
+ if (_objectPos distance _unitPos < 4) exitWith {_inRange = true};
} forEach _attachedObjects;
};
-(canStand _unit) && _inRange && {alive _attachToVehicle}
+canStand _unit && {_inRange} && {alive _attachToVehicle}
diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf
index b18cec09bd..8fb9e3cc9c 100644
--- a/addons/attach/functions/fnc_detach.sqf
+++ b/addons/attach/functions/fnc_detach.sqf
@@ -16,12 +16,14 @@
*/
#include "script_component.hpp"
-private ["_itemName", "_count", "_attachedItem", "_fnc_detachDelay"];
-
PARAMS_2(_unit,_attachToVehicle);
-_attachedObjectsArray = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
-_attachedItemsArray = _attachToVehicle getVariable ["ACE_AttachedItemNames", []];
+private ["_attachedObjects", "_attachedItems"];
+
+_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
+_attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []];
+
+private ["_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"];
_attachedObject = objNull;
_attachedIndex = -1;
@@ -34,53 +36,51 @@ _unitPos set [2,0];
{
_objectPos = getPos _x;
_objectPos set [2, 0];
- if ((_objectPos distance _unitPos) < _minDistance) then {
- _minDistance = (_objectPos distance _unitPos);
+ if (_objectPos distance _unitPos < _minDistance) then {
+ _minDistance = _objectPos distance _unitPos;
_attachedObject = _x;
- _itemName = _attachedItemsArray select _forEachIndex;
+ _itemName = _attachedItems select _forEachIndex;
_attachedIndex = _forEachIndex;
};
-} forEach _attachedObjectsArray;
+} forEach _attachedObjects;
// Check if unit has an attached item
-if ((isNull _attachedObject) || {_itemName == ""}) exitWith {ERROR("Could not find attached object")};
+if (isNull _attachedObject || {_itemName == ""}) exitWith {ERROR("Could not find attached object")};
-// Add item to inventory
-_count = (count items _unit) + (count magazines _unit);
-_unit addItem _itemName;
-if ((count items _unit) + (count magazines _unit) <= _count) exitWith {
+// Exit if can't add the item
+if !(_unit canAdd _itemName) exitWith {
[localize "STR_ACE_Attach_Inventory_Full"] call EFUNC(common,displayTextStructured);
};
-if (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") then {
+// Add item to inventory
+_unit addItem _itemName;
+
+if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then {
// Hack for dealing with X_IR_Grenade effect not dissapearing on deleteVehicle
detach _attachedObject;
- _attachedObject setPos [getPos _unit select 0, getPos _unit select 1, ((getPos _unit select 2) - 1000)];
+ _attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
// Delete attached item after 0.5 seconds
- _fnc_detachDelay = {
- deleteVehicle (_this select 0);
- };
- [_fnc_detachDelay, [_attachedObject], 0.5, 0] call EFUNC(common,waitAndExecute);
+ [{deleteVehicle (_this select 0)}, [_attachedObject], 0.5, 0] call EFUNC(common,waitAndExecute);
} else {
// Delete attached item
deleteVehicle _attachedObject;
};
// Reset unit variables
-_attachedObjectsArray deleteAt _attachedIndex;
-_attachedItemsArray deleteAt _attachedIndex;
-_attachToVehicle setVariable ["ACE_AttachedObjects", _attachedObjectsArray, true];
-_attachToVehicle setVariable ["ACE_AttachedItemNames", _attachedItemsArray, true];
+_attachedObjects deleteAt _attachedIndex;
+_attachedItems deleteAt _attachedIndex;
+_attachToVehicle setVariable [QGVAR(Objects), _attachedObjects, true];
+_attachToVehicle setVariable [QGVAR(ItemNames), _attachedItems, true];
// Display message
-switch true do {
-case (_itemName == "ACE_IR_Strobe_Item") : {
+switch (true) do {
+ case (_itemName == "ACE_IR_Strobe_Item") : {
[localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
};
-case (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") : {
+ case (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) : {
[localize "STR_ACE_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured);
};
-case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : {
+ case (toLower _itemName in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]) : {
[localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
};
};
diff --git a/addons/attach/functions/fnc_openAttachUI.sqf b/addons/attach/functions/fnc_openAttachUI.sqf
index 6521e43fbe..5533956bb6 100644
--- a/addons/attach/functions/fnc_openAttachUI.sqf
+++ b/addons/attach/functions/fnc_openAttachUI.sqf
@@ -55,13 +55,13 @@ _attachables = items _unit;
} forEach _attachables;
[
-_actions,
-{
- [ACE_player, GVAR(attachTarget), _this] call FUNC(attach);
- call EFUNC(interaction,hideMenu);
-},
-{
- call EFUNC(interaction,hideMenu);
- if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
-}
+ _actions,
+ {
+ [ACE_player, GVAR(attachTarget), _this] call FUNC(attach);
+ call EFUNC(interaction,hideMenu);
+ },
+ {
+ call EFUNC(interaction,hideMenu);
+ if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
+ }
] call EFUNC(interaction,openSelectMenu);
diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf
index ceb48de9b5..c6277e2961 100644
--- a/addons/attach/functions/fnc_placeApprove.sqf
+++ b/addons/attach/functions/fnc_placeApprove.sqf
@@ -100,11 +100,11 @@ _attachedObject attachTo [_attachToVehicle, _endPosTestOffset];
_placer removeItem _itemClassname;
//Add Object to ACE_AttachedObjects and ACE_AttachedItemNames
-_currentObjects = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
+_currentObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_currentObjects pushBack _attachedObject;
-_attachToVehicle setVariable ["ACE_AttachedObjects", _currentObjects, true];
-_currentItemNames = _attachToVehicle getVariable ["ACE_AttachedItemNames", []];
+_attachToVehicle setVariable [QGVAR(Objects), _currentObjects, true];
+_currentItemNames = _attachToVehicle getVariable [QGVAR(ItemNames), []];
_currentItemNames pushBack _itemClassname;
-_attachToVehicle setVariable ["ACE_AttachedItemNames", _currentItemNames, true];
+_attachToVehicle setVariable [QGVAR(ItemNames), _currentItemNames, true];
[_placementText] call EFUNC(common,displayTextStructured);
diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml
index 21577c55d3..13c468184b 100644
--- a/addons/attach/stringtable.xml
+++ b/addons/attach/stringtable.xml
@@ -176,4 +176,4 @@
Error en Acoplar
-
\ No newline at end of file
+
diff --git a/addons/backblast/$PBOPREFIX$ b/addons/backblast/$PBOPREFIX$
deleted file mode 100644
index c5ed230994..0000000000
--- a/addons/backblast/$PBOPREFIX$
+++ /dev/null
@@ -1 +0,0 @@
-z\ace\addons\backblast
\ No newline at end of file
diff --git a/addons/backblast/CfgEventHandlers.hpp b/addons/backblast/CfgEventHandlers.hpp
deleted file mode 100644
index a336a5dd41..0000000000
--- a/addons/backblast/CfgEventHandlers.hpp
+++ /dev/null
@@ -1,17 +0,0 @@
-
-class Extended_PreInit_EventHandlers {
- class ADDON {
- init = QUOTE(call COMPILE_FILE(XEH_preInit) );
- };
-};
-
-class Extended_FiredNear_EventHandlers {
- class CAManBase {
- class GVAR(LauncherBackblast) {
- FiredNear = QUOTE( if (local (_this select 0) && {getNumber (configfile >> 'CfgWeapons' >> _this select 3 >> 'ACE_Backblast_Damage') > 0}) then {_this call FUNC(launcherBackblast)} );
- };
- class GVAR(TankDangerZone) {
- FiredNear = QUOTE( if (local (_this select 0) && {getNumber (configfile >> 'CfgWeapons' >> _this select 3 >> 'ACE_DangerZone_Damage') > 0}) then {_this call FUNC(tankDangerZone)} );
- };
- };
-};
diff --git a/addons/backblast/CfgWeapons.hpp b/addons/backblast/CfgWeapons.hpp
deleted file mode 100644
index fcb4bde0c5..0000000000
--- a/addons/backblast/CfgWeapons.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-class CfgWeapons {
-
- class LauncherCore;
- class Launcher: LauncherCore {
- ACE_Backblast_Angle = 60;
- ACE_Backblast_Range = 10;
- ACE_Backblast_Damage = 0.7;
- };
- class Launcher_Base_F: Launcher {};
-
- class launch_Titan_base: Launcher_Base_F {
- ACE_Backblast_Angle = 40;
- ACE_Backblast_Range = 8;
- ACE_Backblast_Damage = 0.5;
- };
- class launch_Titan_short_base: launch_Titan_base {
- ACE_Backblast_Angle = 40;
- ACE_Backblast_Range = 8;
- ACE_Backblast_Damage = 0.5;
- };
-
- class launch_NLAW_F: Launcher_Base_F {
- ACE_Backblast_Angle = 40;
- ACE_Backblast_Range = 5;
- ACE_Backblast_Damage = 0.6;
- };
- class launch_RPG32_F: Launcher_Base_F {
- ACE_Backblast_Angle = 60;
- ACE_Backblast_Range = 15;
- ACE_Backblast_Damage = 0.7;
- };
-
- class CannonCore;
- class cannon_120mm: CannonCore {
- ACE_DangerZone_Angle = 90;
- ACE_DangerZone_Range = 50;
- ACE_DangerZone_Damage = 0.85;
- };
- class mortar_155mm_AMOS: CannonCore {
- ACE_DangerZone_Angle = 90;
- ACE_DangerZone_Range = 60;
- ACE_DangerZone_Damage = 1;
- };
-};
diff --git a/addons/backblast/functions/fnc_getDistance.sqf b/addons/backblast/functions/fnc_getDistance.sqf
deleted file mode 100644
index 83b290e2b0..0000000000
--- a/addons/backblast/functions/fnc_getDistance.sqf
+++ /dev/null
@@ -1,31 +0,0 @@
-// by commy2
-#include "script_component.hpp"
-
-private ["_position", "_direction", "_maxDistance", "_distance", "_iteration", "_laser", "_line"];
-
-_position = + _this select 0;
-_direction = + _this select 1;
-_maxDistance = _this select 2;
-
-_distance = _maxDistance;
-_iteration = _distance;
-_laser = [];
-_line = [_position, _laser];
-
-while {
- _iteration > 0.1
-} do {
- _iteration = _iteration / 2;
-
- _laser set [0, (_position select 0) - _distance * (_direction select 0)];
- _laser set [1, (_position select 1) - _distance * (_direction select 1)];
- _laser set [2, (_position select 2) - _distance * (_direction select 2)];
-
- _intersections = {
- _x isKindOf "Static" || {_x isKindOf "AllVehicles"}
- } count (lineIntersectsWith _line);
-
- _distance = _distance + ([1, -1] select (_intersections > 0)) * _iteration;
-};
-
-if (_distance > _maxDistance) then {999} else {_distance}
diff --git a/addons/backblast/functions/fnc_launcherBackblast.sqf b/addons/backblast/functions/fnc_launcherBackblast.sqf
deleted file mode 100644
index b2cde50c5d..0000000000
--- a/addons/backblast/functions/fnc_launcherBackblast.sqf
+++ /dev/null
@@ -1,72 +0,0 @@
-// by commy2
-#include "script_component.hpp"
-
-_unit = _this select 0;
-_firer = _this select 1;
-_distance = _this select 2;
-_weapon = _this select 3;
-
-if (vehicle _unit != _unit || {!([_firer] call EFUNC(common,isPlayer))}) exitWith {};
-
-_backblastAngle = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_Backblast_Angle") / 2;
-_backblastRange = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_Backblast_Range");
-_backblastDamage = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_Backblast_Damage");
-
-_position = eyePos _firer;
-_direction = _firer weaponDirection currentWeapon _firer;
-
-if (_unit == _firer) then {
- _distance = [_position, _direction, _backblastRange] call FUNC(getDistance);
- hint format ["%1", _distance];
- if (_distance < _backblastRange) then {
- _alpha = sqrt (1 - _distance / _backblastRange);
- _beta = sqrt 0.5;
-
- _damage = 2 * _alpha * _beta * _backblastDamage;
- [_damage * 100] call BIS_fnc_bloodEffect;
-
- // TODO: Sort this interaction with medical
- if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
- [_unit, "HitBody", ([_unit, "", ((_unit getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
- } else {
- _unit setDamage (damage _unit + _damage);
- };
-
- };
-} else {
- _direction = [0, 0, 0] vectorDiff _direction;
-
- _azimuth = (_direction select 0) atan2 (_direction select 1);
- _inclination = asin (_direction select 2);
-
- _relativePosition = eyePos _unit;
- _relativeDirection = _relativePosition vectorDiff _position;
-
- _relativeAzimuth = (_relativeDirection select 0) atan2 (_relativeDirection select 1);
- _relativeInclination = asin (_relativeDirection select 2);
-
- _angle = sqrt ((_relativeAzimuth - _azimuth) ^ 2 + (_relativeInclination - _inclination) ^ 2);
- _distance = vectorMagnitude _relativeDirection;
-
- _line = [_position, _relativePosition];
-
- if (_angle < _backblastAngle && {_distance < _backblastRange} && {!lineIntersects _line} && {!terrainIntersectASL _line}) then {
- _alpha = sqrt (1 - _distance / _backblastRange);
- _beta = sqrt (1 - _angle / _backblastAngle);
-
- _damage = 2 * _alpha * _beta * _backblastDamage;
- if (_unit == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
-
- // TODO: Sort this interaction with medical
- if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
- [_unit, "HitBody", ([_unit, "", ((_unit getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
- _unit spawn {
- sleep 0.5;
- [_this, "", 0, objNull, objNull] call EFUNC(medical,handleDamage);
- };
- } else {
- _unit setDamage (damage _unit + _damage);
- };
-
- };
-};
diff --git a/addons/backblast/functions/fnc_tankDangerZone.sqf b/addons/backblast/functions/fnc_tankDangerZone.sqf
deleted file mode 100644
index 0371ec9620..0000000000
--- a/addons/backblast/functions/fnc_tankDangerZone.sqf
+++ /dev/null
@@ -1,54 +0,0 @@
-// by commy2
-#include "script_component.hpp"
-
-#define BARREL_MUZZLE "usti hlavne"
-
-_unit = _this select 0;
-_vehicle = vehicle (_this select 1);
-_distance = _this select 2;
-_weapon = _this select 3;
-
-if (vehicle _unit != _unit || {!([gunner _firer] call EFUNC(common,isPlayer))}) exitWith {};
-
-_dangerZoneAngle = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_DangerZone_Angle") / 2;
-_dangerZoneRange = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_DangerZone_Range");
-_dangerZoneDamage = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_DangerZone_Damage");
-
-_position = ATLToASL (_vehicle modelToWorld (_vehicle selectionPosition BARREL_MUZZLE));
-_direction = _vehicle weaponDirection _weapon;
-
-if (_unit != _vehicle) then {
- _azimuth = (_direction select 0) atan2 (_direction select 1);
- _inclination = asin (_direction select 2);
-
- _relativePosition = eyePos _unit;
- _relativeDirection = _relativePosition vectorDiff _position;
-
- _relativeAzimuth = (_relativeDirection select 0) atan2 (_relativeDirection select 1);
- _relativeInclination = asin (_relativeDirection select 2);
-
- _angle = sqrt ((_relativeAzimuth - _azimuth) ^ 2 + (_relativeInclination - _inclination) ^ 2);
- _distance = vectorMagnitude _relativeDirection;
-
- _line = [_position, _relativePosition];
-
- if (_angle < _dangerZoneAngle && {_distance < _dangerZoneRange} && {!lineIntersects (_line + [_vehicle])} && {!terrainIntersectASL _line}) then {
- _alpha = sqrt (1 - _distance / _dangerZoneRange);
- _beta = sqrt (1 - _angle / _dangerZoneAngle);
-
- _damage = 2 * _alpha * _beta * _dangerZoneDamage;
- if (_unit == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
-
- // TODO: Sort this interaction with medical
- if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
- [_unit, "HitBody", ([_unit, "", ((_unit getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
- _unit spawn {
- sleep 0.5;
- [_this, "", 0, objNull, objNull] call EFUNC(medical,handleDamage);
- };
- } else {
- _unit setDamage (damage _unit + _damage);
- };
-
- };
-};
diff --git a/addons/backblast/functions/script_component.hpp b/addons/backblast/functions/script_component.hpp
deleted file mode 100644
index 817131570f..0000000000
--- a/addons/backblast/functions/script_component.hpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "\z\ace\addons\backblast\script_component.hpp"
\ No newline at end of file
diff --git a/addons/backblast/script_component.hpp b/addons/backblast/script_component.hpp
deleted file mode 100644
index 9f2a71f2d5..0000000000
--- a/addons/backblast/script_component.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#define COMPONENT backblast
-#include "\z\ace\Addons\main\script_mod.hpp"
-
-#ifdef DEBUG_ENABLED_BACKBLAST
- #define DEBUG_MODE_FULL
-#endif
-
-#ifdef DEBUG_SETTINGS_BACKBLAST
- #define DEBUG_SETTINGS DEBUG_SETTINGS_BACKBLAST
-#endif
-
-#include "\z\ace\Addons\main\script_macros.hpp"
\ No newline at end of file
diff --git a/addons/captives/$PBOPREFIX$ b/addons/captives/$PBOPREFIX$
new file mode 100644
index 0000000000..aac16576c4
--- /dev/null
+++ b/addons/captives/$PBOPREFIX$
@@ -0,0 +1 @@
+z\ace\addons\captives
\ No newline at end of file
diff --git a/addons/captives/CfgEventHandlers.hpp b/addons/captives/CfgEventHandlers.hpp
new file mode 100644
index 0000000000..0ce09280a7
--- /dev/null
+++ b/addons/captives/CfgEventHandlers.hpp
@@ -0,0 +1,43 @@
+class Extended_PreInit_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preInit));
+ };
+};
+
+class Extended_PostInit_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_postInit));
+ };
+};
+//release escorted captive when entering a vehicle
+class Extended_GetIn_EventHandlers {
+ class All {
+ class GVAR(AutoDetachCaptive) {
+ getIn = QUOTE(_this call FUNC(handleGetIn));
+ };
+ };
+};
+//reset captive animation after leaving vehicle
+class Extended_GetOut_EventHandlers {
+ class All {
+ class GVAR(AutoDetachCaptive) {
+ getOut = QUOTE(_this call FUNC(handleGetOut));
+ };
+ };
+};
+//reset captivity and escorting status when getting killed
+class Extended_Killed_EventHandlers {
+ class CAManBase {
+ class GVAR(AutoDetachCaptive) {
+ killed = QUOTE(_this call FUNC(handleKilled));
+ };
+ };
+};
+//mission start
+class Extended_InitPost_EventHandlers {
+ class CAManBase {
+ class GVAR(InitPost) {
+ init = QUOTE(_this call FUNC(handleUnitInitPost));
+ };
+ };
+};
diff --git a/addons/captives/CfgMoves.hpp b/addons/captives/CfgMoves.hpp
new file mode 100644
index 0000000000..d60fab5a33
--- /dev/null
+++ b/addons/captives/CfgMoves.hpp
@@ -0,0 +1,83 @@
+class CfgMovesBasic {
+ class Actions {
+ class CivilStandActions;
+ class ACE_CivilStandHandcuffedActions: CivilStandActions {
+ turnL = "";
+ turnR = "";
+ stop = "ACE_AmovPercMstpScapWnonDnon";
+ StopRelaxed = "ACE_AmovPercMstpScapWnonDnon";
+ default = "ACE_AmovPercMstpScapWnonDnon";
+ PutDown = "";
+ getOver = "";
+ throwPrepare = "";
+ throwGrenade[] = {"","Gesture"};
+ };
+ class ACE_CivilStandSurrenderActions: ACE_CivilStandHandcuffedActions {
+ stop = "ACE_AmovPercMstpSsurWnonDnon";
+ StopRelaxed = "ACE_AmovPercMstpSsurWnonDnon";
+ default = "ACE_AmovPercMstpSsurWnonDnon";
+ PutDown = "";
+ };
+ };
+};
+
+class CfgMovesMaleSdr: CfgMovesBasic {
+ class StandBase;
+ class States {
+ class AmovPercMstpSnonWnonDnon: StandBase {
+ ConnectTo[] += {"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
+ };
+
+ class CutSceneAnimationBase;
+
+ //Handcuffed Anims:
+ class ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon: CutSceneAnimationBase {
+ actions = "ACE_CivilStandHandcuffedActions";
+ file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_EaseIn";
+ speed = 1;
+ looped = 0;
+ interpolationRestart = 2;
+ ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon",0.1};
+ InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
+ };
+ class ACE_AmovPercMstpScapWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
+ file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_Ease";
+ speed = 0;
+ ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
+ InterpolateTo[] = {"Unconscious",0.01};
+ looped = 1;
+ };
+ class ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
+ actions = "CivilStandActions";
+ file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\amovpercmstpsnonwnondnon_easeout";
+ ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
+ InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1};
+ };
+
+ //Surrender Anims:
+ class ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon: CutSceneAnimationBase {
+ actions = "ACE_CivilStandSurrenderActions";
+ file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";
+ speed = 1;
+ looped = 0;
+ interpolationRestart = 2;
+ ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon",0.1};
+ InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
+ };
+ class ACE_AmovPercMstpSsurWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
+ file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon";
+ speed = 0;
+ looped = 1;
+ ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
+ InterpolateTo[] = {"Unconscious",0.01};
+ };
+ class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
+ speed = 0.5; //for gameplay reasons, slow this down
+ actions = "CivilStandActions";
+ file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
+ ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
+ InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
+ };
+ };
+};
+
diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp
new file mode 100644
index 0000000000..3e4147eee1
--- /dev/null
+++ b/addons/captives/CfgVehicles.hpp
@@ -0,0 +1,202 @@
+class CfgVehicles {
+ class Man;
+ class CAManBase: Man {
+ class ACE_Actions {
+ class ACE_RightHandActions {
+ selection = "righthand";
+ displayName = "Right hand";
+ distance = 5;
+ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs)) || ([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs)));
+ class ACE_ApplyHandcuffs {
+ displayName = "$STR_ACE_Captives_SetCaptive";
+ distance = 4;
+ condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
+ statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
+ exceptions[] = {};
+ showDisabled = 0;
+ priority = 2.4;
+ icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
+ hotkey = "C";
+ };
+ class ACE_RemoveHandcuffs {
+ displayName = "$STR_ACE_Captives_ReleaseCaptive";
+ distance = 4;
+ condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
+ statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
+ exceptions[] = {};
+ showDisabled = 0;
+ priority = 2.4;
+ icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
+ hotkey = "R";
+ };
+ };
+ class ACE_MainActions {
+ class ACE_EscortCaptive {
+ displayName = "$STR_ACE_Captives_EscortCaptive";
+ distance = 4;
+ condition = QUOTE([ARR_2(_player, _target)] call FUNC(canEscortCaptive));
+ statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive));
+ exceptions[] = {};
+ showDisabled = 0;
+ icon = QUOTE(PATHTOF(UI\captive_ca.paa));
+ priority = 2.3;
+ hotkey = "E";
+ };
+ class ACE_StopEscorting {
+ displayName = "$STR_ACE_Captives_StopEscorting";
+ distance = 4;
+ condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
+ statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
+ exceptions[] = {QGVAR(isNotEscorting)};
+ showDisabled = 0;
+ icon = QUOTE(PATHTOF(UI\captive_ca.paa));
+ priority = 2.3;
+ hotkey = "E";
+ };
+ class ACE_LoadCaptive {
+ displayName = "$STR_ACE_Captives_LoadCaptive";
+ distance = 4;
+ condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
+ statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
+ exceptions[] = {QGVAR(isNotEscorting)};
+ showDisabled = 0;
+ icon = QUOTE(PATHTOF(UI\captive_ca.paa));
+ priority = 2.2;
+ hotkey = "L";
+ };
+ class ACE_FriskPerson {
+ displayName = "$STR_ACE_Captives_FriskPerson";
+ distance = 2;
+ condition = QUOTE([ARR_2(_player, _target)] call FUNC(canFriskPerson));
+ statement = QUOTE([ARR_2(_player, _target)] call FUNC(doFriskPerson));
+ showDisabled = 0;
+ //icon = ""; //@todo
+ priority = 3;
+ hotkey = "F";
+ };
+ };
+ };
+
+ class ACE_SelfActions {
+ class ACE_StopEscortingSelf {
+ displayName = "$STR_ACE_Captives_StopEscorting";
+ condition = QUOTE([ARR_2(_player, objNull)] call FUNC(canStopEscorting));
+ statement = QUOTE([ARR_3(_player,objNull, false)] call FUNC(doEscortCaptive));
+ exceptions[] = {QGVAR(isNotEscorting)};
+ showDisabled = 0;
+ priority = 2.3;
+ hotkey = "C";
+ };
+ class ACE_StartSurrenderingSelf {
+ displayName = "$STR_ACE_Captives_StartSurrendering";
+ condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender));
+ statement = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered));
+ exceptions[] = {};
+ showDisabled = 0;
+ priority = 0;
+ };
+ class ACE_StopSurrenderingSelf {
+ displayName = "$STR_ACE_Captives_StopSurrendering";
+ condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
+ statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered));
+ exceptions[] = {QGVAR(isNotSurrendering)};
+ showDisabled = 0;
+ priority = 0;
+ };
+ };
+ };
+
+#define MACRO_LOADUNLOADCAPTIVE \
+ class ACE_Actions { \
+ class ACE_MainActions { \
+ selection = ""; \
+ class ACE_LoadCaptive { \
+ displayName = "$STR_ACE_Captives_LoadCaptive"; \
+ distance = 4; \
+ condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
+ statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
+ exceptions[] = {QGVAR(isNotEscorting)}; \
+ showDisabled = 0; \
+ priority = 1.2; \
+ hotkey = "L"; \
+ }; \
+ class ACE_UnloadCaptive { \
+ displayName = "$STR_ACE_Captives_UnloadCaptive"; \
+ distance = 4; \
+ condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \
+ statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \
+ showDisabled = 0; \
+ priority = 1.2; \
+ hotkey = "C"; \
+ }; \
+ }; \
+ };
+
+ class LandVehicle;
+ class Car: LandVehicle {
+ MACRO_LOADUNLOADCAPTIVE
+ };
+ class Tank: LandVehicle {
+ MACRO_LOADUNLOADCAPTIVE
+ };
+
+ class Air;
+ class Helicopter: Air {
+ MACRO_LOADUNLOADCAPTIVE
+ };
+ class Plane: Air {
+ MACRO_LOADUNLOADCAPTIVE
+ };
+
+ class Ship;
+ class Ship_F: Ship {
+ MACRO_LOADUNLOADCAPTIVE
+ };
+
+ class StaticWeapon: LandVehicle {
+ MACRO_LOADUNLOADCAPTIVE
+ };
+
+ class StaticMortar;
+ class Mortar_01_base_F: StaticMortar {
+ MACRO_LOADUNLOADCAPTIVE
+ };
+
+#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
+ name = #ITEM; \
+ count = COUNT; \
+ };
+
+ class Box_NATO_Support_F;
+ class ACE_Box_Misc: Box_NATO_Support_F {
+ class TransportItems {
+ MACRO_ADDITEM(ACE_CableTie,12)
+ };
+ };
+
+
+ class Logic;
+ class Module_F: Logic {
+ class ArgumentsBaseUnits {};
+ class ModuleDescription {};
+ };
+
+ class GVAR(ModuleSurrender): Module_F {
+ author = "$STR_ACE_Common_ACETeam";
+ category = "ACE";
+ displayName = "Make Unit Surrender";
+ function = QUOTE(DFUNC(moduleSurrender));
+ scope = 2; //show in editor
+ scopeCurator = 2; //show in zeus
+ curatorCost = 0; //???
+ isGlobal = 1; //run global
+ isTriggerActivated = 1; //Wait for triggers
+ // icon = QUOTE(PATHTOF(ui\todo.paa));
+ functionPriority = 0;
+ class Arguments {};
+ class ModuleDescription: ModuleDescription {
+ description = "Sync a unit to make them surrender.
Source: ace_captives";
+ sync[] = {"AnyAI"};
+ };
+ };
+};
diff --git a/addons/captives/CfgWeapons.hpp b/addons/captives/CfgWeapons.hpp
new file mode 100644
index 0000000000..be2149ca88
--- /dev/null
+++ b/addons/captives/CfgWeapons.hpp
@@ -0,0 +1,15 @@
+class CfgWeapons {
+ class ACE_ItemCore;
+ class InventoryItem_Base_F;
+
+ class ACE_CableTie: ACE_ItemCore {
+ displayName = "$STR_ACE_Captives_CableTie";
+ descriptionShort = "$STR_ACE_Captives_CableTieDescription";
+ model = QUOTE(PATHTOF(models\ace_cabletie.p3d));
+ picture = QUOTE(PATHTOF(UI\ace_cabletie_ca.paa));
+ scope = 2;
+ class ItemInfo: InventoryItem_Base_F {
+ mass = 1;
+ };
+ };
+};
diff --git a/addons/captives/README.md b/addons/captives/README.md
new file mode 100644
index 0000000000..3938720f08
--- /dev/null
+++ b/addons/captives/README.md
@@ -0,0 +1,14 @@
+ace_captives
+============
+
+Allows taking people captive/handcuffed
+
+####Items:
+`ACE_CableTie` - adds ability to take someone captive
+
+
+## Maintainers
+
+The people responsible for merging changes to this component or answering potential questions.
+
+- [PabstMirror](https://github.com/PabstMirror)
diff --git a/TO_MERGE/agm/Captives/UI/agm_cabletie_x_ca.paa b/addons/captives/UI/ace_cabletie_ca.paa
similarity index 100%
rename from TO_MERGE/agm/Captives/UI/agm_cabletie_x_ca.paa
rename to addons/captives/UI/ace_cabletie_ca.paa
diff --git a/TO_MERGE/agm/Captives/UI/captive_ca.paa b/addons/captives/UI/captive_ca.paa
similarity index 100%
rename from TO_MERGE/agm/Captives/UI/captive_ca.paa
rename to addons/captives/UI/captive_ca.paa
diff --git a/TO_MERGE/agm/Captives/UI/handcuff_ca.paa b/addons/captives/UI/handcuff_ca.paa
similarity index 100%
rename from TO_MERGE/agm/Captives/UI/handcuff_ca.paa
rename to addons/captives/UI/handcuff_ca.paa
diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf
new file mode 100644
index 0000000000..ac86d71915
--- /dev/null
+++ b/addons/captives/XEH_postInit.sqf
@@ -0,0 +1,38 @@
+#include "script_component.hpp"
+
+
+//Handles when someone starts escorting and then disconnects, leaving the captive attached
+//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
+
+if (isServer) then {
+ addMissionEventHandler ["HandleDisconnect", {
+ PARAMS_1(_disconnectedPlayer);
+ _escortedUnit = _disconnectedPlayer getVariable [QGVAR(escortedUnit), objNull];
+ if ((!isNull _escortedUnit) && {(attachedTo _escortedUnit) == _disconnectedPlayer}) then {
+ detach _escortedUnit;
+ systemChat "debug: DC detach";
+ };
+ if (_disconnectedPlayer getVariable [QGVAR(isEscorting), false]) then {
+ _disconnectedPlayer setVariable [QGVAR(isEscorting), false, true];
+ };
+ }];
+};
+
+["playerVehicleChanged", {_this call FUNC(handleVehicleChanged)}] call EFUNC(common,addEventHandler);
+["zeusDisplayChanged", {_this call FUNC(handleZeusDisplayChanged)}] call EFUNC(common,addEventHandler);
+["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
+["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
+["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
+
+["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
+["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
+
+//TODO: Medical Integration Events???
+
+// [_unit, "knockedOut", {
+// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut};
+// }] call ACE_Core_fnc_addCustomEventhandler;
+
+// [_unit, "wokeUp", {
+// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp};
+// }] call ACE_Core_fnc_addCustomEventhandler;
diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf
new file mode 100644
index 0000000000..34c9bca910
--- /dev/null
+++ b/addons/captives/XEH_preInit.sqf
@@ -0,0 +1,33 @@
+#include "script_component.hpp"
+
+ADDON = false;
+
+PREP(canApplyHandcuffs);
+PREP(canEscortCaptive);
+PREP(canFriskPerson);
+PREP(canLoadCaptive);
+PREP(canRemoveHandcuffs);
+PREP(canStopEscorting);
+PREP(canSurrender);
+PREP(canUnloadCaptive);
+PREP(doApplyHandcuffs);
+PREP(doEscortCaptive);
+PREP(doFriskPerson);
+PREP(doLoadCaptive);
+PREP(doRemoveHandcuffs);
+PREP(doUnloadCaptive);
+PREP(handleGetIn);
+PREP(handleGetOut);
+PREP(handleKilled);
+PREP(handleKnockedOut);
+PREP(handlePlayerChanged);
+PREP(handleUnitInitPost);
+PREP(handleWokeUp);
+PREP(handleZeusDisplayChanged);
+PREP(moduleSurrender);
+PREP(setHandcuffed);
+PREP(setSurrendered);
+PREP(vehicleCaptiveMoveIn);
+PREP(vehicleCaptiveMoveOut);
+
+ADDON = true;
diff --git a/addons/captives/config.cpp b/addons/captives/config.cpp
new file mode 100644
index 0000000000..27b7c4ec60
--- /dev/null
+++ b/addons/captives/config.cpp
@@ -0,0 +1,31 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {QGVAR(ModuleSurrender)};
+ weapons[] = {"ACE_CableTie"};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"ACE_Interaction"};
+ author[] = {"commy2", "KoffeinFlummi"};
+ authorUrl = "https://github.com/commy2/";
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgEventHandlers.hpp"
+#include "CfgMoves.hpp"
+#include "CfgVehicles.hpp"
+#include "CfgWeapons.hpp"
+
+
+class ACE_canInteractConditions {
+ class GVAR(isNotEscorting) {
+ condition = QUOTE(!(GETVAR(player,QGVAR(isEscorting),false)));
+ };
+ class GVAR(isNotHandcuffed) {
+ condition = QUOTE(!(GETVAR(player,QGVAR(isHandcuffed),false)));
+ };
+ class GVAR(isNotSurrendering) {
+ condition = QUOTE(!(GETVAR(player,QGVAR(isSurrendering),false)));
+ };
+};
diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf
new file mode 100644
index 0000000000..f69bb2544d
--- /dev/null
+++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf
@@ -0,0 +1,25 @@
+/*
+ * Author: PabstMirror
+ * Checks the conditions for being able to apply handcuffs
+ *
+ * Arguments:
+ * 0: caller (player)