diff --git a/CHANGELOG.md b/CHANGELOG.md index bc6f168..5794ac9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ - Revive: Marker für bewusstlose Einheiten werden jetzt vom GPS-System gehandhabt, d.h. in Echtzeit aktualisiert. Dadurch kommt es nicht mehr zu "Ghost"-Markern an falscher Stelle - Waffenwechsel: Komponente wurde überarbeitet und in einzelne Funktionen aufgeteilt. Einige Fehler aus dem Forum behoben. - Kritischer Bugfix #45: Fahne kann nicht mehr länger per Hotkey aus der Entfernung gezogen werden +- Flip: Bugfix sowie Refactoring in der Komponente Flip. Fahrzeuge und Flugzeuge können wieder umgedreht werden, falls sie schief liegen oder umgekippt sind +- Waffenwechsel: Weitere Bugfixes durch Lord ### Editor diff --git a/[J]OPT.Altis/CfgEventhandlers.hpp b/[J]OPT.Altis/CfgEventhandlers.hpp index 7e91a63..b51cd8e 100644 --- a/[J]OPT.Altis/CfgEventhandlers.hpp +++ b/[J]OPT.Altis/CfgEventhandlers.hpp @@ -27,6 +27,9 @@ class Extended_PreInit_EventHandlers { }; class GVARMAIN(fieldrepair) { init = QUOTE(call compile preProcessFileLineNumbers 'fieldrepair\XEH_PreInit.sqf'); + }; + class GVARMAIN(flip) { + init = QUOTE(call compile preProcessFileLineNumbers 'flip\XEH_PreInit.sqf'); }; class GVARMAIN(gps) { init = QUOTE(call compile preProcessFileLineNumbers 'gps\XEH_PreInit.sqf'); @@ -104,6 +107,9 @@ class Extended_PostInit_EventHandlers { class GVARMAIN(fieldrepair) { init = QUOTE(call compile preProcessFileLineNumbers 'fieldrepair\XEH_PostInit.sqf'); }; + class GVARMAIN(flip) { + init = QUOTE(call compile preProcessFileLineNumbers 'flip\XEH_PostInit.sqf'); + }; class GVARMAIN(gps) { init = QUOTE(call compile preProcessFileLineNumbers 'gps\XEH_PostInit.sqf'); }; diff --git a/[J]OPT.Altis/assets/paa/schild_fahrzeuge.paa b/[J]OPT.Altis/assets/paa/schild_fahrzeuge.paa new file mode 100644 index 0000000..679d194 Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_fahrzeuge.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_luftwaffe.paa b/[J]OPT.Altis/assets/paa/schild_luftwaffe.paa new file mode 100644 index 0000000..1b67aba Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_luftwaffe.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_marine.paa b/[J]OPT.Altis/assets/paa/schild_marine.paa new file mode 100644 index 0000000..e57f0b8 Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_marine.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_muni.paa b/[J]OPT.Altis/assets/paa/schild_muni.paa new file mode 100644 index 0000000..42fc725 Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_muni.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_nachschub.paa b/[J]OPT.Altis/assets/paa/schild_nachschub.paa new file mode 100644 index 0000000..4e70ffa Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_nachschub.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_panzer.paa b/[J]OPT.Altis/assets/paa/schild_panzer.paa new file mode 100644 index 0000000..b87c268 Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_panzer.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_radar.paa b/[J]OPT.Altis/assets/paa/schild_radar.paa new file mode 100644 index 0000000..e904f97 Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_radar.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_service.paa b/[J]OPT.Altis/assets/paa/schild_service.paa new file mode 100644 index 0000000..c5a90c3 Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_service.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_teleport.paa b/[J]OPT.Altis/assets/paa/schild_teleport.paa new file mode 100644 index 0000000..22ac94b Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_teleport.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_uebersicht_csat.paa b/[J]OPT.Altis/assets/paa/schild_uebersicht_csat.paa new file mode 100644 index 0000000..27401e3 Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_uebersicht_csat.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_uebersicht_nato.paa b/[J]OPT.Altis/assets/paa/schild_uebersicht_nato.paa new file mode 100644 index 0000000..e5e174e Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_uebersicht_nato.paa differ diff --git a/[J]OPT.Altis/assets/paa/schild_verkaufen.paa b/[J]OPT.Altis/assets/paa/schild_verkaufen.paa new file mode 100644 index 0000000..d7e6a46 Binary files /dev/null and b/[J]OPT.Altis/assets/paa/schild_verkaufen.paa differ diff --git a/[J]OPT.Altis/common/XEH_PREP.hpp b/[J]OPT.Altis/common/XEH_PREP.hpp index 8a36fc4..9c9f03f 100644 --- a/[J]OPT.Altis/common/XEH_PREP.hpp +++ b/[J]OPT.Altis/common/XEH_PREP.hpp @@ -4,13 +4,11 @@ PREP(addToCurator); PREP(createMarker); PREP(execFunc); PREP(fillLB); -PREP(flipCheck); PREP(nearbyPlayers); PREP(playerName); PREP(playerSide); PREP(renderBudget); PREP(renewCurator); -PREP(unFlip); PREP(updateBudget); PREP(vehicleSide); PREP(weaponCheck); \ No newline at end of file diff --git a/[J]OPT.Altis/flip/XEH_PREP.hpp b/[J]OPT.Altis/flip/XEH_PREP.hpp new file mode 100644 index 0000000..e813776 --- /dev/null +++ b/[J]OPT.Altis/flip/XEH_PREP.hpp @@ -0,0 +1,5 @@ + +PREP(initCBAClassEvents); +PREP(initCBASettings); +PREP(flipCheck); +PREP(unFlip); \ No newline at end of file diff --git a/[J]OPT.Altis/flip/XEH_PostInit.sqf b/[J]OPT.Altis/flip/XEH_PostInit.sqf new file mode 100644 index 0000000..43dfe4f --- /dev/null +++ b/[J]OPT.Altis/flip/XEH_PostInit.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" + +/* + this line is commented, otherwise it would disturb the linter. +["LandVehicle", "init", FUNC(onInit), nil, nil, true] call CBA_fnc_addClassEventHandler; +*/ + +if (!GVAR(on)) exitWith{}; + +[] call FUNC(initCBAClassEvents); diff --git a/[J]OPT.Altis/flip/XEH_PreInit.sqf b/[J]OPT.Altis/flip/XEH_PreInit.sqf new file mode 100644 index 0000000..255c83a --- /dev/null +++ b/[J]OPT.Altis/flip/XEH_PreInit.sqf @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; + +/* INITIALIZE GLOBAL VARS */ +// list all global variables used within the component +// define variable with default value! +// GVAR(...) + +// initialize CBA Settings +[] call FUNC(initCBASettings); diff --git a/[J]OPT.Altis/common/functions/fnc_flipCheck.sqf b/[J]OPT.Altis/flip/functions/fnc_flipCheck.sqf similarity index 69% rename from [J]OPT.Altis/common/functions/fnc_flipCheck.sqf rename to [J]OPT.Altis/flip/functions/fnc_flipCheck.sqf index cab199b..54d1c3f 100644 --- a/[J]OPT.Altis/common/functions/fnc_flipCheck.sqf +++ b/[J]OPT.Altis/flip/functions/fnc_flipCheck.sqf @@ -16,7 +16,7 @@ * no * * Public: -* no - should be called via condition of addAction +* no - should be called via condition check of addAction command * * Global: * no @@ -25,12 +25,12 @@ * no * * Example: -* [vec, unit] call EFUNC(common,flipCheck); +* [vec, unit] call EFUNC(flip,flipCheck); */ #include "script_component.hpp" /* PARAMS */ -params +params [ ["_target", objNull, [objNull], 1], ["_caller", objNull, [objNull], 1] @@ -41,17 +41,17 @@ private _ret = false; if (_target isEqualTo objNull or _caller isEqualTo objNull) exitWith{_ret}; /* CODE BODY */ -// check speed of vehicle, distance between target and caller, type and status of vehicle and facing dir -private _cond = +// check speed of vehicle, distance between target and caller, type and status of vehicle and facing dir +private _cond = ( - (speed _target < 1) and - ((_target distance _caller) < 10) and - (_target isKindOf 'landVehicle') and - (alive _target) and + (speed _target < 1) and + (crew _target isEqualTo []) and + ((_target distance _caller) < 10) and + (alive _target) and ((vectorUp _target) select 2 < 0.4) ); -if (_cond) then +if (_cond) then { _ret = true; }; diff --git a/[J]OPT.Altis/flip/functions/fnc_initCBAClassEvents.sqf b/[J]OPT.Altis/flip/functions/fnc_initCBAClassEvents.sqf new file mode 100644 index 0000000..06b505d --- /dev/null +++ b/[J]OPT.Altis/flip/functions/fnc_initCBAClassEvents.sqf @@ -0,0 +1,71 @@ +/** +* Description: +* initialize CBA class event handler +* +* Author: +* James +* +* Arguments: +* None +* +* Return Value: +* None +* +* Server only: +* no +* +* Public: +* no - should be called only once at mission start from XEH_PostInit.sqf +* +* Global: +* no +* +* Sideeffects: +* add action menu item to vehicles (both land and air) to unflip vehicle +* +* Example: +* [] call EFUNC(flip,initCBAClassEvents); +* +*/ +#include "script_component.hpp" + +/* CLASS EH */ +/* EXAMPLE FROM https://github.com/CBATeam/CBA_A3/wiki/Adding-Event-Handlers-to-Classes-of-Objects +["CAManBase", "fired", {systemChat str _this}] call CBA_fnc_addClassEventHandler; +This will show a chat message every time a soldier fires a weapon. It is advised to use CAManBase instead of Man when dealing with soldiers, because Man is the parent class of all animals, including the randomly spawning rabbits, snakes and fish. Using CAManBase slightly reduces the overhead that would happen when any of these spawn (which actually happens pretty frequently). + +["AllVehicles", "getIn", {hint str _this}] call CBA_fnc_addClassEventHandler; +This event happens every time a soldier enters a vehicle. +*/ + + +// fügt auf allen clients einen Add Action Eintrag für umgekippte Fahrzeuge hinzu +// ersetzt player add action in onPlayerRespawn (viel performanter, da kein pulling) +["LandVehicle", "Air"] apply +{ + [ + _x, + "init", + { + params ["_vec"]; + + _vec addAction + [ + FLIP_ACTION_UNFLIP_TEXT call XTuerkiesText, + { + params ["_target", "_caller", "_actionId", "_arguments"]; + [_target] call FUNC(unFlip); + }, + [], + 0, + false, + true, + "", + format["[_target, _this] call %1", QFUNC(flipCheck)] + ]; + }, + nil, + nil, + true + ] call CBA_fnc_addClassEventHandler; +}; \ No newline at end of file diff --git a/[J]OPT.Altis/flip/functions/fnc_initCBASettings.sqf b/[J]OPT.Altis/flip/functions/fnc_initCBASettings.sqf new file mode 100644 index 0000000..73a03d3 --- /dev/null +++ b/[J]OPT.Altis/flip/functions/fnc_initCBASettings.sqf @@ -0,0 +1,41 @@ +/** +* Description: +* initialize CBA settings +* +* Author: +* James +* +* Arguments: +* None +* +* Return Value: +* None +* +* Server only: +* no +* +* Public: +* no - should be called only once from XEH_PreInit.sqf at mission start +* +* Global: +* no +* +* Sideeffects: +* yes - create a new setting in the game addons options (according to category and name) +* +* Example: +* [] call EFUNC(beam,initCBASettings); +*/ +#include "script_component.hpp" + +[ + QGVAR(on), // Internal setting name, should always contain a tag! This will be the global variable which takes the value of the setting. + "CHECKBOX", // setting type + "Aktiviert die Flip-Komponente", // Pretty name shown inside the ingame settings menu. Can be stringtable entry. + "OPT Komponenten", // Pretty name of the category where the setting can be found. Can be stringtable entry. + true, // Default value + 1, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer + {} // function that will be executed once on mission start and every time the setting is changed. +] call CBA_Settings_fnc_init; + +if (!GVAR(on)) exitWith{}; diff --git a/[J]OPT.Altis/common/functions/fnc_unFlip.sqf b/[J]OPT.Altis/flip/functions/fnc_unFlip.sqf similarity index 79% rename from [J]OPT.Altis/common/functions/fnc_unFlip.sqf rename to [J]OPT.Altis/flip/functions/fnc_unFlip.sqf index 9067391..5db200f 100644 --- a/[J]OPT.Altis/common/functions/fnc_unFlip.sqf +++ b/[J]OPT.Altis/flip/functions/fnc_unFlip.sqf @@ -24,7 +24,7 @@ * no * * Example: -* [cursorObject] call EFUNC(common,unFlip); +* [cursorObject] call EFUNC(flip,unFlip); */ #include "script_component.hpp" @@ -39,9 +39,9 @@ if (_veh isEqualTo objNull) exitWith{}; /* CODE BODY */ _veh setVectorUp [0,0,1]; -_veh setPosATL +_veh setPosATL [ - (getPosATL _veh) select 0, - (getPosATL _veh) select 1, + (getPosATL _veh) select 0, + (getPosATL _veh) select 1, 0.3 ]; \ No newline at end of file diff --git a/[J]OPT.Altis/flip/functions/script_component.hpp b/[J]OPT.Altis/flip/functions/script_component.hpp new file mode 100644 index 0000000..fcf9da9 --- /dev/null +++ b/[J]OPT.Altis/flip/functions/script_component.hpp @@ -0,0 +1 @@ +#include "..\script_component.hpp" diff --git a/[J]OPT.Altis/flip/script_component.hpp b/[J]OPT.Altis/flip/script_component.hpp new file mode 100644 index 0000000..3e73c77 --- /dev/null +++ b/[J]OPT.Altis/flip/script_component.hpp @@ -0,0 +1,15 @@ +#define COMPONENT flip +#define COMPONENT_BEAUTIFIED Flip +#include "..\main\script_mission.hpp" + +#define DEBUG_MODE_MINIMAL +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_flip + #define DEBUG_MODE_FULL +#endif + +#include "..\main\script_macros.hpp" +#include "setup.hpp" \ No newline at end of file diff --git a/[J]OPT.Altis/flip/setup.hpp b/[J]OPT.Altis/flip/setup.hpp new file mode 100644 index 0000000..a777c69 --- /dev/null +++ b/[J]OPT.Altis/flip/setup.hpp @@ -0,0 +1,5 @@ +// hier bitte alle Variablen anlegen, die man in irgendeiner Weise +// einstellen können soll oder irgendwann mal ändern will +// Beispiele: Add-Action Texte, Variablen, Konstanten, Marker etc +// #define MEIN_MAKRO ... +#define FLIP_ACTION_UNFLIP_TEXT "Fahrzeug aufrichten" \ No newline at end of file diff --git a/[J]OPT.Altis/main/script_version.hpp b/[J]OPT.Altis/main/script_version.hpp index 954c27e..083d36e 100644 --- a/[J]OPT.Altis/main/script_version.hpp +++ b/[J]OPT.Altis/main/script_version.hpp @@ -1,3 +1,3 @@ #define MAJOR 4 #define MINOR 15 -#define BUILD 1 +#define BUILD 2 diff --git a/[J]OPT.Altis/mission.sqm b/[J]OPT.Altis/mission.sqm index b903f4c..77ef872 100644 --- a/[J]OPT.Altis/mission.sqm +++ b/[J]OPT.Altis/mission.sqm @@ -16,7 +16,7 @@ class EditorData }; class LayerIndexProvider { - nextID=952; + nextID=1028; }; class Camera { @@ -51,6 +51,7 @@ addons[]= "A3_Structures_F_Exp_Infrastructure_Pavements", "opt_a3_characters", "A3_Weapons_F", + "tfar_handhelds", "A3_Characters_F", "A3_Structures_F_Heli_Ind_Cargo", "A3_Structures_F_Ind_AirPort", @@ -68,6 +69,7 @@ addons[]= "A3_Weapons_F_LongRangeRifles_M320", "A3_Weapons_F_Mark_LongRangeRifles_M320", "A3_Characters_F_Exp", + "ace_reload", "A3_Modules_F_Curator_Curator", "A3_Weapons_F_Tank_Launchers_MRAWS", "A3_Weapons_F_Tank", @@ -82,7 +84,7 @@ class AddonsMetaData { class List { - items=29; + items=32; class Item0 { className="A3_Structures_F"; @@ -192,97 +194,110 @@ class AddonsMetaData url="https://www.arma3.com"; }; class Item16 + { + className="tfar_handhelds"; + name="tfar_handhelds"; + url="https://github.com/michail-nikolaev/task-force-arma-3-radio"; + }; + class Item17 { className="A3_Characters_F"; name="Arma 3 Alpha - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item17 + class Item18 { className="A3_Structures_F_Bootcamp"; name="Arma 3 Bootcamp Update - Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item18 + class Item19 { className="ace_flashsuppressors"; name="ACE3 - Flash Suppressors"; author="ACE-Team"; url="http://ace3mod.com/"; }; - class Item19 + class Item20 { className="A3_Weapons_F_Exp"; name="Arma 3 Apex - Weapons and Accessories"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item20 + class Item21 { className="ace_laserpointer"; name="ACE3 - Laser Pointer"; author="ACE-Team"; url="http://ace3mod.com/"; }; - class Item21 + class Item22 { className="A3_Weapons_F_Orange"; name="Arma 3 Orange - Weapons and Accessories"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item22 + class Item23 { className="ace_huntir"; name="ACE3 - HuntIR"; author="ACE-Team"; url="http://ace3mod.com/"; }; - class Item23 + class Item24 { className="A3_Weapons_F_Mark"; name="Arma 3 Marksmen - Weapons and Accessories"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item24 + class Item25 { className="A3_Characters_F_Exp"; name="Arma 3 Apex - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item25 + class Item26 + { + className="ace_reload"; + name="ACE3 - Reload"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item27 { className="A3_Modules_F_Curator"; name="Arma 3 Zeus Update - Scripted Modules"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item26 + class Item28 { className="A3_Weapons_F_Tank"; name="Arma 3 Tank - Weapons and Accessories"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item27 + class Item29 { className="A3_Drones_F"; name="Arma 3 Beta - Drones"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item28 + class Item30 { className="A3_Characters_F_Orange"; name="Arma 3 Orange - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item29 + class Item31 { className="A3_Characters_F_Tacops"; name="Arma 3 Tac-Ops - Characters and Clothing"; @@ -1387,7 +1402,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_luftwaffe.paa"; + value="assets\paa\schild_luftwaffe.paa"; }; }; }; @@ -1447,7 +1462,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_luftwaffe.paa"; + value="assets\paa\schild_luftwaffe.paa"; }; }; }; @@ -1507,7 +1522,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_luftwaffe.paa"; + value="assets\paa\schild_luftwaffe.paa"; }; }; }; @@ -1567,7 +1582,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_verkaufen.paa"; + value="assets\paa\schild_verkaufen.paa"; }; }; }; @@ -1627,7 +1642,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_verkaufen.paa"; + value="assets\paa\schild_verkaufen.paa"; }; }; }; @@ -1687,7 +1702,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_verkaufen.paa"; + value="assets\paa\schild_verkaufen.paa"; }; }; }; @@ -1747,7 +1762,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_panzer.paa"; + value="assets\paa\schild_panzer.paa"; }; }; }; @@ -1807,7 +1822,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_panzer.paa"; + value="assets\paa\schild_panzer.paa"; }; }; }; @@ -1867,7 +1882,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_panzer.paa"; + value="assets\paa\schild_panzer.paa"; }; }; }; @@ -1927,7 +1942,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_radar.paa"; + value="assets\paa\schild_radar.paa"; }; }; }; @@ -1987,7 +2002,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_radar.paa"; + value="assets\paa\schild_radar.paa"; }; }; }; @@ -2047,7 +2062,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_radar.paa"; + value="assets\paa\schild_radar.paa"; }; }; }; @@ -2107,7 +2122,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_nachschub.paa"; + value="assets\paa\schild_nachschub.paa"; }; }; }; @@ -2167,7 +2182,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_nachschub.paa"; + value="assets\paa\schild_nachschub.paa"; }; }; }; @@ -2227,7 +2242,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_nachschub.paa"; + value="assets\paa\schild_nachschub.paa"; }; }; }; @@ -2286,7 +2301,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_fahrzeuge.paa"; + value="assets\paa\schild_fahrzeuge.paa"; }; }; }; @@ -2345,7 +2360,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_fahrzeuge.paa"; + value="assets\paa\schild_fahrzeuge.paa"; }; }; }; @@ -2404,7 +2419,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_fahrzeuge.paa"; + value="assets\paa\schild_fahrzeuge.paa"; }; }; }; @@ -2464,7 +2479,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -2524,7 +2539,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -2584,7 +2599,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -2644,7 +2659,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_service.paa"; + value="assets\paa\schild_service.paa"; }; }; }; @@ -2704,7 +2719,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_service.paa"; + value="assets\paa\schild_service.paa"; }; }; }; @@ -2764,7 +2779,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_service.paa"; + value="assets\paa\schild_service.paa"; }; }; }; @@ -2824,7 +2839,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -2884,7 +2899,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -2944,7 +2959,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -3004,7 +3019,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -3064,7 +3079,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -3124,7 +3139,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -3184,7 +3199,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -3244,7 +3259,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -3304,7 +3319,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -3364,7 +3379,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -3424,7 +3439,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -3484,7 +3499,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -3525,7 +3540,7 @@ class Mission }; id=1339; type="Land_Billboard_F"; - atlOffset=0.1099999; + atlOffset=0.10999966; class CustomAttributes { class Attribute0 @@ -7689,7 +7704,7 @@ class Mission type="rectangle"; a=0.30000001; b=1.5; - angle=225.10907; + angle=225.10904; id=709; atlOffset=0.017092228; }; @@ -10501,7 +10516,7 @@ class Mission speedMode="LIMITED"; }; id=817; - atlOffset=0.1099999; + atlOffset=185.97; }; class Item1 { @@ -10635,7 +10650,7 @@ class Mission speedMode="LIMITED"; }; id=819; - atlOffset=0.10994148; + atlOffset=185.97; }; class Item2 { @@ -10769,7 +10784,7 @@ class Mission speedMode="LIMITED"; }; id=821; - atlOffset=0.10994148; + atlOffset=185.97; }; class Item3 { @@ -10903,7 +10918,7 @@ class Mission speedMode="LIMITED"; }; id=823; - atlOffset=0.10994148; + atlOffset=185.97; }; class Item4 { @@ -11047,15 +11062,15 @@ class Mission speedMode="LIMITED"; }; id=825; - atlOffset=0.1099999; + atlOffset=185.97; }; }; id=816; - atlOffset=0.10997438; + atlOffset=185.97; }; }; id=1; - atlOffset=0.29880166; + atlOffset=-43.694275; }; class Item1 { @@ -11102,7 +11117,7 @@ class Mission }; }; id=0; - atlOffset=0.038498878; + atlOffset=-11.443501; }; class Item1 { @@ -15702,7 +15717,7 @@ class Mission type="rectangle"; a=0.30000001; b=1.5; - angle=112.67313; + angle=112.67311; id=747; atlOffset=-0.032529354; }; @@ -17380,7 +17395,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_luftwaffe.paa"; + value="assets\paa\schild_luftwaffe.paa"; }; }; }; @@ -17440,7 +17455,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_luftwaffe.paa"; + value="assets\paa\schild_luftwaffe.paa"; }; }; }; @@ -17500,7 +17515,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_luftwaffe.paa"; + value="assets\paa\schild_luftwaffe.paa"; }; }; }; @@ -17560,7 +17575,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_verkaufen.paa"; + value="assets\paa\schild_verkaufen.paa"; }; }; }; @@ -17620,7 +17635,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_verkaufen.paa"; + value="assets\paa\schild_verkaufen.paa"; }; }; }; @@ -17680,7 +17695,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_verkaufen.paa"; + value="assets\paa\schild_verkaufen.paa"; }; }; }; @@ -17740,7 +17755,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_panzer.paa"; + value="assets\paa\schild_panzer.paa"; }; }; }; @@ -17800,7 +17815,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_panzer.paa"; + value="assets\paa\schild_panzer.paa"; }; }; }; @@ -17860,7 +17875,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_panzer.paa"; + value="assets\paa\schild_panzer.paa"; }; }; }; @@ -17920,7 +17935,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_radar.paa"; + value="assets\paa\schild_radar.paa"; }; }; }; @@ -17980,7 +17995,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_radar.paa"; + value="assets\paa\schild_radar.paa"; }; }; }; @@ -18040,7 +18055,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_radar.paa"; + value="assets\paa\schild_radar.paa"; }; }; }; @@ -18100,7 +18115,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_nachschub.paa"; + value="assets\paa\schild_nachschub.paa"; }; }; }; @@ -18160,7 +18175,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_nachschub.paa"; + value="assets\paa\schild_nachschub.paa"; }; }; }; @@ -18220,7 +18235,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_nachschub.paa"; + value="assets\paa\schild_nachschub.paa"; }; }; }; @@ -18280,7 +18295,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_fahrzeuge.paa"; + value="assets\paa\schild_fahrzeuge.paa"; }; }; }; @@ -18340,7 +18355,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_fahrzeuge.paa"; + value="assets\paa\schild_fahrzeuge.paa"; }; }; }; @@ -18400,7 +18415,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_fahrzeuge.paa"; + value="assets\paa\schild_fahrzeuge.paa"; }; }; }; @@ -18460,7 +18475,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -18520,7 +18535,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -18580,7 +18595,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -18640,7 +18655,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_service.paa"; + value="assets\paa\schild_service.paa"; }; }; }; @@ -18700,7 +18715,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_service.paa"; + value="assets\paa\schild_service.paa"; }; }; }; @@ -18760,7 +18775,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_service.paa"; + value="assets\paa\schild_service.paa"; }; }; }; @@ -18820,7 +18835,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -18880,7 +18895,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -18940,7 +18955,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -19000,7 +19015,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -19060,7 +19075,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -19120,7 +19135,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -19180,7 +19195,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -19240,7 +19255,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -19300,7 +19315,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -19360,7 +19375,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -19420,7 +19435,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -19480,7 +19495,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_teleport.paa"; + value="assets\paa\schild_teleport.paa"; }; }; }; @@ -19570,7 +19585,7 @@ class Mission class PositionInfo { position[]={23779.016,4.933187,18808.525}; - angles[]={0,4.6652865,-0}; + angles[]={0,4.6652865,0}; }; side="Empty"; flags=5; @@ -21158,7 +21173,7 @@ class Mission speedMode="LIMITED"; }; id=800; - atlOffset=0.10949993; + atlOffset=185.97; }; class Item1 { @@ -21292,7 +21307,7 @@ class Mission speedMode="LIMITED"; }; id=803; - atlOffset=0.10957623; + atlOffset=185.97; }; class Item2 { @@ -21407,7 +21422,7 @@ class Mission speedMode="LIMITED"; }; id=805; - atlOffset=1.4781952e-005; + atlOffset=185.97; }; class Item3 { @@ -21541,7 +21556,7 @@ class Mission speedMode="LIMITED"; }; id=807; - atlOffset=0.10975552; + atlOffset=185.97; }; class Item4 { @@ -21666,11 +21681,11 @@ class Mission speedMode="LIMITED"; }; id=812; - atlOffset=0.10978603; + atlOffset=185.97; }; }; id=814; - atlOffset=0.10977602; + atlOffset=185.97; }; class Item12 { @@ -21885,7 +21900,7 @@ class Mission }; }; id=311; - atlOffset=0.13767529; + atlOffset=-11.559929; }; class Item1 { @@ -21931,7 +21946,7 @@ class Mission }; }; id=310; - atlOffset=0.068837881; + atlOffset=-30.29866; }; class Item2 { @@ -51819,7 +51834,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -51878,7 +51893,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -51937,7 +51952,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -52056,7 +52071,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -52115,7 +52130,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; @@ -52174,7 +52189,7 @@ class Mission "STRING" }; }; - value="ingame_bilder\schild_muni.paa"; + value="assets\paa\schild_muni.paa"; }; }; }; diff --git a/[J]OPT.Altis/radar/functions/fnc_initCBASettings.sqf b/[J]OPT.Altis/radar/functions/fnc_initCBASettings.sqf index 2eadb80..1bf635e 100644 --- a/[J]OPT.Altis/radar/functions/fnc_initCBASettings.sqf +++ b/[J]OPT.Altis/radar/functions/fnc_initCBASettings.sqf @@ -76,6 +76,15 @@ if (!GVAR(on)) exitWith{}; {} // function that will be executed once on mission start and every time the setting is changed. ] call CBA_Settings_fnc_init; +[ + QGVAR(radarDruchmesser), // Internal setting name, should always contain a tag! This will be the global variable which takes the value of the setting. + "SLIDER", // setting type + "Druchmesser Radarkreis", // Pretty name shown inside the ingame settings menu. Can be stringtable entry. + "OPT Radar", // Pretty name of the category where the setting can be found. Can be stringtable entry. + [1000, 6000, 4000, 2], // data for this setting: [min, max, default, number of shown trailing decimals] + 1, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer + {} // function that will be executed once on mission start and every time the setting is changed. +] call CBA_Settings_fnc_init; diff --git a/[J]OPT.Altis/radar/functions/fnc_runRadar.sqf b/[J]OPT.Altis/radar/functions/fnc_runRadar.sqf index 97cdd69..7321eb0 100644 --- a/[J]OPT.Altis/radar/functions/fnc_runRadar.sqf +++ b/[J]OPT.Altis/radar/functions/fnc_runRadar.sqf @@ -15,7 +15,7 @@ #include "script_component.hpp" private _container = [] call FUNC(getRadar); -private _size = 4500; +private _size = GVAR(radarDruchmesser); private _markerwest = []; private _markerost = []; private _Geschwindigkeitfaktor = 5; diff --git a/[J]OPT.Altis/waffenwechsel/XEH_PREP.hpp b/[J]OPT.Altis/waffenwechsel/XEH_PREP.hpp index e3c4909..4733570 100644 --- a/[J]OPT.Altis/waffenwechsel/XEH_PREP.hpp +++ b/[J]OPT.Altis/waffenwechsel/XEH_PREP.hpp @@ -9,3 +9,4 @@ PREP(onLoadDialog); PREP(openDialog); PREP(postInit); PREP(waffenconfig); +PREP(waffenMagazinFilter); diff --git a/[J]OPT.Altis/waffenwechsel/functions/fnc_auslesenmagazine.sqf b/[J]OPT.Altis/waffenwechsel/functions/fnc_auslesenmagazine.sqf index 67ab90a..8c5ce81 100644 --- a/[J]OPT.Altis/waffenwechsel/functions/fnc_auslesenmagazine.sqf +++ b/[J]OPT.Altis/waffenwechsel/functions/fnc_auslesenmagazine.sqf @@ -39,32 +39,6 @@ params if (_veh isEqualTo objNull) exitWith{[]}; /* CODE BODY */ -private _magazineVeh = magazines _veh; -private _weaponsVeh = weapons _veh; - -_weaponsVeh deleteAt (_weaponsVeh find "OPT_CMFlareLauncher"); -_weaponsVeh deleteAt (_weaponsVeh find "OPT_CMFlareLauncher_Triples"); -_weaponsVeh = _weaponsVeh select {_x != ""}; - -private _magazineFilter = -[ - "96Rnd_CMFlare_Chaff_Magazine", - "120Rnd_CMFlare_Chaff_Magazine", - "240Rnd_CMFlare_Chaff_Magazine", - "60Rnd_CMFlare_Chaff_Magazine", - "192Rnd_CMFlare_Chaff_Magazine", - "168Rnd_CMFlare_Chaff_Magazine", - "300Rnd_CMFlare_Chaff_Magazine", - "OPT_12Rnd_CMFlare_Chaff_Magazine", - "OPT_20Rnd_CMFlare_Chaff_Magazine", - "OPT_30Rnd_CMFlare_Chaff_Magazine" -]; - -{ - _magazineVeh deleteAt (_magazineVeh find _x); -} forEach _magazineFilter; - -_magazineVeh = _magazineVeh select {_x != ""}; private _magazineVehArry = magazinesAmmo _veh; private _magazineVehPylon = []; @@ -84,7 +58,7 @@ if (count _magazineVehPylonArry > 0) then //systemchat format ["MP:%1 I:%2 MN:%3 AP:%4",_magazineVehPylon,_i,(_magazineVehPylonArry select _i-1),(_veh ammoOnPylon (_pylon select _i-1))]; sleep 0.001; }; -}; +}; //kontrolle Bewaffnung Auslesung private _magazineFilter2 = @@ -109,6 +83,9 @@ private _magazineFilter2 = _magazineVehArry deleteAt (_magazineVehArry find _x); } forEach _magazineVehPylon; -_magazineVehArryNew = _magazineVehArry + _magazineVehPylon; +private _magazineVehArryNew = []; +_magazineVehArryNew = _magazineVehArry + _magazineVehPylon; +//systemchat format ["MAV:%1 MP:%2",_magazineVehArry,_magazineVehPylon]; + _magazineVehArryNew \ No newline at end of file diff --git a/[J]OPT.Altis/waffenwechsel/functions/fnc_bewaffnen.sqf b/[J]OPT.Altis/waffenwechsel/functions/fnc_bewaffnen.sqf index 209ad80..8d5fd78 100644 --- a/[J]OPT.Altis/waffenwechsel/functions/fnc_bewaffnen.sqf +++ b/[J]OPT.Altis/waffenwechsel/functions/fnc_bewaffnen.sqf @@ -85,6 +85,8 @@ if (_side == civilian) then } else { + //systemchat format ["BewaffAV:%1 BM:%2",_magazineVeh,_buyGunMagazine]; + {_veh removeWeapon _x} forEach _weaponsVeh; {_veh removeMagazine _x} forEach _magazineVeh; diff --git a/[J]OPT.Altis/waffenwechsel/functions/fnc_onLoadDialog.sqf b/[J]OPT.Altis/waffenwechsel/functions/fnc_onLoadDialog.sqf index 653c960..11c997a 100644 --- a/[J]OPT.Altis/waffenwechsel/functions/fnc_onLoadDialog.sqf +++ b/[J]OPT.Altis/waffenwechsel/functions/fnc_onLoadDialog.sqf @@ -270,6 +270,7 @@ if (_vehType in (GVAR(vehclasswestWW) + GVAR(vehclasseastWW))) then { _boxArry = []; _side = civilian; + _pylon = []; _loadouts = []; }; }; @@ -278,13 +279,19 @@ if (_vehType in (GVAR(vehclasswestWW) + GVAR(vehclasseastWW))) then //Schütze aussteigen (gunner _veh) action ["getout", _veh]; -//Festellung Bewaffnung -private _magazineVeh = magazines _veh; -private _weaponsVeh = weapons _veh; -private _magazineVehArryNew = []; +//auslesen und filtern +private _waffenMagazinArry = []; +private _weaponsVeh =[]; +private _magazineVeh=[]; -_magazineVehArryNew = [_veh] call FUNC(auslesenMagazine); +_waffenMagazinArry = [_veh] call FUNC(waffenMagazinFilter); +_weaponsVeh =_waffenMagazinArry select 0; +_magazineVeh = _waffenMagazinArry select 1; + +//Festellung Bewaffnung +_magazineVehArryNew = [_veh] call FUNC(auslesenMagazine); + // Darstellung Magazine private _magazineVehCount = count _magazineVehArryNew; @@ -604,40 +611,43 @@ else // Abfrage Laden Loadouts -if (GVAR(WWloadout)) then -{ - if (_veh isKindOf "Air") then - { - //Gun - lbSetCurSel [10010, (_loadouts select 1) select 0]; - //Raketten - lbSetCurSel [10012, (_loadouts select 0) select 0]; - lbSetCurSel [10013, (_loadouts select 0) select 1]; - - if (count (_loadouts select 0) > 2) then - { - lbSetCurSel [10014, (_loadouts select 0) select 2]; - lbSetCurSel [10015, (_loadouts select 0) select 3]; - }; - //Datalink - lbSetCurSel [10016, (_loadouts select 3) select 0]; - - } - else - { - //Gun - for "_i" from 0 to (count (_loadouts select 1)) do - { - lbSetCurSel [10010+_i, (_loadouts select 1) select _i]; - sleep 0.001; +if (_vehType in (GVAR(vehclasswestWW) + GVAR(vehclasseastWW))) then +{ + if (GVAR(WWloadout)) then + { + if (_veh isKindOf "Air") then + { + //Gun + lbSetCurSel [10010, (_loadouts select 1) select 0]; + //Raketten + lbSetCurSel [10012, (_loadouts select 0) select 0]; + lbSetCurSel [10013, (_loadouts select 0) select 1]; + + if (count (_loadouts select 0) > 2) then + { + lbSetCurSel [10014, (_loadouts select 0) select 2]; + lbSetCurSel [10015, (_loadouts select 0) select 3]; + }; + //Datalink + lbSetCurSel [10016, (_loadouts select 3) select 0]; + + } + else + { + //Gun + for "_i" from 0 to (count (_loadouts select 1)) do + { + lbSetCurSel [10010+_i, (_loadouts select 1) select _i]; + sleep 0.001; + }; + + //Datalink + lbSetCurSel [10016, (_loadouts select 3) select 0]; + }; - - //Datalink - lbSetCurSel [10016, (_loadouts select 3) select 0]; - }; -}; - +}; + //Dynamische Kostenanzeige OPTWWbuygo = 0; OPTWWlostgo = 0; diff --git a/[J]OPT.Altis/waffenwechsel/functions/fnc_waffenMagazinFilter.sqf b/[J]OPT.Altis/waffenwechsel/functions/fnc_waffenMagazinFilter.sqf new file mode 100644 index 0000000..6dd0878 --- /dev/null +++ b/[J]OPT.Altis/waffenwechsel/functions/fnc_waffenMagazinFilter.sqf @@ -0,0 +1,74 @@ +/** +* Description: +* Funktion Waffen+Magazine Filtern +* +* Author: +* [GNC]Lord-MDB +* +* Arguments: +* 0: Fahrzeug, dass ausgelesen werden soll +* +* Return Value: +* _waffenMagazinArry +* +* Server only: +* no +* +* Public: +* no +* +* Global: +* no +* +* Sideeffects: +* no +* +* Example: +* [vehicle] call EFUNC(waffenwechsel,waffenMagazinFilter); +*/ +#include "script_component.hpp" + +/* PARAMS */ +params +[ + ["_veh", objNull, [objNull], 1] +]; + +/* VALIDATION */ + +/* CODE BODY */ + +private _magazineVeh = magazines _veh; +private _weaponsVeh = weapons _veh; +private _magazineVehArryNew = []; +private _waffenMagazinArry = []; + +_weaponsVeh deleteAt (_weaponsVeh find "OPT_CMFlareLauncher"); +_weaponsVeh deleteAt (_weaponsVeh find "OPT_CMFlareLauncher_Triples"); +_weaponsVeh = _weaponsVeh select {_x != ""}; + +private _magazineVeh = magazines _veh; + +private _magazineFilter = +[ + "96Rnd_CMFlare_Chaff_Magazine", + "120Rnd_CMFlare_Chaff_Magazine", + "240Rnd_CMFlare_Chaff_Magazine", + "60Rnd_CMFlare_Chaff_Magazine", + "192Rnd_CMFlare_Chaff_Magazine", + "168Rnd_CMFlare_Chaff_Magazine", + "300Rnd_CMFlare_Chaff_Magazine", + "OPT_12Rnd_CMFlare_Chaff_Magazine", + "OPT_20Rnd_CMFlare_Chaff_Magazine", + "OPT_30Rnd_CMFlare_Chaff_Magazine" +]; + +{ + _magazineVeh deleteAt (_magazineVeh find _x); +} forEach _magazineFilter; + +_magazineVeh = _magazineVeh select {_x != ""}; + +_waffenMagazinArry =[_weaponsVeh,_magazineVeh]; + +_waffenMagazinArry \ No newline at end of file diff --git a/[J]OPT.Altis/waffenwechsel/functions/fnc_waffenconfig.sqf b/[J]OPT.Altis/waffenwechsel/functions/fnc_waffenconfig.sqf index 2615bb1..e350970 100644 --- a/[J]OPT.Altis/waffenwechsel/functions/fnc_waffenconfig.sqf +++ b/[J]OPT.Altis/waffenwechsel/functions/fnc_waffenconfig.sqf @@ -55,8 +55,8 @@ GVAR(Raktenheliwest) = GVAR(Gunheliwest) = [ ["5000Rnd_762x51_Yellow_Belt", "OPT_M134_minigun", 10, 50000, "5000x7.62 mm"], // 0.5000x7.62 mm Minigun - ["1000Rnd_65x39_Belt_Yellow", "LMG_Minigun_heli", 10, 10000, "1000x7.62 mm"], // 1.1000x7.62 mm Minigun - ["2000Rnd_65x39_Belt_Yellow", "LMG_Minigun_heli", 10, 20000, "2000x7.62 mm"], // 2.2000x7.62 mm Minigun + ["1000Rnd_65x39_Belt_Yellow", "LMG_Minigun_heli", 10, 10000, "1000x6.5 mm mm"], // 1.1000x6.5 mm mm Minigun + ["2000Rnd_65x39_Belt_Yellow", "LMG_Minigun_heli", 10, 20000, "2000x6.5 mm mm"], // 2.2000x6.5 mm mm Minigun ["1000Rnd_20mm_shells", "OPT_gatling_20mm", 100, 100000, "1000x20 mm"], // 3.1000x20 mm Minigun ["2000Rnd_20mm_shells", "OPT_gatling_20mm", 100, 200000, "2000x20 mm"], // 4.2000x20 mm Minigun ["300Rnd_20mm_shells", "OPT_gatling_20mm", 100, 30000, "300x20 mm"], // 5.300x20 mm Minigun @@ -142,8 +142,8 @@ GVAR(Raktenhelieast) = GVAR(Gunhelieast) = [ ["5000Rnd_762x51_Yellow_Belt", "OPT_M134_minigun", 10, 50000, "5000x7.62 mm"], // 0.5000x7.62 mm Minigun - ["1000Rnd_65x39_Belt_Yellow", "LMG_Minigun_heli", 10, 10000, "1000x7.62 mm"], // 1.1000x7.62 mm Minigun - ["2000Rnd_65x39_Belt_Yellow", "LMG_Minigun_heli", 10, 20000, "2000x7.62 mm"], // 2.2000x7.62 mm Minigun + ["1000Rnd_65x39_Belt_Yellow", "LMG_Minigun_heli", 10, 10000, "1000x6.5 mm"], // 1.1000x6.5 mm Minigun + ["2000Rnd_65x39_Belt_Yellow", "LMG_Minigun_heli", 10, 20000, "2000x6.5 mm"], // 2.2000x6.5 mm Minigun ["1000Rnd_20mm_shells", "OPT_gatling_20mm", 100, 100000, "1000x20 mm"], // 3.1000x20 mm Minigun ["2000Rnd_20mm_shells", "OPT_gatling_20mm", 100, 200000, "2000x20 mm"], // 4.2000x20 mm Minigun ["300Rnd_20mm_shells", "OPT_gatling_20mm", 100, 30000, "300x20 mm"], // 5.300x20 mm Minigun @@ -296,34 +296,35 @@ GVAR(textsloteast) = "OPT_CSAT_Offizier" ]; -//West Einheiten Loadouts -//[[Raketen], [Gun], [Drahtkäfig, Tranung], [Datalink]] -GVAR(Pawneeloadout) = [[4,13], [0], [0, 0], [1]]; -GVAR(hellcat1loadout) = [[4,13], [0], [0, 0], [1]]; -GVAR(Blackfootloadout) = [[4,4,12, 15], [3], [0, 0], [1]]; -GVAR(HunterHMGloadout) = [[], [0], [0, 0], [1]]; -GVAR(HunterGMGloadout) = [[], [10], [0, 0], [1]]; -GVAR(ProwlerHMGloadout) = [[], [0], [0, 0], [1]]; -GVAR(ProwlerATloadout) = [[], [16,16], [0, 0], [1]]; -GVAR(Pantherloadout) = [[], [0, 10], [0, 0], [1]]; -GVAR(Marshallloadout) = [[], [3, 12, 13], [0, 0], [1]]; -GVAR(Moraloadout) = [[], [3, 14, 15], [0, 0], [1]]; -GVAR(Cheetahloadout) = [[], [20, 22], [0, 0], [1]]; -GVAR(SlammerUploadout) = [[], [3,24, 25], [0, 0], [1]]; -GVAR(Scorcherloadout) = [[], [40,40], [0, 0], [1]]; +//West Einheiten Loadouts (Arrystelle von Einheitconfig als Boxindex) +//[[Raketen], [Gun], [Drahtkäfig, Tranung], [Datalink]] +GVAR(Pawneeloadout) = [[2, 7], [0], [0, 0], [0]]; +GVAR(hellcat1loadout) = [[2, 7], [0], [0, 0], [0]]; +GVAR(Blackfootloadout) = [[2 , 2, 8, 9], [0], [0, 0], [0]]; +GVAR(HunterHMGloadout) = [[], [0], [0, 0], [0]]; +GVAR(HunterGMGloadout) = [[], [3], [0, 0], [0]]; +GVAR(ProwlerHMGloadout) = [[], [0], [0, 0], [0]]; +GVAR(ProwlerATloadout) = [[], [0, 0], [0, 0], [0]]; +GVAR(Pantherloadout) = [[], [0, 7], [0, 0], [0]]; +GVAR(Marshallloadout) = [[], [0, 4, 5], [0, 0], [0]]; +GVAR(Moraloadout) = [[], [0, 4, 5], [0, 0], [0]]; +GVAR(Cheetahloadout) = [[], [0, 1], [0, 0], [0]]; +GVAR(SlammerUploadout) = [[], [0, 4, 5], [0, 0], [0]]; +GVAR(Scorcherloadout) = [[], [0,0], [0, 0], [0]]; //EAST Einheiten Loadouts -GVAR(Orcaloadout) = [[4,13], [0], [0, 0], [1]]; -GVAR(hellcatloadout) = [[4,13], [0], [0, 0], [1]]; -GVAR(Kajmanloadout) = [[4,4, 12, 15], [3], [0, 0], [1]]; -GVAR(irifHMGloadout) = [[], [0], [0, 0], [1]]; -GVAR(irifGMGloadout) = [[], [10], [0, 0], [1]]; -GVAR(StriderGMGloadout) = [[], [10], [0, 0], [1]]; -GVAR(QuilinHMGloadout) = [[], [0], [0, 0], [1]]; -GVAR(QuilinATloadout) = [[], [16, 16], [0, 0], [1]]; -GVAR(Maridloadout) = [[], [0, 10], [0, 0], [1]]; -GVAR(Gorgonloadout) = [[], [3, 12, 13], [0, 0], [1]]; -GVAR(Kamyshloadout) = [[], [3,14, 15], [0, 0], [1]]; -GVAR(Tigrisloadout) = [[], [20, 22], [0, 0], [1]]; -GVAR(Varsukloadout) = [[], [3,33, 34], [0, 0], [1]]; -GVAR(Sochorloadout) = [[], [40,40], [0, 0], [1]]; \ No newline at end of file +GVAR(Orcaloadout) = [[2,7], [0], [0, 0], [0]]; +GVAR(hellcatloadout) = [[2,7], [0], [0, 0], [0]]; +GVAR(Kajmanloadout) = [[2, 2, 8, 9], [0], [0, 0], [0]]; +GVAR(irifHMGloadout) = [[], [0], [0, 0], [0]]; +GVAR(irifGMGloadout) = [[], [3], [0, 0], [0]]; +GVAR(StriderGMGloadout) = [[], [3], [0, 0], [0]]; +GVAR(QuilinHMGloadout) = [[], [0], [0, 0], [0]]; +GVAR(QuilinATloadout) = [[], [0, 0], [0, 0], [0]]; +GVAR(Maridloadout) = [[], [0, 7], [0, 0], [0]]; +GVAR(Gorgonloadout) = [[], [0, 4, 5], [0, 0], [0]]; +GVAR(Kamyshloadout) = [[], [0, 4, 5], [0, 0], [0]]; +GVAR(Tigrisloadout) = [[], [0, 1], [0, 0], [0]]; +GVAR(Varsukloadout) = [[], [0, 4, 5], [0, 0], [0]]; +GVAR(Sochorloadout) = [[], [0,0], [0, 0], [0]]; + diff --git a/[J]OPT.Altis/warehouse/functions/fnc_initCBAClassEvents.sqf b/[J]OPT.Altis/warehouse/functions/fnc_initCBAClassEvents.sqf index 4f0d982..669db36 100644 --- a/[J]OPT.Altis/warehouse/functions/fnc_initCBAClassEvents.sqf +++ b/[J]OPT.Altis/warehouse/functions/fnc_initCBAClassEvents.sqf @@ -1,6 +1,6 @@ /** * Author: James -* initialize server side CBA Class Handler +* initialize CBA class event handler * * Arguments: * None @@ -14,51 +14,6 @@ */ #include "script_component.hpp" -/* CLASS EH */ -/* EXAMPLE FROM https://github.com/CBATeam/CBA_A3/wiki/Adding-Event-Handlers-to-Classes-of-Objects -["CAManBase", "fired", {systemChat str _this}] call CBA_fnc_addClassEventHandler; -This will show a chat message every time a soldier fires a weapon. It is advised to use CAManBase instead of Man when dealing with soldiers, because Man is the parent class of all animals, including the randomly spawning rabbits, snakes and fish. Using CAManBase slightly reduces the overhead that would happen when any of these spawn (which actually happens pretty frequently). - -["AllVehicles", "getIn", {hint str _this}] call CBA_fnc_addClassEventHandler; -This event happens every time a soldier enters a vehicle. -*/ - - -// fügt auf allen clients einen Add Action Eintrag für umgekippte Fahrzeuge hinzu -// ersetzt player add action in onPlayerRespawn (viel performanter, da kein pulling) -["LandVehicle", "init", { - params ["_vec"]; - - _vec addAction [ - "Fahrzeug aufrichten" call XTuerkiesText, - {[_target] call EFUNC(common,unFlip);}, - [], - 0, - false, - true, - "", - format["[_target, player] call %1", QEFUNC(common,flipCheck)] - ]; - -}, nil, nil, true] call CBA_fnc_addClassEventHandler; - -["Air", "init", { - params ["_vec"]; - - _vec addAction [ - "Fahrzeug aufrichten" call XTuerkiesText, - {[_target] call EFUNC(common,unFlip);}, - [], - 0, - false, - true, - "", - format["[_target, player] call %1", QEFUNC(common,flipCheck)] - ]; - -}, nil, nil, true] call CBA_fnc_addClassEventHandler; - - // add killed EH to all kind of vehicles, either on map or later spawned via crteateVehicle arrayIntersect // -> log kill and delete if near base ["LandVehicle", "killed", { diff --git a/[J]OPT_v1_4_15_1.Altis.pbo b/[J]OPT_v1_4_15_1.Altis.pbo deleted file mode 100644 index e84771a..0000000 Binary files a/[J]OPT_v1_4_15_1.Altis.pbo and /dev/null differ diff --git a/[J]OPT_v1_4_15_2.Altis.pbo b/[J]OPT_v1_4_15_2.Altis.pbo new file mode 100644 index 0000000..9797528 Binary files /dev/null and b/[J]OPT_v1_4_15_2.Altis.pbo differ