diff --git a/AUTHORS.txt b/AUTHORS.txt index 19b096f9a1..6b51c1990a 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -38,7 +38,7 @@ Alganthe Anthariel Asgar Serran Bla1337 -BlackPixxel +BlackPixxel BlackQwar Brakoviejo Brisse @@ -70,6 +70,7 @@ Hawkins Head jokoho482 ` Jonpas +Karneck Kavinsky Kllrt legman @@ -84,6 +85,7 @@ nikolauska nomisum OnkelDisMaster oscarmolinadev +PaxJaromeMalues pokertour Professor rakowozz diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 2c3488f92d..db0140756d 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -114,7 +114,7 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; -"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(ACE_time), ACE_time - floor(ACE_time)]; +"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, floor(ACE_time), ACE_time - floor(ACE_time)]; [{ private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"]; diff --git a/addons/aircraft/CfgWeapons.hpp b/addons/aircraft/CfgWeapons.hpp index ac8a759bd3..e97889eabf 100644 --- a/addons/aircraft/CfgWeapons.hpp +++ b/addons/aircraft/CfgWeapons.hpp @@ -20,7 +20,7 @@ class CfgWeapons { reloadTime = 0.01; magazineReloadTime = 0.1; }; - + // Manual Switching Of Flare Mode class SmokeLauncher; class CMFlareLauncher: SmokeLauncher { @@ -106,12 +106,14 @@ class CfgWeapons { class M134_minigun: MGunCore { class LowROF: Mode_FullAuto { - reloadTime = 0.015; //0.03; same as above @todo - dispersion = 0.006; //0.0023; + reloadTime = 0.03; //0.03; same as above @todo + dispersion = 0.0064; //0.0023; + multiplier = 1; }; class HighROF: LowROF { - reloadTime = 0.015; //0.03; - dispersion = 0.006; //0.0023; + reloadTime = 0.02; //0.03; + dispersion = 0.0064; //0.0023; + multiplier = 1; }; class close: HighROF {}; class short: close {}; diff --git a/addons/atragmx/CfgVehicles.hpp b/addons/atragmx/CfgVehicles.hpp index 65ef589d0f..2d85b39a4a 100644 --- a/addons/atragmx/CfgVehicles.hpp +++ b/addons/atragmx/CfgVehicles.hpp @@ -24,10 +24,7 @@ class CfgVehicles { displayName = "ATragMX"; vehicleClass = "Items"; class TransportItems { - class ACE_ATragMX { - name = "ACE_ATragMX"; - count = 1; - }; + MACRO_ADDITEM(ACE_ATragMX,1); }; }; diff --git a/addons/attach/CfgMagazines.hpp b/addons/attach/CfgMagazines.hpp index a000222adc..f85cac82b4 100644 --- a/addons/attach/CfgMagazines.hpp +++ b/addons/attach/CfgMagazines.hpp @@ -3,14 +3,17 @@ class CfgMagazines { class CA_Magazine; class B_IR_Grenade: CA_Magazine { ACE_Attachable = "B_IRStrobe"; + model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); }; class O_IR_Grenade: B_IR_Grenade { ACE_Attachable = "O_IRStrobe"; + model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); }; class I_IR_Grenade: B_IR_Grenade { ACE_Attachable = "I_IRStrobe"; + model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); }; class SmokeShell; diff --git a/addons/attach/CfgWeapons.hpp b/addons/attach/CfgWeapons.hpp index 3ad2591f63..dfea64678d 100644 --- a/addons/attach/CfgWeapons.hpp +++ b/addons/attach/CfgWeapons.hpp @@ -1,4 +1,3 @@ - class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; @@ -9,11 +8,11 @@ class CfgWeapons { scope = 2; displayName = CSTRING(IrStrobe_Name); descriptionShort = CSTRING(IrStrobe_Description); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; + model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); picture = PATHTOF(UI\irstrobe_item.paa); class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; -}; +}; \ No newline at end of file diff --git a/addons/attach/GUI_VirtualAmmo.hpp b/addons/attach/GUI_VirtualAmmo.hpp new file mode 100644 index 0000000000..69e98e7ecb --- /dev/null +++ b/addons/attach/GUI_VirtualAmmo.hpp @@ -0,0 +1,30 @@ +class RscTitles { + class GVAR(virtualAmmo) { + idd = -1; + movingEnable = 1; + duration = 9999999; + fadein = 0; + fadeout = 0; + onLoad = "uiNamespace setVariable ['ACE_attach_virtualAmmoDisplay', (_this select 0)];"; + class controls {}; + class objects { + class TheObject { + idc = 800851; + type = 82; + model = "\a3\weapons_f\Ammo\Handgrenade.p3d"; + scale = 1; + direction[] = {0, 0, 1}; + up[] = {0, 1, 0}; + x = 0.5; + y = 0.5; + z = 1; + xBack = 0.5; + yBack = 0.5; + zBack = 0.5; + inBack = 0; + enableZoom = 0; + zoomDuration = 1; + }; + }; + }; +}; diff --git a/addons/attach/config.cpp b/addons/attach/config.cpp index e8983cefde..0ecc37788a 100644 --- a/addons/attach/config.cpp +++ b/addons/attach/config.cpp @@ -16,3 +16,4 @@ class CfgPatches { #include "CfgMagazines.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" +#include "GUI_VirtualAmmo.hpp" diff --git a/addons/attach/data/ace_IRStrobe.p3d b/addons/attach/data/ace_IRStrobe.p3d new file mode 100644 index 0000000000..67f3d55f89 Binary files /dev/null and b/addons/attach/data/ace_IRStrobe.p3d differ diff --git a/addons/attach/data/ace_IRStrobe.rvmat b/addons/attach/data/ace_IRStrobe.rvmat new file mode 100644 index 0000000000..5557299263 --- /dev/null +++ b/addons/attach/data/ace_IRStrobe.rvmat @@ -0,0 +1,90 @@ +class StageTI +{ + texture = "a3\data_f\default_glass_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,1}; +emmisive[] = {0,0,0,1}; +specular[] = {0.99999976,0.99999976,0.99999976,1}; +specularPower = 128; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\attach\data\ace_IRStrobe_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.1,0.1,0.1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,32,128,1)fresnel(0.71,0.74)"; + uvSource = "none"; +}; +class Stage7 +{ + texture = "a3\data_f\env_land_co.paa"; + useWorldEnvMap = "true"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1.0,0.0,0.0}; + up[] = {0.0,1.0,0.0}; + dir[] = {0.0,0.0,0.0}; + pos[] = {0.0,0.0,0.0}; + }; +}; \ No newline at end of file diff --git a/addons/attach/data/ace_IRStrobe_co.paa b/addons/attach/data/ace_IRStrobe_co.paa new file mode 100644 index 0000000000..02d5889edc Binary files /dev/null and b/addons/attach/data/ace_IRStrobe_co.paa differ diff --git a/addons/attach/data/ace_IRStrobe_nohq.paa b/addons/attach/data/ace_IRStrobe_nohq.paa new file mode 100644 index 0000000000..380b89b7dc Binary files /dev/null and b/addons/attach/data/ace_IRStrobe_nohq.paa differ diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 984c231366..6738b3e8c8 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID"]; +private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"]; PARAMS_3(_attachToVehicle,_unit,_args); _itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam; @@ -47,26 +47,43 @@ if (_unit == _attachToVehicle) then { //Self Attachment _attachToVehicle setVariable [QGVAR(Objects), [_attachedItem], true]; _attachToVehicle setVariable [QGVAR(ItemNames), [_itemClassname], true]; } else { - GVAR(placeAction) = -1; - - _tempObject = _itemVehClass createVehicleLocal [0,0,-10000]; - _tempObject enableSimulationGlobal false; + GVAR(placeAction) = PLACE_WAITING; [_unit, QGVAR(vehAttach), true] call EFUNC(common,setForceWalkStatus); - //MenuBack isn't working for now (localize "STR_ACE_Attach_CancelAction") [{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame); - _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = 1;}] call EFUNC(common,AddActionEventHandler)]; - // _unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {true}, {GVAR(placeAction) = 0;}] call EFUNC(common,AddActionEventHandler)]; + _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)]; - _actionID = _unit addAction [format ["%1", localize LSTRING(CancelAction)], {GVAR(placeAction) = 0}]; + _actionID = _unit addAction [format ["%1", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}]; + + //Display to show virtual object: + private []; + _model = getText (configFile >> "CfgAmmo" >> _itemVehClass >> "model"); + if (_model == "") then { + _model = getText (configFile >> "CfgVehicles" >> _itemVehClass >> "model"); + }; + //"\A3\Weapons_F\empty.p3d" is fine, but ctrlSetModel ""; - will crash game! + if (_model == "") exitWith {ERROR("No Model");}; + (QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false]; + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModel _model; [{ - private "_startingPosition"; - PARAMS_2(_args,_pfID); - EXPLODE_7_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_tempObject,_onAtachText,_actionID); + private["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"]; - if ((GVAR(placeAction) != -1) || + PARAMS_2(_args,_pfID); + EXPLODE_6_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_actionID); + + _virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]); + if (cameraView == "EXTERNAL") then { + _virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0])); + }; + _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition); + _lineInterection = lineIntersects [eyePos ACE_player, _virtualPosASL, ACE_player]; + + //Don't allow placing in a bad position: + if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;}; + + if ((GVAR(placeAction) != PLACE_WAITING) || {_unit != ACE_player} || {!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} || {!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then { @@ -75,16 +92,31 @@ if (_unit == _attachToVehicle) then { //Self Attachment [_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus); [] call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); - //[_unit, "MenuBack", (_unit getVariable [QGVAR(cancelActionEH), -1])] call EFUNC(common,removeActionEventHandler); _unit removeAction _actionID; - if (GVAR(placeAction) == 1) then { - _startingPosition = _tempObject modelToWorldVisual [0,0,0]; - [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _startingPosition] call FUNC(placeApprove); + (QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + + if (GVAR(placeAction) == PLACE_APPROVE) then { + [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _virtualPos] call FUNC(placeApprove); }; - deleteVehicle _tempObject; } else { - _tempObject setPosATL ((ASLtoATL eyePos _unit) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]));; + //Show the virtual object: + if (_lineInterection) then { + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false; + } else { + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow true; + _screenPos = worldToScreen _virtualPos; + if (_screenPos isEqualTo []) exitWith { + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false; + }; + _realDistance = (_virtualPos distance (positionCameraToWorld [0,0,0])) / ((call CBA_fnc_getFov) select 1); + _screenPos = [(_screenPos select 0), _realDistance, (_screenPos select 1)]; + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetPosition _screenPos; + _dir = (positionCameraToWorld [0,0,1]) vectorFromTo (positionCameraToWorld [0,0,0]); + _angle = asin (_dir select 2); + _up = [0, cos _angle, sin _angle]; + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModelDirAndUp [[1,0,0], _up]; + }; }; - }, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _tempObject, _onAtachText, _actionID]] call CBA_fnc_addPerFrameHandler; + }, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _actionID]] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index d85a65df2b..efd85769d0 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -25,7 +25,7 @@ */ #include "script_component.hpp" -private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_setupObject", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"]; +private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"]; PARAMS_6(_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition); @@ -37,9 +37,6 @@ _closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]); _closeInMax = _startDistanceFromCenter; _closeInMin = 0; -//Delete Local Placement Object -deleteVehicle _setupObject; - while {(_closeInMax - _closeInMin) > 0.01} do { _closeInDistance = (_closeInMax + _closeInMin) / 2; // systemChat format ["Trying %1 from %2 start %3", _closeInDistance, [_closeInMax, _closeInMin], _startDistanceFromCenter]; diff --git a/addons/attach/script_component.hpp b/addons/attach/script_component.hpp index 409f74ab94..604a47fcb4 100644 --- a/addons/attach/script_component.hpp +++ b/addons/attach/script_component.hpp @@ -9,4 +9,8 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH #endif -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file +#include "\z\ace\addons\main\script_macros.hpp" + +#define PLACE_WAITING -1 +#define PLACE_CANCEL 0 +#define PLACE_APPROVE 1 diff --git a/addons/backpacks/README.md b/addons/backpacks/README.md index 9c721428b1..6fa54a9897 100644 --- a/addons/backpacks/README.md +++ b/addons/backpacks/README.md @@ -1,8 +1,7 @@ -ace_lockbackpacks +ace_backpacks ================= -Introduces the ability to lock one's backpack. - +Adds indication when someone else opens your backpack (soundeffect / camShake). ## Maintainers diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index a65daba683..39cf65cac7 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -178,6 +178,7 @@ Ustawienia więźniów Ajustes de prisioneros Nastavení zajatce + Gefangenen-Einstellungen Ajustes de prisioneiros @@ -185,6 +186,7 @@ Moduł ten kontroluje ustawienia kapitulacji oraz opasek zaciskowych Ajustes de control para rendición y precintos Toto kontroluje nastavení kapitulace a pout + Einstellungen zur Kapitulation und Kabelbindern Controla as configurações de rendição e abraçadeiras @@ -192,6 +194,7 @@ Skuwanie sojuszników Se puede esposar el bando propio Může spoutat spolubojovníky + Kann Teamkollegen fesseln Pode algemar o próprio lado @@ -199,6 +202,7 @@ Czy gracze mogą skuwać sojuszników? Pueden los jugadores esposar unidades en su propio bando Mohou hráči spoutat jednotky na své straně + Können Spieler eigene Einheiten fesseln Os jogadores podem algemar unidades do seu lado @@ -206,6 +210,7 @@ Pozwól kapitulować Permitir rendición Povolit vzdávání + Kapitulation erlauben Permite rendição @@ -213,7 +218,8 @@ Gracze mogą skapitulować po schowaniu swojej broni do kabury Los jugadores pueden rendirse después de enfundar su arma Hráč se může vzdát poté, co si skryje zbraň + Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben Jogadores podem se render depois de guardar sua arma - \ No newline at end of file + diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index 767822f4ea..e0ac3a22ec 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -113,10 +113,7 @@ class CfgVehicles { author = CSTRING(ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_banana { - name = "ACE_banana"; - count = 1; - }; + MACRO_ADDITEM(ACE_banana,1); }; }; }; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 22513ec468..8b8b3a9005 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -37,6 +37,14 @@ }; }] call FUNC(addEventhandler); +//~~~~~Get Map Data~~~~~ +//Find MGRS zone and 100km grid for current map +[] call FUNC(getMGRSdata); +//Prepare variables for FUNC(getMapGridFromPos)/FUNC(getMapPosFromGrid) +[] call FUNC(getMapGridData); + + + ["fixCollision", DFUNC(fixCollision)] call FUNC(addEventhandler); ["fixFloating", DFUNC(fixFloating)] call FUNC(addEventhandler); ["fixPosition", DFUNC(fixPosition)] call FUNC(addEventhandler); diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 54f374fcc2..6c088a3542 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -69,7 +69,11 @@ PREP(getFirstTerrainIntersection); PREP(getForceWalkStatus); PREP(getGunner); PREP(getInPosition); +PREP(getMapGridData); +PREP(getMapGridFromPos); +PREP(getMapPosFromGrid); PREP(getMarkerType); +PREP(getMGRSdata); PREP(getName); PREP(getNumberFromMissionSQM); PREP(getNumberMagazinesIn); diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf new file mode 100644 index 0000000000..775f439174 --- /dev/null +++ b/addons/common/functions/fnc_getMGRSdata.sqf @@ -0,0 +1,165 @@ +/* + * Author: VKing + * Gets the current map's MGRS grid zone designator and 100km square. + * Also gets longitude, latitude and altitude offset for the map + * + * Argument: + * 0: Optional: Map name, if undefined the current map is used (String) + * + * Return value: + * 0: Grid zone designator (String) + * 1: 100km square (String) + * 2: GZD + 100km sq. as a single string (String) + * Writes return values to GVAR(MGRS_data) if run on the current map + */ + +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +private ["_zone","_band","_GZD","_long","_lat","_UTM","_easting","_northing", "_altitude"]; + +DEFAULT_PARAM(0,_map,worldName); + +_long = getNumber (ConfigFile >> "CfgWorlds" >> _map >> "longitude"); +_lat = getNumber (ConfigFile >> "CfgWorlds" >> _map >> "latitude"); +_altitude = getNumber (ConfigFile >> "CfgWorlds" >> _map >> "elevationOffset"); + +if (_map in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { _lat = 50; _altitude = 0; }; +if (_map in ["Altis", "Stratis"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["Takistan", "Zargabad", "Mountains_ACR"]) then { _lat = 35; _altitude = 2000; }; +if (_map in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { _lat = 35; _altitude = 100; }; +if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; }; +if (_map in ["fata", "Abbottabad"]) then { _lat = 30; _altitude = 1000; }; +if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; }; +if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; }; +if (_map in ["Bornholm"]) then { _lat = 55; _altitude = 0; }; +if (_map in ["Imrali"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["Caribou"]) then { _lat = 68; _altitude = 0; }; +if (_map in ["Namalsk"]) then { _lat = 65; _altitude = 0; }; +if (_map in ["MCN_Aliabad"]) then { _lat = 36; _altitude = 0; }; +if (_map in ["Clafghan"]) then { _lat = 34; _altitude = 640; }; +if (_map in ["Sangin", "hellskitchen"]) then { _lat = 32; _altitude = 0; }; +if (_map in ["Sara"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; }; +if (_map in ["Thirsk"]) then { _lat = 65; _altitude = 0; }; +if (_map in ["lingor"]) then { _lat = -4; _altitude = 0; }; +if (_map in ["Panthera3"]) then { _lat = 46; _altitude = 0; }; +if (_map in ["Kunduz"]) then { _lat = 37; _altitude = 400; }; + + +_UTM = [_long,_lat] call BIS_fnc_posDegToUTM; +_easting = _UTM select 0; +_northing = _UTM select 1; +// _zone = _UTM select 2; +TRACE_4("",_UTM,_easting,_northing,_zone); + +/* +_band = switch (true) do { + case (_lat<-72): {"C"}; + case (_lat<-64): {"D"}; + case (_lat<-56): {"E"}; + case (_lat<-48): {"F"}; + case (_lat<-40): {"G"}; + case (_lat<-32): {"H"}; + case (_lat<-24): {"J"}; + case (_lat<-16): {"K"}; + case (_lat<-8): {"L"}; + case (_lat<0): {"M"}; + case (_lat>72): {"X"}; + case (_lat>64): {"W"}; + case (_lat>56): {"V"}; + case (_lat>48): {"U"}; + case (_lat>40): {"T"}; + case (_lat>32): {"S"}; + case (_lat>24): {"R"}; + case (_lat>16): {"Q"}; + case (_lat>8): {"P"}; + case (_lat>=0): {"N"}; +}; + */ +_zone = 1 + (floor ((_long + 180) / 6)); +_band = "Z"; +if (_lat <= -80) then { + _band = "A"; +} else { + if (_lat < 84) then { + _band = "CDEFGHJKLMNPQRSTUVWXX" select [(floor ((_lat / 8) + 10)), 1]; + }; +}; +if (_map == "VR") then {_zone = 0; _band = "RV";}; + +_GZD = format ["%1%2",_zone,_band]; +TRACE_3("",_zone,_band,_GZD); + + +private ["_set1","_set2","_set3","_set4","_set5","_set6","_metaE","_metaN","_letterE","_letterN","_grid100km"]; + +_set1 = [1,7,13,19,25,31,37,43,49,55]; +_set2 = [2,8,14,20,26,32,38,44,50,56]; +_set3 = [3,9,15,21,27,33,39,45,51,57]; +_set4 = [4,10,16,22,28,34,40,46,52,58]; +_set5 = [5,11,17,23,29,35,41,47,53,59]; +_set6 = [6,12,18,24,30,36,42,48,54,60]; + +switch (true) do { +case (_zone in _set1): {_metaE = 1; _metaN = 1;}; +case (_zone in _set2): {_metaE = 2; _metaN = 2;}; +case (_zone in _set3): {_metaE = 3; _metaN = 1;}; +case (_zone in _set4): {_metaE = 1; _metaN = 2;}; +case (_zone in _set5): {_metaE = 2; _metaN = 1;}; +case (_zone in _set6): {_metaE = 3; _metaN = 2;}; +}; +TRACE_2("",_metaE,_metaN); + +switch (true) do { +case (_zone == 0): {_letterE = "E"}; +case (_easting > 800000): {LOG("E8"); switch (_metaE) do {case 1: {_letterE="H"}; case 2: {_letterE="R"}; case 3: {_letterE="Z"}; }; }; +case (_easting > 700000): {LOG("E7"); switch (_metaE) do {case 1: {_letterE="G"}; case 2: {_letterE="Q"}; case 3: {_letterE="Y"}; }; }; +case (_easting > 600000): {LOG("E6"); switch (_metaE) do {case 1: {_letterE="F"}; case 2: {_letterE="P"}; case 3: {_letterE="X"}; }; }; +case (_easting > 500000): {LOG("E5"); switch (_metaE) do {case 1: {_letterE="E"}; case 2: {_letterE="N"}; case 3: {_letterE="W"}; }; }; +case (_easting > 400000): {LOG("E4"); switch (_metaE) do {case 1: {_letterE="D"}; case 2: {_letterE="M"}; case 3: {_letterE="V"}; }; }; +case (_easting > 300000): {LOG("E3"); switch (_metaE) do {case 1: {_letterE="C"}; case 2: {_letterE="L"}; case 3: {_letterE="U"}; }; }; +case (_easting > 200000): {LOG("E2"); switch (_metaE) do {case 1: {_letterE="B"}; case 2: {_letterE="K"}; case 3: {_letterE="T"}; }; }; +case (_easting > 100000): {LOG("E1"); switch (_metaE) do {case 1: {_letterE="A"}; case 2: {_letterE="J"}; case 3: {_letterE="S"}; }; }; + default {_letterE="@"}; +}; +TRACE_1("",_letterE); + +_northing = _northing mod 2000000; +TRACE_1("",_northing); + +switch (true) do { +case (_zone == 0): {_letterN = "N"}; +case (_northing > 1900000): {LOG("N19"); switch (_metaN) do {case 1: {_letterN = "V"}; case 2: {_letterN = "E"}; }; }; +case (_northing > 1800000): {LOG("N18"); switch (_metaN) do {case 1: {_letterN = "U"}; case 2: {_letterN = "D"}; }; }; +case (_northing > 1700000): {LOG("N17"); switch (_metaN) do {case 1: {_letterN = "T"}; case 2: {_letterN = "C"}; }; }; +case (_northing > 1600000): {LOG("N16"); switch (_metaN) do {case 1: {_letterN = "S"}; case 2: {_letterN = "B"}; }; }; +case (_northing > 1500000): {LOG("N15"); switch (_metaN) do {case 1: {_letterN = "R"}; case 2: {_letterN = "A"}; }; }; +case (_northing > 1400000): {LOG("N14"); switch (_metaN) do {case 1: {_letterN = "Q"}; case 2: {_letterN = "V"}; }; }; +case (_northing > 1300000): {LOG("N13"); switch (_metaN) do {case 1: {_letterN = "P"}; case 2: {_letterN = "U"}; }; }; +case (_northing > 1200000): {LOG("N12"); switch (_metaN) do {case 1: {_letterN = "N"}; case 2: {_letterN = "T"}; }; }; +case (_northing > 1100000): {LOG("N11"); switch (_metaN) do {case 1: {_letterN = "M"}; case 2: {_letterN = "S"}; }; }; +case (_northing > 1000000): {LOG("N10"); switch (_metaN) do {case 1: {_letterN = "L"}; case 2: {_letterN = "R"}; }; }; +case (_northing > 900000): {LOG("N09"); switch (_metaN) do {case 1: {_letterN = "K"}; case 2: {_letterN = "Q"}; }; }; +case (_northing > 800000): {LOG("N08"); switch (_metaN) do {case 1: {_letterN = "J"}; case 2: {_letterN = "P"}; }; }; +case (_northing > 700000): {LOG("N07"); switch (_metaN) do {case 1: {_letterN = "H"}; case 2: {_letterN = "N"}; }; }; +case (_northing > 600000): {LOG("N06"); switch (_metaN) do {case 1: {_letterN = "G"}; case 2: {_letterN = "M"}; }; }; +case (_northing > 500000): {LOG("N05"); switch (_metaN) do {case 1: {_letterN = "F"}; case 2: {_letterN = "L"}; }; }; +case (_northing > 400000): {LOG("N04"); switch (_metaN) do {case 1: {_letterN = "E"}; case 2: {_letterN = "K"}; }; }; +case (_northing > 300000): {LOG("N03"); switch (_metaN) do {case 1: {_letterN = "D"}; case 2: {_letterN = "J"}; }; }; +case (_northing > 200000): {LOG("N02"); switch (_metaN) do {case 1: {_letterN = "C"}; case 2: {_letterN = "H"}; }; }; +case (_northing > 100000): {LOG("N01"); switch (_metaN) do {case 1: {_letterN = "B"}; case 2: {_letterN = "G"}; }; }; +case (_northing > 0): {LOG("N00"); switch (_metaN) do {case 1: {_letterN = "A"}; case 2: {_letterN = "F"}; }; }; +}; +TRACE_1("",_letterN); + +_grid100km = _letterE+_letterN; +TRACE_1("",_grid100km); + +if (_map == worldName) then { + GVAR(MGRS_data) = [_GZD,_grid100km,_GZD+_grid100km]; + GVAR(mapAltitude) = _altitude; + GVAR(mapLatitude) = _lat; + GVAR(mapLongitude) = _long; +}; +[_GZD,_grid100km,_GZD+_grid100km] \ No newline at end of file diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf new file mode 100644 index 0000000000..308772bfff --- /dev/null +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -0,0 +1,76 @@ +/* + * Author: PabstMirror (ideas from Nou's mapGridToPos and BIS_fnc_gridToPos) + * Finds real x/y offset and map step for a 10 digit grid + * Save time by preparing data one time at startup + * + * Argument: + * None + * + * Return values: + * None + * + * Example: + * [] call ace_map_fnc_getMapGridData + * + * Public: No + */ +#include "script_component.hpp" + +private["_cfgGrid", "_formatX", "_formatY", "_heightOffset", "_offsetX", "_offsetY", "_originGrid", "_realOffsetY", "_startGrid", "_stepX", "_stepY", "_zoom", "_zoomMax", "_letterGrid"]; + +GVAR(mapGridData) = []; + +//--- Extract grid values from world config (Borrowed from BIS_fnc_gridToPos) +_cfgGrid = configFile >> "CfgWorlds" >> worldName >> "Grid"; +_offsetX = getNumber (_cfgGrid >> "offsetX"); +_offsetY = getNumber (_cfgGrid >> "offsetY"); +_zoomMax = 1e99; +_formatX = ""; +_formatY = ""; +_stepX = 1e10; +_stepY = 1e10; +{ + _zoom = getnumber (_x >> "zoomMax"); + if (_zoom < _zoomMax) then { + _zoomMax = _zoom; + _formatX = getText (_x >> "formatX"); + _formatY = getText (_x >> "formatY"); + _stepX = getNumber (_x >> "stepX"); + _stepY = getNumber (_x >> "stepY"); + }; +} foreach configProperties [_cfgGrid, "isClass _x", false]; + +_letterGrid = false; +if (((toLower _formatX) find "a") != -1) then {_letterGrid = true}; +if (((toLower _formatY) find "a") != -1) then {_letterGrid = true}; +if (_letterGrid) exitWith { + diag_log text format ["[ACE] Map Grid Warning (%1) - Map uses letter grids [%2,%3]", worldName, _formatX, _formatY]; +}; + +//Start at [0, 500] and move north until we get a change in grid +_heightOffset = 500; +_startGrid = mapGridPosition [0, _heightOffset]; +_originGrid = _startGrid; +while {_startGrid == _originGrid} do { + _heightOffset = _heightOffset + 1; + _originGrid = mapGridPosition [0, _heightOffset]; +}; + +//Calculate the real y offset +_realOffsetY = parseNumber (_originGrid select [(count _formatX), (count _formatY)]) * _stepY + _heightOffset - 1; + +//Calculate MGRS 10digit step - they should both be 1 meter: +_stepXat5 = _stepX * 10 ^ ((count _formatX) - 5); +_stepYat5 = -1 * _stepY * 10 ^ ((count _formatY) - 5); + +if (_stepYat5 < 0) then { + diag_log text format ["[ACE] Map Grid Warning (%1) - Northing is reversed", worldName]; +}; +if (_stepXat5 != 1) then { + diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x", worldName, _stepXat5]; +}; +if ((_stepYat5 != 1) && {_stepYat5 != -1}) then { + diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y", worldName, _stepXat5]; +}; + +GVAR(mapGridData) = [_offsetX, _realOffsetY, _stepXat5, _stepYat5]; diff --git a/addons/common/functions/fnc_getMapGridFromPos.sqf b/addons/common/functions/fnc_getMapGridFromPos.sqf new file mode 100644 index 0000000000..983b78ffff --- /dev/null +++ b/addons/common/functions/fnc_getMapGridFromPos.sqf @@ -0,0 +1,63 @@ +/* + * Author: VKing, PabstMirror + * Gets a 10-digit map grid for the given world position + * + * Argument: + * 0: Position (2D Position) + * 1: Return type; false for array of easting and northing, true for single string + * + * Return values: + * 0: Easting + * 1: Northing + * + * Example: + * [(getPos player)] call ace_common_fnc_getMapGridFromPos; + * + * Public: Yes + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +PARAMS_1(_pos); +DEFAULT_PARAM(1,_returnSingleString,false); + +private["_count", "_easting", "_nativeGrid", "_northing"]; + +//Fallback, when map data is weird (letters) +if ((count GVAR(mapGridData)) == 0) exitWith { + _nativeGrid = mapGridPosition _pos; + if (_returnSingleString) then { + _nativeGrid + } else { + _count = floor ((count _nativeGrid) / 2); + [(_nativeGrid select [0, _count]), (_nativeGrid select [_count, _count])] + }; +}; + +EXPLODE_4_PVT(GVAR(mapGridData),_offsetX,_realOffsetY,_stepXat5,_stepYat5); +_easting = floor (((_pos select 0) - _offsetX) / _stepXat5); +_northing = floor (((_pos select 1) - _realOffsetY) / _stepYat5); + +//Attempt to handle negative east/north (e.g.: moving west of map bounds) +if (_easting > 0) then { + _easting = str _easting; + while {count _easting < 5} do {_easting = "0" + _easting;}; +} else { + _easting = str abs _easting; + while {count _easting < 4} do {_easting = "0" + _easting;}; + _easting = "-" + _easting; +}; +if (_northing > 0) then { + _northing = str _northing; + while {count _northing < 5} do {_northing = "0" + _northing;}; +} else { + _northing = str abs _northing; + while {count _northing < 4} do {_northing = "0" + _northing;}; + _northing = "-" + _northing; +}; + +if (_returnSingleString) then { + _easting + _northing +} else { + [_easting, _northing] +}; diff --git a/addons/common/functions/fnc_getMapPosFromGrid.sqf b/addons/common/functions/fnc_getMapPosFromGrid.sqf new file mode 100644 index 0000000000..20194df88a --- /dev/null +++ b/addons/common/functions/fnc_getMapPosFromGrid.sqf @@ -0,0 +1,46 @@ +/* + * Author: PabstMirror + * Gets position from grid cords + * + * Argument: + * 0: Grid Cords + * 1: Get Center or bottom right + * + * Return values: + * Position + * + * Example: + * ["6900080085"] call ace_common_fnc_getMapPosFromGrid + * + * Public: Yes + */ +#include "script_component.hpp" + +PARAMS_1(_inputString); +DEFAULT_PARAM(1,_getCenterOfGrid,true); + +private["_countInput", "_countInputHalf", "_xPart", "_xPos", "_yPart", "_yPos"]; + +if ((count GVAR(mapGridData)) == 0) exitWith { + ERROR("Map has bad data, falling back to BIS_fnc_gridToPos"); + (_this call BIS_fnc_gridToPos) select 0 +}; + +EXPLODE_4_PVT(GVAR(mapGridData),_offsetX,_realOffsetY,_stepXat5,_stepYat5); + +_countInput = count _inputString; +_countInputHalf = floor (_countInput / 2); + +//Split string, ignoring middle +_xPart = _inputString select [0, _countInputHalf]; +_yPart = _inputString select [(ceil (_countInput / 2)), _countInputHalf]; + +_xPos = ((parseNumber _xPart) * _stepXat5 * 10 ^ (5 - _countInputHalf)) + _offsetX; +_yPos = ((parseNumber _yPart) * _stepYat5 * 10 ^ (5 - _countInputHalf)) + _realOffsetY; + +if (_getCenterOfGrid) then { + _xPos = _xPos + 0.5 * _stepXat5 * 10 ^ (5 - _countInputHalf); + _yPos = _yPos + 0.5 * _stepYat5 * 10 ^ (5 - _countInputHalf); +}; + +[_xPos, _yPos, 0]; diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index 8effc3680d..d50e09fb15 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -41,11 +41,11 @@ if ((typeName _value) != (_settingData select 1)) then { _failed = true; if ((_settingData select 1) == "BOOL" and (typeName _value) == "SCALAR") then { // If value is not 0 or 1 consider it invalid and don't set anything - if (_value == 0) then { + if (_value isEqualTo 0) then { _value = false; _failed = false; }; - if (_value == 1) then { + if (_value isEqualTo 1) then { _value = true; _failed = false; }; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 28a40e382a..6ed5e10d5a 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -577,6 +577,7 @@ Toggle Handheld Device Seleccionar dispositivo de mano + Handheld aufrufen Ativa dispositivo de mão Przełącz urządzenie podręczne Přepnout ruční zařízení @@ -584,6 +585,7 @@ Close Handheld Device Cerrar dispositivo de mano + Handheld schließen Fecha dispositivo de mão Zamknij urządzenie podręczne Zavřít ruční zařízení @@ -591,9 +593,10 @@ Cycle Handheld Devices Cambiar dispositivos de mano + Handheld wechseln Troca dispositivos de mão Następne urządzenie podręczne Procházet ruční zařízení - \ No newline at end of file + diff --git a/addons/concertina_wire/XEH_postInit.sqf b/addons/concertina_wire/XEH_postInit.sqf index ff3b5c5167..58bd1f63c7 100644 --- a/addons/concertina_wire/XEH_postInit.sqf +++ b/addons/concertina_wire/XEH_postInit.sqf @@ -9,3 +9,5 @@ GVAR(deployPFH) = -1; GVAR(placer) setVariable [QGVAR(wireDeployed), true]; }; }] call EFUNC(common,addEventHandler); + +[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call EFUNC(common,addEventHandler); diff --git a/addons/concertina_wire/XEH_preInit.sqf b/addons/concertina_wire/XEH_preInit.sqf index f15feb48bd..582d642484 100644 --- a/addons/concertina_wire/XEH_preInit.sqf +++ b/addons/concertina_wire/XEH_preInit.sqf @@ -7,5 +7,6 @@ PREP(dismount); PREP(dismountSuccess); PREP(handleDamage); PREP(handleKilled); +PREP(vehicleDamage); ADDON = true; diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf index 2d2cd7f789..f5f84a6afa 100644 --- a/addons/concertina_wire/functions/fnc_handleKilled.sqf +++ b/addons/concertina_wire/functions/fnc_handleKilled.sqf @@ -17,7 +17,9 @@ PARAMS_2(_wire,_killer); -if (isNull _killer) then { +private ["_distance", "_vehicle"]; + +if (isNull _killer) then { _killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull]; if (isNull _killer) then { _killer = nearestObject [_wire, "car"]; @@ -25,111 +27,9 @@ if (isNull _killer) then { }; if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {}; -private ["_type", "_mode", "_distance", "_anim", "_parts", "_selectionPart", "_selection", "_pos_w", "_dir_w", "_vehicle"]; -_type = typeOf _wire; -_mode = switch (_type) do { - case "ACE_ConcertinaWire": { 0 }; - case "Land_Razorwire_F": { 1 }; - default { -1 }; -}; - -if (_mode == -1) exitWith {}; - -// _mode = 0 = Single Coil -// _mode = 1 = Triple Coil - -// -------------------------------- -// L M R -// 4.54929 (4) -// 6.13564 (6) -//9.78744 (10) - _distance = _wire distance _killer; if (_distance > 14 || {_distance < 2}) exitWith {}; // Fix if shooting wire -_type = typeOf _wire; -_anim = _wire animationPhase "wire_2"; -_pos_w = getPos _wire; -_dir_w = getDir _wire; _vehicle = vehicle _killer; -if (_mode == 0) then { - private ["_x", "_y", "_found", "_wireCheckPosAr", "_no"]; - _x = _pos_w select 0; - _y = _pos_w select 1; - // Check if two Single coils are placed next to each other (i.e playes have built a big wire obstacle) - _wireCheckPosAr = [ - [_x + (sin (_dir_w+90) * 1.5),_y + (cos (_dir_w+90) * 1.5)], - [(_x-(sin _dir_w)) + (sin (_dir_w+90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w+90) * 1.5)], - [_x + (sin (_dir_w-90) * 1.5),_y + (cos (_dir_w-90) * 1.5)], - [(_x-(sin _dir_w)) + (sin (_dir_w-90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w-90) * 1.5)] - ]; - { - _found = false; - _no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log "....."; - _no = _no - [_wire]; //diag_log _no; - if (count _no > 0) exitWith { - _found = true; //diag_log "found"; - }; - } foreach _wireCheckPosAr; - // Double coil found! - if (_found) then { - _mode = 1; - } else { - // Randomly make a single coil also catch tanks, if speed is high - if (_vehicle isKindOf "Tank" && {20 > random 100} && {speed _vehicle > 30}) then { - _mode = 1; - } else { - if !(_vehicle isKindOf "Tank") then { - _mode = 1; - }; - }; - }; -}; - -if (_mode == 1) then { - switch (true) do { - case (_vehicle isKindOf "Tank"): { - _parts = ["ltrack","rtrack"]; - }; - case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): { - _parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"]; - }; - }; -} else { - switch (true) do { - case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): { - _parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"]; - }; - }; -}; - -if (canMove _vehicle) then { - { - _selectionPart = "hit" + _x; - if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then { - _selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name"); - // TODO: Only the tires that have touched the wire should burst. - _vehicle setHit [_selection, 1]; - }; - } forEach _parts; -}; - -if (_mode == 1) then { - if (_vehicle isKindOf "StaticWeapon") exitWith {}; - [{ - PARAMS_2(_vehicle,_wire); - - _vehicle setVelocity ((velocity _vehicle) vectorMultiply 0.75); - - private ["_vPos", "_vDir"]; - // Set vehicle back in front of wire, since the wire will make the vehicle jump, and a wire with no geometry lod is undestructible and not recognizeable - _vPos = getPosASL _vehicle; - _vDir = getDir _vehicle; - _vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]); - // TODO: Needs to be placed in safe distance to wire, so we do not constantly re-spawn new wires - }, [_vehicle, _wire], 0.1, 0] call EFUNC(common,waitAndExecute); -}; - -//TODO: Create broken geoless wire (two version) -//TODO: Make wire remains stop vehicles +[QGVAR(vehicleDamage), [_vehicle], [_wire, _vehicle]] call EFUNC(common,targetEvent); diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf new file mode 100644 index 0000000000..e7dff30000 --- /dev/null +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -0,0 +1,123 @@ +/* + * Author: Rocko + * Handles vehicle damage from hitting wire + * + * Arguments: + * 0: wire + * 1: vehicle + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_2(_wire,_vehicle); + +private ["_type", "_mode", "_anim", "_parts", "_selectionPart", "_selection", "_pos_w", "_dir_w"]; + +_type = typeOf _wire; +_mode = switch (_type) do { +case "ACE_ConcertinaWire": { 0 }; +case "Land_Razorwire_F": { 1 }; + default { -1 }; +}; + +if (_mode == -1) exitWith {}; + +// _mode = 0 = Single Coil +// _mode = 1 = Triple Coil + +// -------------------------------- +// L M R +// 4.54929 (4) +// 6.13564 (6) +//9.78744 (10) + +_type = typeOf _wire; +_anim = _wire animationPhase "wire_2"; +_pos_w = getPos _wire; +_dir_w = getDir _wire; + +if (_mode == 0) then { + private ["_x", "_y", "_found", "_wireCheckPosAr", "_no"]; + _x = _pos_w select 0; + _y = _pos_w select 1; + // Check if two Single coils are placed next to each other (i.e playes have built a big wire obstacle) + _wireCheckPosAr = [ + [_x + (sin (_dir_w+90) * 1.5),_y + (cos (_dir_w+90) * 1.5)], + [(_x-(sin _dir_w)) + (sin (_dir_w+90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w+90) * 1.5)], + [_x + (sin (_dir_w-90) * 1.5),_y + (cos (_dir_w-90) * 1.5)], + [(_x-(sin _dir_w)) + (sin (_dir_w-90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w-90) * 1.5)] + ]; + { + _found = false; + _no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log "....."; + _no = _no - [_wire]; //diag_log _no; + if (count _no > 0) exitWith { + _found = true; //diag_log "found"; + }; + } foreach _wireCheckPosAr; + // Double coil found! + if (_found) then { + _mode = 1; + } else { + // Randomly make a single coil also catch tanks, if speed is high + if (_vehicle isKindOf "Tank" && {20 > random 100} && {speed _vehicle > 30}) then { + _mode = 1; + } else { + if !(_vehicle isKindOf "Tank") then { + _mode = 1; + }; + }; + }; +}; + +if (_mode == 1) then { + switch (true) do { + case (_vehicle isKindOf "Tank"): { + _parts = ["ltrack","rtrack"]; + }; + case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): { + _parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"]; + }; + }; +} else { + switch (true) do { + case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): { + _parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"]; + }; + }; +}; + +if (canMove _vehicle) then { + { + _selectionPart = "hit" + _x; + if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then { + _selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name"); + // TODO: Only the tires that have touched the wire should burst. + _vehicle setHit [_selection, 1]; + }; + } forEach _parts; +}; + +if (_mode == 1) then { + if (_vehicle isKindOf "StaticWeapon") exitWith {}; + [{ + PARAMS_2(_vehicle,_wire); + + _vehicle setVelocity ((velocity _vehicle) vectorMultiply 0.75); + + private ["_vPos", "_vDir"]; + // Set vehicle back in front of wire, since the wire will make the vehicle jump, and a wire with no geometry lod is undestructible and not recognizeable + _vPos = getPosASL _vehicle; + _vDir = getDir _vehicle; + _vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]); + // TODO: Needs to be placed in safe distance to wire, so we do not constantly re-spawn new wires + }, [_vehicle, _wire], 0.1] call EFUNC(common,waitAndExecute); +}; + +//TODO: Create broken geoless wire (two version) +//TODO: Make wire remains stop vehicles diff --git a/addons/concertina_wire/script_component.hpp b/addons/concertina_wire/script_component.hpp index f3f353f181..3512643b81 100644 --- a/addons/concertina_wire/script_component.hpp +++ b/addons/concertina_wire/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT concertina_wire #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL + #ifdef DEBUG_ENABLED_CONCERTINA_WIRE #define DEBUG_MODE_FULL #endif diff --git a/addons/concertina_wire/stringtable.xml b/addons/concertina_wire/stringtable.xml index 4400866e87..812de87e6c 100644 --- a/addons/concertina_wire/stringtable.xml +++ b/addons/concertina_wire/stringtable.xml @@ -6,7 +6,7 @@ NATO-Draht Проволочная спираль Drut kolczasty - Concertina wire + Alambre de espino Concertina wire Ostnatý drát Concertina wire @@ -18,7 +18,7 @@ NATO-Draht Rolle Проволочная спираль (моток) Zwój drutu kolczastego - Concertina wire coil + Bobina de alambre de espino Concertina wire coil Smyčka ostnatého drátu Concertina wire coil @@ -30,7 +30,7 @@ NATO-Draht abbauen Демонтировать проволочную спираль Zwiń drut kolczasty - Dismount Concertina wire + Desmontar alambre de espino Dismount Concertina wire Svinout ostnatý drát Dismount Concertina wire @@ -42,7 +42,7 @@ NATO-Draht verlegen Монтировать проволочную спираль Rozwiń drut kolczasty - Deploy Concertina wire + Desplegar alambre de espino Deploy Concertina wire Rozvinout ostnatý drát Deploy Concertina wire diff --git a/addons/dagr/CfgVehicles.hpp b/addons/dagr/CfgVehicles.hpp index f26d8841ae..a9948ca8aa 100644 --- a/addons/dagr/CfgVehicles.hpp +++ b/addons/dagr/CfgVehicles.hpp @@ -33,10 +33,7 @@ class CfgVehicles { displayName = "DAGR"; vehicleClass = "Items"; class TransportItems { - class ACE_DAGR { - name = "ACE_DAGR"; - count = 1; - }; + MACRO_ADDITEM(ACE_DAGR,1); }; }; diff --git a/addons/dagr/CfgWeapons.hpp b/addons/dagr/CfgWeapons.hpp index 31b0603ff2..830e9cf115 100644 --- a/addons/dagr/CfgWeapons.hpp +++ b/addons/dagr/CfgWeapons.hpp @@ -7,11 +7,11 @@ class CfgWeapons { author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"}; scope = 2; displayName = "DAGR"; + model = QUOTE(PATHTOF(data\DAGR.p3d)); descriptionShort = ""; picture = PATHTOF(UI\DAGR_Icon.paa); icon = "iconObject_circle"; mapSize = 0.034; - class ItemInfo: InventoryItem_Base_F { mass = 10; }; diff --git a/addons/dagr/data/DAGR.p3d b/addons/dagr/data/DAGR.p3d new file mode 100644 index 0000000000..afba9837f9 Binary files /dev/null and b/addons/dagr/data/DAGR.p3d differ diff --git a/addons/dagr/data/DAGR.rvmat b/addons/dagr/data/DAGR.rvmat new file mode 100644 index 0000000000..7cbd970f05 --- /dev/null +++ b/addons/dagr/data/DAGR.rvmat @@ -0,0 +1,82 @@ +class StageTI +{ + texture="a3\data_f\default_ti_ca.paa"; +}; +ambient[]={1,1,1,1}; +diffuse[]={1,1,1,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.050000008,0.050000008,0.050000008,1}; +specularPower=40; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 +{ + texture="z\ace\addons\dagr\data\DAGR_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource="tex"; + class uvTransform + { + aside[]={0,9,0}; + up[]={4.5,0,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 +{ + texture="#(argb,8,8,3)color(0,0,0,0)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage4 +{ + texture="#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage5 +{ + texture="#(argb,8,8,3)color(1,1,1,1,SMDI)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 +{ + texture="#(ai,64,128,1)fresnel(0.4,0.2)"; + uvSource="none"; +}; +class Stage7 +{ + texture="a3\data_f\env_land_co.paa"; + uvSource="none"; +}; diff --git a/addons/dagr/data/DAGR_CO.paa b/addons/dagr/data/DAGR_CO.paa new file mode 100644 index 0000000000..d2fc1a06d7 Binary files /dev/null and b/addons/dagr/data/DAGR_CO.paa differ diff --git a/addons/dagr/data/DAGR_NOHQ.paa b/addons/dagr/data/DAGR_NOHQ.paa new file mode 100644 index 0000000000..311c4489bb Binary files /dev/null and b/addons/dagr/data/DAGR_NOHQ.paa differ diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf index ff7429fa0a..9bcf244fbc 100644 --- a/addons/dagr/functions/fnc_outputData.sqf +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -30,7 +30,7 @@ __background ctrlSetText QUOTE(PATHTOF(UI\dagr_gps.paa)); if (GVAR(outputPFH) != -1) exitWith {}; GVAR(outputPFH) = [{ - private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xgrid", "_ygrid", "_xcoord", "_ycoord", "_speed", "_dagrHeading", "_dagrGrid", "_dagrElevation", "_dagrSpeed", "_dagrTime", "_elevation"]; + private["_dagrElevation", "_dagrGrid", "_dagrHeading", "_dagrSpeed", "_dagrTime", "_elevation", "_gridArray", "_speed"]; // Abort Condition if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith { @@ -40,54 +40,8 @@ GVAR(outputPFH) = [{ }; // GRID - _pos = getPosASL ACE_player; - - _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); - _gridConfig = (configFile >> "CfgWorlds" >> worldName >> "Grid"); - _offsetX = getNumber (_gridConfig >> "offsetX"); - _offsetY = getNumber (_gridConfig >> "offsetY"); - _stepX = getNumber (_gridConfig >> "Zoom1" >> "stepX"); - _stepY = getNumber (_gridConfig >> "Zoom1" >> "stepY"); - - if (_stepY >= 0) then { - _pos set [1, (_mapSize - 100) - (_pos select 1) - _offsetY]; - }; - - // Incase grids go neg due to 99-00 boundry - if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];}; - if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];}; - - _xGrid = toArray Str(round(_pos select 0)); - while {count _xGrid < 5} do { - _xGrid = [48] + _xGrid; - }; - _xGrid resize 4; - _xGrid = toString _xGrid; - _xGrid = parseNumber _xGrid; - - _yGrid = toArray Str(round(_pos select 1)); - while {count _yGrid < 5} do { - _yGrid = [48] + _yGrid; - }; - _yGrid resize 4; - _yGrid = toString _yGrid; - _yGrid = parseNumber _yGrid; - - _xCoord = switch true do { - case (_xGrid >= 1000): { "" + Str(_xGrid) }; - case (_xGrid >= 100): { "0" + Str(_xGrid) }; - case (_xGrid >= 10): { "00" + Str(_xGrid) }; - default { "000" + Str(_xGrid) }; - }; - - _yCoord = switch true do { - case (_yGrid >= 1000): { "" + Str(_yGrid) }; - case (_yGrid >= 100): { "0" + Str(_yGrid) }; - case (_yGrid >= 10): { "00" + Str(_yGrid) }; - default { "000" + Str(_yGrid) }; - }; - - _dagrGrid = _xcoord + " " + _ycoord; + _gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos); + _dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])]; // SPEED _speed = speed (vehicle ACE_player); @@ -97,7 +51,7 @@ GVAR(outputPFH) = [{ // Elevation _elevation = getPosASL ACE_player; - _elevation = floor ((_elevation select 2) + EGVAR(weather,altitude)); + _elevation = floor ((_elevation select 2) + EGVAR(common,mapAltitude)); _dagrElevation = str _elevation + "m"; // Heading diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index 660e678a82..ad9068344f 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -72,7 +72,7 @@ _yCoord = switch true do { _dagrGrid = _xCoord + " " + _yCoord; // Find target elevation -_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(weather,altitude)); +_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(common,mapAltitude)); _dagrElevation = str _elevation + "m"; // Time diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index d1fc2a47f2..71c3e7c1a7 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -30,7 +30,7 @@ __background ctrlSetText QUOTE(PATHTOF(UI\dagr_wp.paa)); if (GVAR(outputPFH) != -1) exitWith {}; GVAR(outputPFH) = [{ - private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xGrid", "_yGrid", "_xCoord", "_yCoord", "_dagrHeading", "_dagrGrid", "_bearing", "_MYpos", "_WPpos", "_dagrDistance", "_distance"]; + private["_MYpos", "_WPpos", "_bearing", "_dagrDistance", "_dagrGrid", "_dagrHeading", "_distance", "_gridArray"]; // Abort Condition if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith { @@ -40,54 +40,8 @@ GVAR(outputPFH) = [{ }; // GRID - _pos = getPosASL ACE_player; - - _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); - _gridConfig = (configFile >> "CfgWorlds" >> worldName >> "Grid"); - _offsetX = getNumber (_gridConfig >> "offsetX"); - _offsetY = getNumber (_gridConfig >> "offsetY"); - _stepX = getNumber (_gridConfig >> "Zoom1" >> "stepX"); - _stepY = getNumber (_gridConfig >> "Zoom1" >> "stepY"); - - if (_stepY >= 0) then { - _pos set [1, (_mapSize - 100) - (_pos select 1) - _offsetY]; - }; - - // Incase grids go neg due to 99-00 boundry - if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];}; - if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];}; - - _xGrid = toArray Str(round(_pos select 0)); - while {count _xGrid < 5} do { - _xGrid = [48] + _xGrid; - }; - _xGrid resize 4; - _xGrid = toString _xGrid; - _xGrid = parseNumber _xGrid; - - _yGrid = toArray Str(round(_pos select 1)); - while {count _yGrid < 5} do { - _yGrid = [48] + _yGrid; - }; - _yGrid resize 4; - _yGrid = toString _yGrid; - _yGrid = parseNumber _yGrid; - - _xCoord = switch true do { - case (_xGrid >= 1000): { "" + Str(_xGrid) }; - case (_xGrid >= 100): { "0" + Str(_xGrid) }; - case (_xGrid >= 10): { "00" + Str(_xGrid) }; - default { "000" + Str(_xGrid) }; - }; - - _yCoord = switch true do { - case (_yGrid >= 1000): { "" + Str(_yGrid) }; - case (_yGrid >= 100): { "0" + Str(_yGrid) }; - case (_yGrid >= 10): { "00" + Str(_yGrid) }; - default { "000" + Str(_yGrid) }; - }; - - _dagrGrid = _xCoord + " " + _yCoord; + _gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos); + _dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])]; // WP Grid _xGrid2 = floor (DAGR_WP_INFO / 10000); @@ -110,8 +64,8 @@ GVAR(outputPFH) = [{ _dagrGrid2 = _xCoord2 + " " + _yCoord2; // Distance - _WPpos = [[_xCoord2, _yCoord2], true] call CBA_fnc_mapGridToPos; - _MYpos = [[_xCoord, _yCoord], true] call CBA_fnc_mapGridToPos; + _WPpos = [_dagrGrid2, true] call EFUNC(common,getMapPosFromGrid); + _MYpos = [_dagrGrid, true] call EFUNC(common,getMapPosFromGrid); _distance = _MYpos distance _WPpos; _distance = floor (_distance * 10) / 10; _dagrDistance = str _distance + "m"; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index 7768515953..f6ee8ec65e 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -12,7 +12,7 @@ class CfgWeapons { displayName = CSTRING(clacker_displayName); descriptionShort = CSTRING(clacker_description); picture = PATHTOF(Data\UI\Clacker.paa); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; + model = QUOTE(PATHTOF(data\ace_m57.p3d)); ACE_Range = 250; ACE_Detonator = 1; diff --git a/addons/explosives/Data/ace_m57.p3d b/addons/explosives/Data/ace_m57.p3d new file mode 100644 index 0000000000..3c7dd5ebb8 Binary files /dev/null and b/addons/explosives/Data/ace_m57.p3d differ diff --git a/addons/explosives/Data/ace_m57.rvmat b/addons/explosives/Data/ace_m57.rvmat new file mode 100644 index 0000000000..628e9bfe55 --- /dev/null +++ b/addons/explosives/Data/ace_m57.rvmat @@ -0,0 +1,82 @@ +class StageTI { + texture = "a3\data_f\default_glass_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.3,0.3,0.3,1}; +specularPower = 3b0; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 { + texture="#(rgb,1,1,1)color(0.5,0.5,1,1)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage2 { + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage4 { + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage5 { + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage6 { + texture = "#(ai,32,128,1)fresnel(0.85,0.36)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage7 { + useWorldEnvMap = "true"; + texture = "a3\data_f\env_interier_car_ca.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/explosives/Data/ace_m57_co.paa b/addons/explosives/Data/ace_m57_co.paa new file mode 100644 index 0000000000..411de2a143 Binary files /dev/null and b/addons/explosives/Data/ace_m57_co.paa differ diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index a2c3612b24..7ab3c13fe0 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -550,15 +550,16 @@ Explosão no desarmamento? Eksplozja przy rozbrajaniu? Explodovat při zneškodňování? + Explotar al desactivar? Enable certain explosives to explode on defusal? Default: Yes Ativa certos explosivos para detonar no desarmamento? Padrão: Sim Spraw, aby niektóre ładunki wybuchowe eksplodowały przy próbie ich rozbrojenia? Domyślnie:Tak Umožnit u některých výbušnin explozi při pokusu je zneškodnit? Výchozí: Ano + ¿Habilitar ciertos explosivos para estallar al desactivar? Por defecto: Sí - Moduł ten pozwala dostosować opcje związane z ładunkami wybuchowymi, ich podkładaniem oraz rozbrajaniem. Dieses Modul erlaubt die Einstellungen für Sprengstoffe zu verändern. Tento modul umoňuje přizpůsobit nastavení týkajících se výbušnin. diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index 9fdb89ba87..5a59b15a4a 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -70,6 +70,7 @@ (Solo SP) Seguimiento de depuración de Fragmentación/Astillamiento (Tylko SP) Wizualny debug odł./odpr. (Pouze SP) Debug sledování Frag/Úlomků + (nur SP) Splitter-/Explosions-Debug-Verfolgung (Somente SP) Depuração de fragmentação e estilhaços traçantes @@ -81,4 +82,4 @@ (Somente SP) Requer um reinício de missão / editor. Habilita o rastreamento visual de projéteis de fragmentação e estilhaçamento apenas no modo de jogo SP. - \ No newline at end of file + diff --git a/addons/goggles/config.cpp b/addons/goggles/config.cpp index c557827e17..95b699eb1c 100644 --- a/addons/goggles/config.cpp +++ b/addons/goggles/config.cpp @@ -2,15 +2,15 @@ #define COLOUR 8.0 class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"Garth 'L-H' de Wet"}; - authorUrl = "http://garth.snakebiteink.co.za/"; - VERSION_CONFIG; - }; + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"Garth 'L-H' de Wet"}; + authorUrl = "http://garth.snakebiteink.co.za/"; + VERSION_CONFIG; + }; }; #include "CfgEventHandlers.hpp" @@ -165,10 +165,6 @@ class CfgGlasses { ACE_Resistance = 1; }; - class AV_ESS_blk:None{ - COMBAT_GOGGLES - }; - class G_Balaclava_blk; class G_Balaclava_combat:G_Balaclava_blk { diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 50dc7cd288..a98fbc2350 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -40,7 +40,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; [_unit, false] call EFUNC(common,disableAI); }; _unit setSkill (skill _unit * 50); - }, [_x], (7 * _strength), 0.1] call EFUNC(common,waitAndExecute); //0.1 precision is fine for AI + }, [_x], (7 * _strength)] call EFUNC(common,waitAndExecute); } else { //Do effects for player // is there line of sight to the grenade? @@ -62,7 +62,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; //Add ace_hearing ear ringing sound effect if ((isClass (configFile >> "CfgPatches" >> "ACE_Hearing")) && {_strength > 0}) then { - [_x, 0.5 + (_strength / 2)] call EFUNC(hearing,earRinging); + [_x, (20 * _strength)] call EFUNC(hearing,earRinging); }; // account for people looking away by slightly @@ -95,7 +95,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; [{ PARAMS_1(_light); deleteVehicle _light; - }, [_light], 0.1, 0] call EFUNC(common,waitAndExecute); + }, [_light], 0.1] call EFUNC(common,waitAndExecute); // blind player if (_strength > 0.1) then { @@ -113,7 +113,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; //FULLRECOVERY - end effect [{ GVAR(flashbangPPEffectCC) ppEffectEnable false; - }, [], (17 * _strength), 0] call EFUNC(common,waitAndExecute); + }, [], (17 * _strength)] call EFUNC(common,waitAndExecute); }; }; }; diff --git a/addons/hearing/CfgWeapons.hpp b/addons/hearing/CfgWeapons.hpp index adcdb2217b..2806ef9970 100644 --- a/addons/hearing/CfgWeapons.hpp +++ b/addons/hearing/CfgWeapons.hpp @@ -5,7 +5,7 @@ class CfgWeapons { class ACE_EarPlugs: ACE_ItemCore { displayName = CSTRING(EarPlugs_Name); descriptionShort = CSTRING(EarPlugs_Description); - model = PATHTOF(ACE_earplugs.p3d); + model = QUOTE(PATHTOF(data\ace_earplugs.p3d)); picture = PATHTOF(UI\ACE_earplugs_x_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { @@ -22,15 +22,15 @@ class CfgWeapons { class H_HelmetCrew_I: H_HelmetCrew_B {}; class H_CrewHelmetHeli_B: H_HelmetB { - GVAR(protection) = 0.75; - GVAR(lowerVolume) = 0.70; + GVAR(protection) = 0.85; + GVAR(lowerVolume) = 0.75; }; class H_CrewHelmetHeli_O: H_CrewHelmetHeli_B {}; class H_CrewHelmetHeli_I: H_CrewHelmetHeli_B {}; class H_PilotHelmetHeli_B: H_HelmetB { - GVAR(protection) = 0.75; - GVAR(lowerVolume) = 0.70; + GVAR(protection) = 0.85; + GVAR(lowerVolume) = 0.75; }; class H_PilotHelmetHeli_O: H_PilotHelmetHeli_B {}; class H_PilotHelmetHeli_I: H_PilotHelmetHeli_B {}; @@ -48,3 +48,4 @@ class CfgWeapons { }; class H_Cap_marshal: H_Cap_headphones {}; }; + diff --git a/addons/hearing/UI/earplug_co.paa b/addons/hearing/UI/earplug_co.paa deleted file mode 100644 index 94ba616adb..0000000000 Binary files a/addons/hearing/UI/earplug_co.paa and /dev/null differ diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index ad7fddcd98..ad73ed55d5 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -2,8 +2,9 @@ if (!hasInterface) exitWith {}; -GVAR(currentDeafness) = 0; -GVAR(newStrength) = 0; +GVAR(deafnessDV) = 0; +GVAR(deafnessPrior) = 0; +GVAR(volume) = 1; GVAR(playerVehAttenuation) = 1; GVAR(beep) = false; @@ -11,10 +12,11 @@ GVAR(beep2) = false; GVAR(time2) = 0; GVAR(time3) = 0; GVAR(time4) = 0; -GVAR(earRingingPFH) = -1; -// Spawn volume updating process -[FUNC(updateVolume), 0.1, [] ] call CBA_fnc_addPerFrameHandler; +["SettingsInitialized", { + // Spawn volume updating process + [FUNC(updateVolume), 1, [false] ] call CBA_fnc_addPerFrameHandler; +}] call EFUNC(common,addEventHandler); //Update veh attunation when player veh changes ["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler); @@ -22,14 +24,13 @@ GVAR(earRingingPFH) = -1; //Reset deafness on respawn (or remote control player switch) ["playerChanged", { - ACE_player setVariable [QGVAR(dv), 0]; - ACE_player setVariable [QGVAR(prior), 0]; + GVAR(deafnessDV) = 0; + GVAR(deafnessPrior) = 0; ACE_player setvariable [QGVAR(deaf), false]; + GVAR(beep) = false; GVAR(beep2) = false; GVAR(time2) = 0; GVAR(time3) = 0; GVAR(time4) = 0; - GVAR(currentDeafness) = 0; - GVAR(newStrength) = 0; }] call EFUNC(common,addEventhandler); diff --git a/addons/hearing/ace_earplugs.p3d b/addons/hearing/ace_earplugs.p3d deleted file mode 100644 index 5054aba858..0000000000 Binary files a/addons/hearing/ace_earplugs.p3d and /dev/null differ diff --git a/addons/hearing/data/ace_earplugs.p3d b/addons/hearing/data/ace_earplugs.p3d new file mode 100644 index 0000000000..c6d4295212 Binary files /dev/null and b/addons/hearing/data/ace_earplugs.p3d differ diff --git a/addons/hearing/data/ace_earplugs_co.paa b/addons/hearing/data/ace_earplugs_co.paa new file mode 100644 index 0000000000..25dd6378b4 Binary files /dev/null and b/addons/hearing/data/ace_earplugs_co.paa differ diff --git a/addons/hearing/functions/fnc_earRinging.sqf b/addons/hearing/functions/fnc_earRinging.sqf index 74e2768c4c..6a896c1820 100644 --- a/addons/hearing/functions/fnc_earRinging.sqf +++ b/addons/hearing/functions/fnc_earRinging.sqf @@ -16,12 +16,11 @@ */ #include "script_component.hpp" -if (GVAR(DisableEarRinging)) exitWith {}; - PARAMS_2(_unit,_strength); -if (isNull _unit) exitWith {}; +if (_unit != ACE_player) exitWith {}; if (_strength < 0.05) exitWith {}; +if (!isNull curatorCamera) exitWith {}; if (_unit getVariable ["ACE_hasEarPlugsin", false]) then { _strength = _strength / 4; @@ -36,66 +35,4 @@ if(headgear _unit != "") then { }; }; -_unit setVariable [QGVAR(dv), (_unit getVariable [QGVAR(dv), 0]) + _strength]; - -if (GVAR(earRingingPFH) != -1) exitWith {}; - -GVAR(earRingingPFH) = [{ - EXPLODE_1_PVT(_this select 0,_unit); - private ["_prior"]; - _prior = (_unit getvariable [QGVAR(dv), 0]) min 20; - - if (!alive _unit || _prior <= 0) exitWith { - _unit setVariable [QGVAR(dv), 0]; - _unit setVariable [QGVAR(prior), 0]; - GVAR(beep) = false; - GVAR(beep2) = false; - GVAR(time2) = 0; - GVAR(time3) = 0; - GVAR(time4) = 0; - GVAR(earRingingPFH) = -1; - [_this select 1] call cba_fnc_removePerFrameHandler; - }; - - if (((_unit getvariable [QGVAR(dv), 0]) - (_unit getvariable [QGVAR(prior), 0])) > 2) then { - if (ACE_time > GVAR(time3)) then { - GVAR(beep2) = false; - }; - if (!GVAR(beep2)) then { - playSound "ACE_Combat_Deafness"; - GVAR(beep2) = true; - GVAR(time3) = ACE_time + 5; - }; - }; - - _unit setvariable [QGVAR(prior), _prior]; - GVAR(volume) = (1 - (_prior / 20)) max 0; - - if (_prior > 19.75) then { - _unit setvariable [QGVAR(deaf), true]; - } else { - _unit setvariable [QGVAR(deaf), false]; - }; - - if ((_unit getvariable [QGVAR(deaf), false]) && {ACE_time > GVAR(time4)}) then { - playSound "ACE_Combat_Deafness"; - GVAR(beep2) = true; - GVAR(time3) = ACE_time + 10; - GVAR(time4) = ACE_time + 30; - }; - - // Hearing takes longer to return to normal after it hits rock bottom - _unit setvariable [QGVAR(dv), _prior - (0.5 * (GVAR(volume) max 0.1))]; - - if (_prior > 10) then { - //check if the ringing is already being played - if (ACE_time > GVAR(time2)) then { - GVAR(beep) = false; - }; - if (!GVAR(beep)) then { - playSound "ACE_Ring_Backblast"; - GVAR(time2) = ACE_time + 22; - GVAR(beep) = true; - }; - }; -}, 1, [_unit]] call CBA_fnc_addPerFrameHandler; +GVAR(deafnessDV) = GVAR(deafnessDV) + _strength; diff --git a/addons/hearing/functions/fnc_explosionNear.sqf b/addons/hearing/functions/fnc_explosionNear.sqf index cb9202618f..dde9bc50cc 100644 --- a/addons/hearing/functions/fnc_explosionNear.sqf +++ b/addons/hearing/functions/fnc_explosionNear.sqf @@ -16,6 +16,9 @@ */ #include "script_component.hpp" +//Only run if deafness or ear ringing is enabled: +if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {}; + PARAMS_2(_unit,_damage); private ["_strength"]; diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index 4164f81b33..6fc48b27fa 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -21,17 +21,18 @@ */ #include "script_component.hpp" -private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"]; +//Only run if deafness or ear ringing is enabled: +if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {}; PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo); -//Only run if combatDeafness enabled: -if (!GVAR(enableCombatDeafness)) exitWith {}; //Only run if firedNear object is player or player's vehicle: if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {}; if (_weapon in ["Throw", "Put"]) exitWith {}; if (_distance > 50) exitWith {}; +private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"]; + _vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)}; _distance = 1 max _distance; @@ -67,7 +68,7 @@ if (count _weaponMagazines == 0) then { _magazine = ""; { - EXPLODE_2_PVT(_x,_magazineType,_ammoType) + EXPLODE_2_PVT(_x,_magazineType,_ammoType); if (_ammoType == _ammo) exitWith { _magazine = _magazineType; }; diff --git a/addons/hearing/functions/fnc_moduleHearing.sqf b/addons/hearing/functions/fnc_moduleHearing.sqf index a560a712a6..7b78ac581b 100644 --- a/addons/hearing/functions/fnc_moduleHearing.sqf +++ b/addons/hearing/functions/fnc_moduleHearing.sqf @@ -1,6 +1,6 @@ /* * Author: esteldunedain - * Initializes the Map module. + * Initializes the Hearing module. * * Arguments: * Whatever the module provides. (I dunno.) @@ -16,4 +16,4 @@ if !(_activated) exitWith {}; [_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule); -diag_log text "[ACE]: Interaction Module Initialized."; +diag_log text "[ACE]: Hearing Module Initialized."; diff --git a/addons/hearing/functions/fnc_putInEarplugs.sqf b/addons/hearing/functions/fnc_putInEarplugs.sqf index e979360945..8b11e6ba25 100644 --- a/addons/hearing/functions/fnc_putInEarplugs.sqf +++ b/addons/hearing/functions/fnc_putInEarplugs.sqf @@ -24,5 +24,8 @@ _player setVariable ["ACE_hasEarPlugsIn", true, true]; [localize LSTRING(EarPlugs_Are_On)] call EFUNC(common,displayTextStructured); +//Force an immediate fast volume update: +[[true]] call FUNC(updateVolume); + /*// No Earplugs in inventory, telling user [localize LSTRING(NoPlugs)] call EFUNC(common,displayTextStructured);*/ diff --git a/addons/hearing/functions/fnc_removeEarplugs.sqf b/addons/hearing/functions/fnc_removeEarplugs.sqf index bee3517235..19a34831cd 100644 --- a/addons/hearing/functions/fnc_removeEarplugs.sqf +++ b/addons/hearing/functions/fnc_removeEarplugs.sqf @@ -27,3 +27,6 @@ _player addItem "ACE_EarPlugs"; _player setVariable ["ACE_hasEarPlugsIn", false, true]; [localize LSTRING(EarPlugs_Are_Off)] call EFUNC(common,displayTextStructured); + +//Force an immediate fast volume update: +[[true]] call FUNC(updateVolume); diff --git a/addons/hearing/functions/fnc_updateVolume.sqf b/addons/hearing/functions/fnc_updateVolume.sqf index 5502f38bf4..3a72e8eb3b 100644 --- a/addons/hearing/functions/fnc_updateVolume.sqf +++ b/addons/hearing/functions/fnc_updateVolume.sqf @@ -3,7 +3,8 @@ * Updates and applys the current deafness. Called every 0.1 sec from a PFEH. * * Arguments: - * None + * 0: Args + * -----0: Just update volume (skip ringing/recovery) * * Return Value: * None @@ -15,31 +16,62 @@ */ #include "script_component.hpp" -private ["_recoverRate", "_volume"]; +//Only run if deafness or ear ringing is enabled: +if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {}; -// Exit if combat deafness is disabled -if !(GVAR(enableCombatDeafness)) exitWith {}; +EXPLODE_1_PVT((_this select 0),_justUpdateVolume); -// Check if new noises increase deafness -GVAR(newStrength) = (((ACE_player getvariable [QGVAR(dv), 0]) min 20) / 20) ^ 2; -if (GVAR(newStrength) > GVAR(currentDeafness)) then { - GVAR(currentDeafness) = GVAR(newStrength); -}; +private["_volume", "_soundTransitionTime"]; -// Recover rate is slower if deafness is severe -_recoverRate = 0.01; -if (GVAR(currentDeafness) > 0.7) then { - _recoverRate = 0.005; - if (GVAR(currentDeafness) > 0.9) then { - _recoverRate = 0.002; +GVAR(deafnessDV) = (GVAR(deafnessDV) min 20) max 0; +GVAR(volume) = (1 - (GVAR(deafnessDV) / 20)) max 0; + +if (!_justUpdateVolume) then { + //If we got a big increase in the last second: + if ((GVAR(deafnessDV) - GVAR(deafnessPrior)) > 2) then { + if (ACE_time > GVAR(time3)) then { + GVAR(beep2) = false; + }; + if ((!GVAR(DisableEarRinging)) && {!GVAR(beep2)}) then { + playSound "ACE_Combat_Deafness"; + GVAR(beep2) = true; + GVAR(time3) = ACE_time + 5; + }; }; + + GVAR(deafnessPrior) = GVAR(deafnessDV); + + if (GVAR(deafnessDV) > 19.75) then { + ACE_player setvariable [QGVAR(deaf), true]; + if ((!GVAR(DisableEarRinging)) && {ACE_time > GVAR(time4)}) then { + playSound "ACE_Combat_Deafness"; + GVAR(beep2) = true; + GVAR(time3) = ACE_time + 10; + GVAR(time4) = ACE_time + 30; + }; + } else { + ACE_player setvariable [QGVAR(deaf), false]; + }; + + if (GVAR(deafnessDV) > 10) then { + //check if the ringing is already being played + if (ACE_time > GVAR(time2)) then { + GVAR(beep) = false; + }; + if ((!GVAR(DisableEarRinging)) && {!GVAR(beep)}) then { + playSound "ACE_Ring_Backblast"; + GVAR(time2) = ACE_time + 22; + GVAR(beep) = true; + }; + }; + + // Hearing takes longer to return to normal after it hits rock bottom + GVAR(deafnessDV) = (GVAR(deafnessDV) - (0.5 * (GVAR(volume) max 0.1))) max 0; }; -// Deafness recovers with ACE_time -GVAR(currentDeafness) = GVAR(currentDeafness) - _recoverRate max 0; +if ((missionNameSpace getVariable [QGVAR(disableVolumeUpdate), false]) || {!GVAR(enableCombatDeafness)}) exitWith {}; -// needed until Bohemia fixes playSound to actually use the second argument -_volume = (1 - GVAR(currentDeafness) max 0)^2 max 0.04; +_volume = GVAR(volume); // Earplugs reduce hearing 50% if ([ACE_player] call FUNC(hasEarPlugsIn)) then { @@ -60,11 +92,9 @@ if (ACE_player getVariable ["ACE_isUnconscious", false]) then { _volume = _volume min GVAR(UnconsciousnessVolume); }; -if (!(missionNameSpace getVariable [QGVAR(disableVolumeUpdate), false])) then { - 0.1 fadeSound _volume; - 0.1 fadeSpeech _volume; - ACE_player setVariable ["tf_globalVolume", _volume]; - if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume^(0.33)] call acre_api_fnc_setGlobalVolume;}; -}; +_soundTransitionTime = if (_justUpdateVolume) then {0.1} else {1}; -//hintSilent format ["GVAR(currentDeafness), _Volume = %1, %2", GVAR(currentDeafness), _volume]; +_soundTransitionTime fadeSound _volume; +_soundTransitionTime fadeSpeech _volume; +ACE_player setVariable ["tf_globalVolume", _volume]; +if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume^(0.33)] call acre_api_fnc_setGlobalVolume;}; diff --git a/addons/hearing/script_component.hpp b/addons/hearing/script_component.hpp index 089bce86eb..194e150375 100644 --- a/addons/hearing/script_component.hpp +++ b/addons/hearing/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT hearing #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL + #ifdef DEBUG_ENABLED_HEARING #define DEBUG_MODE_FULL #endif diff --git a/addons/huntir/CfgVehicles.hpp b/addons/huntir/CfgVehicles.hpp index bc8ed4fc83..3b6486aaf7 100644 --- a/addons/huntir/CfgVehicles.hpp +++ b/addons/huntir/CfgVehicles.hpp @@ -16,7 +16,7 @@ class CfgVehicles { }; }; }; - + class Parachute_02_base_F; class ACE_HuntIR: Parachute_02_base_F { author = ECSTRING(common,ACETeam); @@ -67,13 +67,10 @@ class CfgVehicles { displayName = CSTRING(monitor_displayName); vehicleClass = "Items"; class TransportItems { - class ACE_HuntIR_monitor { - name = "ACE_HuntIR_monitor"; - count = 1; - }; + MACRO_ADDITEM(ACE_HuntIR_monitor,1); }; }; - + class ReammoBox_F; class ACE_HuntIR_Box: ReammoBox_F { model = PATHTOF(data\ace_huntirbox.p3d); diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 264c0c74b6..bcc553fff0 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -63,6 +63,11 @@ GVAR(no_cams) sort true; GVAR(no_cams) set [_forEachIndex, _x select 1]; } forEach GVAR(no_cams); [{ + //Close monitor if we no longer have the item: + if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable ["ace_huntir_monitor", displayNull])}) then { + closeDialog 0; + }; + GVAR(nearHuntIRs) = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; { if (((getPosVisual _x) select 2) > 20 && {!(_x in GVAR(no_cams))} && {_x getHitPointDamage "HitCamera" < 0.25}) then { diff --git a/addons/huntir/functions/fnc_handleFired.sqf b/addons/huntir/functions/fnc_handleFired.sqf index 23c7df04f0..121cd9fd12 100644 --- a/addons/huntir/functions/fnc_handleFired.sqf +++ b/addons/huntir/functions/fnc_handleFired.sqf @@ -25,6 +25,12 @@ if (_ammo != "F_HuntIR") exitWith {}; [{ PARAMS_1(_projectile); + + //If null (deleted or hit water) exit: + if (isNull _projectile) exitWith {}; + //If it's not spinning (hit ground), bail: + if ((vectorMagnitude (velocity _projectile)) < 0.1) exitWith {}; + "ACE_HuntIR_Propell" createVehicle (getPosATL _projectile); [{ PARAMS_1(_position); diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf index f8aed93880..27fd5e280b 100644 --- a/addons/huntir/functions/fnc_huntir.sqf +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -38,6 +38,11 @@ createDialog "ace_huntir_cam_dialog_off"; GVAR(messageSearching) = toArray "Searching....."; GVAR(messageConnecting) = toArray "Connecting....."; [{ + //Close monitor if we no longer have item: + if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable ["ace_huntir_monitor", displayNull])}) then { + closeDialog 0; + }; + private ["_elapsedTime", "_nearestHuntIRs"]; _elapsedTime = ACE_time - GVAR(startTime); _nearestHuntIRs = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; diff --git a/addons/huntir/script_component.hpp b/addons/huntir/script_component.hpp index 9f99437f67..385c0985ae 100644 --- a/addons/huntir/script_component.hpp +++ b/addons/huntir/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT huntir #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL + #ifdef DEBUG_ENABLED_HUNTIR #define DEBUG_MODE_FULL #endif diff --git a/addons/huntir/stringtable.xml b/addons/huntir/stringtable.xml index 79f9a778e1..7e7767f349 100644 --- a/addons/huntir/stringtable.xml +++ b/addons/huntir/stringtable.xml @@ -4,7 +4,7 @@ HuntIR Transport Box HuntIR Transportkiste - HuntIR Transport Box + Caja de transporte de HuntIR Trasnportní bedna HuntIR Ящик с HuntIR HuntIR Transport Box @@ -16,7 +16,7 @@ HuntIR Round HuntIR Granate - HuntIR Round + Proyectil HuntIR HuntIR Round HuntIR снаряд HuntIR Round @@ -28,7 +28,7 @@ HuntIR monitor HuntIR Monitor - HuntIR monitor + Monitor HuntIR HuntIR monitor HuntIR монитор HuntIR monitor @@ -40,7 +40,7 @@ Activate HuntIR monitor HuntIR Monitor aktivieren - Activate HuntIR monitor + Activar monitor HuntIR Zapnout HuntIR monitor Включить HuntIR монитор Activate HuntIR monitor @@ -52,7 +52,7 @@ Camera: Kamera: - Camera: + Camara: Kamera: Камера: Camera: @@ -64,7 +64,7 @@ Altitude: Höhe: - Altitude: + Altitud: Výška: Высота: Altitude: @@ -76,7 +76,7 @@ Recording Time: Aufnahmezeit: - Recording Time: + Tiempo de grabación: Čas nahrávání: Время записи: Recording Time: @@ -88,7 +88,7 @@ Press ESC to quit camera Zum Verlassen ESC drücken - Press ESC to quit camera + Pulsar ESC para salir de la camara Stiskni ESC pro opustění kamery Нажмите ESC чтобы выйти из режима камеры Press ESC to quit camera @@ -100,7 +100,7 @@ Help Hilfe - Help + Ayuda Pomoc Помощь Help @@ -112,7 +112,7 @@ A/D - Cycle zoom A/D - Zoom - A/D - Cycle zoom + A/D - Cambiar zoom A/D - Změna přiblížení A/D - Приближение A/D - Cycle zoom @@ -124,7 +124,7 @@ W/S - Select camera W/S - Wähle Kamera - W/S - Select camera + W/S - Seleccionar camara W/S - Výběr kamery W/S - Выбрать камеру W/S - Select camera @@ -136,7 +136,7 @@ Left/Right - Rotate camera Links/Rechts - Rotiere Kamera - Left/Right - Rotate camera + Left/Right - Rotar camara Levá/Pravá - Rotace kamery Влево/Вправо - Вращать камеру Left/Right - Rotate camera @@ -148,7 +148,7 @@ Up/Down - Elevate/lower camera Hoch/Runter - Neige Kamera - Up/Down - Elevate/lower camera + Up/Down - Subir/bajar camara Nahoru/Dolu - Zvýšít/snížit úhel pohledu kamery Вверх/Вниз - Поднять/Опустить камеру Up/Down - Elevate/lower camera @@ -160,7 +160,7 @@ N - Cycle IT modes N - Sichtmodi - N - Cycle IT modes + N - Cambiar modos de IT N - Změna režimů kamery N - Режимы камеры N - Cycle IT modes @@ -172,7 +172,7 @@ R - Reset camera R - Reset - R - Reset camera + R - Reiniciar camara R - Reset kamery R - Сбросить настройки камеры R - Reset camera @@ -184,7 +184,7 @@ Esc - Exit help ESC - Hilfe verlassen - Esc - Exit help + Esc - Salit de ayuda Esc - Ukončit pomoc Esc - Выйти из помощи Esc - Exit help diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 8ca7f8aa33..80bff14793 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -49,7 +49,7 @@ _fnc_renderNearbyActions = { _action = _x; if ([_target, _action] call FUNC(renderBaseMenu)) then { _numInteractions = _numInteractions + 1; - GVAR(foundActions) pushBack [_target, _action]; + GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; }; }; } forEach GVAR(objectActionList); @@ -61,7 +61,7 @@ _fnc_renderNearbyActions = { // Try to render the menu if ([_target, _action] call FUNC(renderBaseMenu)) then { _numInteractions = _numInteractions + 1; - GVAR(foundActions) pushBack [_target, _action]; + GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; }; } forEach _classActions; @@ -78,7 +78,10 @@ _fnc_renderNearbyActions = { _fnc_renderLastFrameActions = { { - _x call FUNC(renderBaseMenu); + EXPLODE_3_PVT(_x,_target,_action,_objectActionList); + + GVAR(objectActionList) = _objectActionList; + [_target, _action] call FUNC(renderBaseMenu); } forEach GVAR(foundActions); }; diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 4ab84e1c51..b55e8483a1 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -89,6 +89,7 @@ Zeus Actions Akcje Zeusa Akce Zeuse + Acciones Zeus Interaction - Text Max @@ -227,6 +228,7 @@ Tło menu interakcji Fondo del menú de interacción Pozadí menu interakce + Interaktionsmenü-Hintergrund Fundo do menu de interação @@ -234,6 +236,7 @@ Rozmywa lub przyciemnia tło na czas otwarcia menu interakcji Desenfocar el fondo mientras el menú de interacción está abierto. Rozmazat obraz pokud je interakční menu otevřené. + Den Hintergrund verschwimmen lassen, während das Interaktionsmenü geöffnet ist. Desfocar o fundo enquanto o menu de interação está aberto. @@ -241,24 +244,28 @@ Rozmycie ekranu Pantalla de desenfoque Rozmazaný obraz + Verschwommenes Bild Desfoque de tela Black Przyciemnienie ekranu - Negra + Negro Černý obraz Preto + Schwarz Show actions for buildings Pokazuj akcje dla budynków Zobrazit akci pro budovy + Mostrar acciones para edificios Adds interaction actions for opening doors and mounting ladders on buildings. (Note: There is a performance cost when opening interaction menu, especially in towns) Dodaje opcje interakcji dla otwierania drzwi oraz wchodzenia po drabinach do budynków. Uwaga: Użycie tej opcji może spowodować spadek wydajności menu interakcji, szczególnie w dużych miastach. Přidá možnost interakce pro otevření dvěří a umistňovat žebříky na budovy. (Poznámka: Použití této možnosti snižuje výkon při otevírání pomocí interakčního menu, zejména ve velkých městech.) + Añade las acciones de interacción para la apertura de puertas y montaje de escaleras en los edificios. (Nota: Hay un coste de rendimiento al abrir el menú de interacción, especialmente en las ciudades) - \ No newline at end of file + diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index 195a979955..50f203a092 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -138,7 +138,7 @@ class ACE_ZeusActions { }; class ZeusWaypoints { displayName = "Waypoints"; - icon = "\A3\UI_F_Curator\Data\CfgCurator\waypoint_ca.paa"; + icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeRecent_ca.paa"; class behaviour { displayName = "$STR_Combat_Mode"; diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 7b20dde7c0..5bd3282872 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -797,6 +797,7 @@ Open Otwórz Otevřít + Abrir Interaction System @@ -828,6 +829,7 @@ Die Gruppenverwaltung erlaubt die Zuweisung von Farben für Einheiten, die Kommandierung und das Beitreten/Verlassen einer Gruppe. Správa týmu se skládá z: přidělení barev pro členy týmu, převzetí velení, připojení/odpojení. O módulo de gestão de equipe é composto por: a atribuição de cores para os membros da equipe, comando das equipes, juntando-se / deixando equipes. + La gestión del equipo permite la asignación de colores para los miembros del equipo, tomando el mando del equipo y uniendo/dejando equipos. \ No newline at end of file diff --git a/addons/javelin/XEH_pre_init.sqf b/addons/javelin/XEH_pre_init.sqf index 1accd4a8f4..961f9af93d 100644 --- a/addons/javelin/XEH_pre_init.sqf +++ b/addons/javelin/XEH_pre_init.sqf @@ -9,5 +9,7 @@ PREP(showFireMode); PREP(onFired); PREP(onOpticLoad); PREP(onOpticDraw); +PREP(onOpticUnload); -GVAR(isLockKeyDown) = false; \ No newline at end of file +GVAR(isLockKeyDown) = false; +GVAR(pfehID) = -1; diff --git a/addons/javelin/functions/fnc_onFired.sqf b/addons/javelin/functions/fnc_onFired.sqf index fa947bfdd5..fce170fde9 100644 --- a/addons/javelin/functions/fnc_onFired.sqf +++ b/addons/javelin/functions/fnc_onFired.sqf @@ -1,21 +1,17 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" -PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +PARAMS_2(_shooter,_weapon); -// Bail on not missile -if( _shooter != ACE_player) exitWith { false }; +// Bail on not missile or javelin PFEH not running +if ((_shooter != ACE_player) || {(GVAR(pfehID) == -1)}) exitWith { false }; + +private ["_configs"]; _configs = configProperties [configFile >> "CfgWeapons" >> _weapon, QUOTE(configName _x == QUOTE(QGVAR(enabled))), false]; if (((count _configs) < 1) || {(getNumber (_configs select 0)) != 1}) exitWith {}; -_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil]; -if(!isNil "_pfh_handle") then { - //[_pfh_handle] call cba_fnc_removePerFrameHandler; - //uiNamespace setVariable["ACE_RscOptics_javelin_PFH", nil]; - - __JavelinIGUITargeting ctrlShow false; - __JavelinIGUITargetingGate ctrlShow false; - __JavelinIGUITargetingLines ctrlShow false; - __JavelinIGUITargetingConstraints ctrlShow false; -}; \ No newline at end of file +__JavelinIGUITargeting ctrlShow false; +__JavelinIGUITargetingGate ctrlShow false; +__JavelinIGUITargetingLines ctrlShow false; +__JavelinIGUITargetingConstraints ctrlShow false; diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index 3e293fcb9c..cf02d5359e 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -56,7 +56,7 @@ if (((count _weaponConfig) < 1) || {(getNumber (_weaponConfig select 0)) != 1}) }; [(_this select 1)] call cba_fnc_removePerFrameHandler; - uiNamespace setVariable["ACE_RscOptics_javelin_PFH", nil]; + GVAR(pfehID) = -1; }; // Find a target within the optic range diff --git a/addons/javelin/functions/fnc_onOpticLoad.sqf b/addons/javelin/functions/fnc_onOpticLoad.sqf index 0332c132e9..895a48c910 100644 --- a/addons/javelin/functions/fnc_onOpticLoad.sqf +++ b/addons/javelin/functions/fnc_onOpticLoad.sqf @@ -18,6 +18,10 @@ __JavelinIGUITargetingConstrains ctrlShow false; __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; +if(GVAR(pfehID) != -1) then { + [] call FUNC(onOpticUnload); // Unload optic if it was already loaded +}; + uiNameSpace setVariable [QGVAR(arguments), [ ACE_diagTime, // Last runtime @@ -30,11 +34,4 @@ uiNameSpace setVariable [QGVAR(arguments), ] ]; - - -_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil]; -if(!isNil "_pfh_handle") then { - [] call FUNC(onOpticUnload); // Unload optic if it was already loaded -}; -_pfh_handle = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler; -uiNamespace setVariable["ACE_RscOptics_javelin_PFH", _pfh_handle]; +GVAR(pfehID) = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/javelin/functions/fnc_onOpticUnload.sqf b/addons/javelin/functions/fnc_onOpticUnload.sqf index 187b6cf589..714a3e7748 100644 --- a/addons/javelin/functions/fnc_onOpticUnload.sqf +++ b/addons/javelin/functions/fnc_onOpticUnload.sqf @@ -1,14 +1,13 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" TRACE_1("enter", _this); -private["_args", "_disableFireEH", "_pfh"]; +private["_args", "_disableFireEH"]; -uiNameSpace setVariable ['ACE_RscOptics_javelin',nil]; +// uiNameSpace setVariable ['ACE_RscOptics_javelin',nil]; -_pfh = uiNamespace getVariable["ACE_RscOptics_javelin_PFH", nil ]; -if(!isNil "_pfh") then { - [_pfh] call CBA_fnc_removePerFrameHandler; - uiNameSpace setVariable ['ACE_RscOptics_javelin_PFH',nil]; +if(GVAR(pfehID) != -1) then { + [GVAR(pfehID)] call CBA_fnc_removePerFrameHandler; + GVAR(pfehID) = -1; }; _args = uiNamespace getVariable[QGVAR(arguments), nil ]; diff --git a/addons/kestrel4500/CfgVehicles.hpp b/addons/kestrel4500/CfgVehicles.hpp index 776bd8dcf5..8efd0e2bd1 100644 --- a/addons/kestrel4500/CfgVehicles.hpp +++ b/addons/kestrel4500/CfgVehicles.hpp @@ -42,10 +42,7 @@ class CfgVehicles { displayName = "Kestrel 4500"; vehicleClass = "Items"; class TransportItems { - class ACE_Kestrel4500 { - name = "ACE_Kestrel4500"; - count = 1; - }; + MACRO_ADDITEM(ACE_Kestrel4500,1); }; }; diff --git a/addons/kestrel4500/RscTitles.hpp b/addons/kestrel4500/RscTitles.hpp index fe0adf2c4b..7046918935 100644 --- a/addons/kestrel4500/RscTitles.hpp +++ b/addons/kestrel4500/RscTitles.hpp @@ -56,6 +56,7 @@ class Kestrel4500_Display { controlsBackground[]={}; objects[]={}; class controls { + #define DIALOG_SAFE_Y(num) QUOTE((safeZoneY + num) min (safeZoneY + safeZoneH - 1.024*4/3 + num)) class BACKGROUND { moving=1; type=0; @@ -64,7 +65,7 @@ class Kestrel4500_Display { idc=74000; style=48; x=safezoneX; - y=safezoneY; + y = DIALOG_SAFE_Y(0); w=1.024; h=1.024*4/3; colorBackground[]={1,1,1,1}; @@ -74,7 +75,7 @@ class Kestrel4500_Display { class POWER: Kestrel4500_RscButton { idc=-1; x=safezoneX+0.385; - y=safezoneY+1.125; + y = DIALOG_SAFE_Y(1.125); w=0.042; h=0.042*4/3; action=QUOTE(7 call FUNC(buttonPressed)); @@ -83,7 +84,7 @@ class Kestrel4500_Display { class ENTER: POWER { idc=-1; x=safezoneX+0.46; - y=safezoneY+1.0; + y = DIALOG_SAFE_Y(1.0); w=0.1; action=QUOTE(0 call FUNC(buttonPressed)); onMouseButtonDown = "playSound 'kestrel4500_center_button_click'"; @@ -91,7 +92,7 @@ class Kestrel4500_Display { class TOP: Kestrel4500_RscButton { idc=-1; x=safezoneX+0.46; - y=safezoneY+0.93; + y = DIALOG_SAFE_Y(0.93); w=0.1; h=0.03; action=QUOTE(1 call FUNC(buttonPressed)); @@ -99,14 +100,14 @@ class Kestrel4500_Display { }; class BOTTOM: TOP { idc=-1; - y=safezoneY+1.1; + y = DIALOG_SAFE_Y(1.1); action=QUOTE(2 call FUNC(buttonPressed)); onMouseButtonDown = "playSound 'kestrel4500_bottom_button_click'"; }; class LEFT: Kestrel4500_RscButton { idc=-1; x=safezoneX+0.4; - y=safezoneY+0.97; + y = DIALOG_SAFE_Y(0.97); w=0.046; h=0.11; action=QUOTE(3 call FUNC(buttonPressed)); @@ -121,7 +122,7 @@ class Kestrel4500_Display { class MEMORY: Kestrel4500_RscButton { idc=-1; x=safezoneX+0.395; - y=safezoneY+0.87; + y = DIALOG_SAFE_Y(0.87); w=0.05; h=0.045*4/3; action=QUOTE(5 call FUNC(buttonPressed)); @@ -131,39 +132,39 @@ class Kestrel4500_Display { x=safezoneX+0.585; action=QUOTE(6 call FUNC(buttonPressed)); }; - + class TEXT_TOP: Kestrel4500_RscText { idc=74100; x=safezoneX+0.40; - y=safezoneY+0.58; + y = DIALOG_SAFE_Y(0.58); w=0.22; h=0.04; text=""; }; class TEXT_CENTER_BIG: TEXT_TOP { idc=74200; - y=safezoneY+0.61; + y = DIALOG_SAFE_Y(0.61); h=0.10; SizeEx=0.06; }; class TEXT_CENTER: TEXT_TOP { idc=74201; - y=safezoneY+0.64; + y = DIALOG_SAFE_Y(0.64); }; class TEXT_CENTER_LINE_1_LEFT: TEXT_TOP { idc=74300; - y=safezoneY+0.60; + y = DIALOG_SAFE_Y(0.60); style=ST_LEFT; h=0.10; SizeEx=0.05; }; class TEXT_CENTER_LINE2_LEFT: TEXT_CENTER_LINE_1_LEFT { idc=74301; - y=safezoneY+0.64; + y = DIALOG_SAFE_Y(0.64); }; class TEXT_CENTER_LINE_3_LEFT: TEXT_CENTER_LINE2_LEFT { idc=74302; - y=safezoneY+0.68; + y = DIALOG_SAFE_Y(0.68); }; class TEXT_CENTER_LINE_1_RIGHT: TEXT_CENTER_LINE_1_LEFT { idc=74303; @@ -179,42 +180,42 @@ class Kestrel4500_Display { }; class TEXT_INFO_LINE_1: TEXT_TOP { idc=74400; - y=safezoneY+0.68; + y = DIALOG_SAFE_Y(0.68); }; class TEXT_INFO_LINE_2: TEXT_TOP { idc=74401; - y=safezoneY+0.72; + y = DIALOG_SAFE_Y(0.72); }; class TEXT_BOTTOM_BIG: TEXT_TOP { idc=74500; - y=safezoneY+0.67; + y = DIALOG_SAFE_Y(0.67); h=0.10; SizeEx=0.06; }; class TEXT_CENTER_LINE_1: TEXT_TOP { idc=74600; - y=safezoneY+0.58; + y = DIALOG_SAFE_Y(0.58); SizeEx=0.03; }; class TEXT_CENTER_LINE_2: TEXT_CENTER_LINE_1 { idc=74601; - y=safezoneY+0.61; + y = DIALOG_SAFE_Y(0.61); }; class TEXT_CENTER_LINE_3: TEXT_CENTER_LINE_1 { idc=74602; - y=safezoneY+0.64; + y = DIALOG_SAFE_Y(0.64); }; class TEXT_CENTER_LINE_4: TEXT_CENTER_LINE_1 { idc=74603; - y=safezoneY+0.67; + y = DIALOG_SAFE_Y(0.67); }; class TEXT_CENTER_LINE_5: TEXT_CENTER_LINE_1 { idc=74604; - y=safezoneY+0.70; + y = DIALOG_SAFE_Y(0.70); }; class TEXT_CENTER_LINE_6: TEXT_CENTER_LINE_1 { idc=74605; - y=safezoneY+0.73; + y = DIALOG_SAFE_Y(0.73); }; }; }; @@ -228,6 +229,7 @@ class RscTitles { fadeIn="false"; fadeOut="false"; class controls { + #define DISPLAY_SAFE_Y(num) QUOTE((safeZoneY + 0.7 + num) min (safeZoneY + safeZoneH - 1.024*4/3*0.75 + num)) class RscKestrel4500 { idc=75000; moving=0; @@ -236,7 +238,7 @@ class RscTitles { SizeEX=0.025*0.75; style=48; x=safezoneX+0.14; - y=safezoneY+0.7; + y = DISPLAY_SAFE_Y(0); w=0.512*0.75; h=1.024*4/3*0.75; colorBackground[]={1,1,1,1}; @@ -246,7 +248,7 @@ class RscTitles { class RscTextTop: Kestrel4500_RscText { idc=75100; x=safezoneX-0.05+0.40*0.75; - y=safezoneY+0.7+0.58*0.75; + y = DISPLAY_SAFE_Y(0.58*0.75); w=0.22*0.75; h=0.04*0.75; SizeEx=0.04*0.75; @@ -254,18 +256,18 @@ class RscTitles { }; class RscTextCenterBig: RscTextTop { idc=75200; - y=safezoneY+0.7+0.61*0.75; + y = DISPLAY_SAFE_Y(0.61*0.75); h=0.10*0.75; SizeEx=0.06*0.75; text=""; }; class RscTextCenter: RscTextTop { idc=75201; - y=safezoneY+0.7+0.64*0.75; + y = DISPLAY_SAFE_Y(0.64*0.75); }; class RscTextCenterLine1Left: RscTextTop { idc=75300; - y=safezoneY+0.7+0.60*0.75; + y = DISPLAY_SAFE_Y(0.60*0.75); style=ST_LEFT; h=0.10*0.75; SizeEx=0.05*0.75; @@ -273,12 +275,12 @@ class RscTitles { }; class RscTextCenterLine2Left: RscTextCenterLine1Left { idc=75301; - y=safezoneY+0.7+0.64*0.75; + y = DISPLAY_SAFE_Y(0.64*0.75); text=""; }; class RscTextCenterLine3Left: RscTextCenterLine2Left { idc=75302; - y=safezoneY+0.7+0.68*0.75; + y = DISPLAY_SAFE_Y(0.68*0.75); text=""; }; class RscTextCenterLine1Right: RscTextCenterLine1Left { @@ -295,49 +297,49 @@ class RscTitles { }; class RscTextInfoLine1: RscTextTop { idc=75400; - y=safezoneY+0.7+0.68*0.75; + y = DISPLAY_SAFE_Y(0.68*0.75); text=""; }; class RscTextInfoLine2: RscTextTop { idc=75401; - y=safezoneY+0.7+0.72*0.75; + y = DISPLAY_SAFE_Y(0.72*0.75); text=""; }; class RscTextBottomBig: RscTextTop { idc=75500; - y=safezoneY+0.7+0.67*0.75; + y = DISPLAY_SAFE_Y(0.67*0.75); h=0.10*0.75; SizeEx=0.06*0.75; text=""; }; class RscTextCenterLine1: RscTextTop { idc=75600; - y=safezoneY+0.7+0.58*0.75; + y = DISPLAY_SAFE_Y(0.58*0.75); SizeEx=0.03*0.75; }; class RscTextCenterLine2: RscTextCenterLine1 { idc=75601; - y=safezoneY+0.7+0.61*0.75; + y = DISPLAY_SAFE_Y(0.61*0.75); }; class RscTextCenterLine3: RscTextCenterLine1 { idc=75602; - y=safezoneY+0.7+0.64*0.75; + y = DISPLAY_SAFE_Y(0.64*0.75); }; class RscTextCenterLine4: RscTextCenterLine1 { idc=75603; - y=safezoneY+0.7+0.67*0.75; + y = DISPLAY_SAFE_Y(0.67*0.75); }; class RscTextCenterLine5: RscTextCenterLine1 { idc=75604; - y=safezoneY+0.7+0.70*0.75; + y = DISPLAY_SAFE_Y(0.70*0.75); }; class RscTextCenterLine6: RscTextCenterLine1 { idc=75605; - y=safezoneY+0.7+0.73*0.75; + y = DISPLAY_SAFE_Y(0.73*0.75); }; }; }; - + class RscKestrel4500_Preload { idd = -1; movingEnable = 0; diff --git a/addons/kestrel4500/data/Kestrel4500.p3d b/addons/kestrel4500/data/Kestrel4500.p3d index 8166e552f2..feb4f842cb 100644 Binary files a/addons/kestrel4500/data/Kestrel4500.p3d and b/addons/kestrel4500/data/Kestrel4500.p3d differ diff --git a/addons/kestrel4500/functions/fnc_collectData.sqf b/addons/kestrel4500/functions/fnc_collectData.sqf index 4858ad80b2..244e719b37 100644 --- a/addons/kestrel4500/functions/fnc_collectData.sqf +++ b/addons/kestrel4500/functions/fnc_collectData.sqf @@ -20,7 +20,7 @@ _playerAltitude = (getPosASL ACE_player) select 2; _temperature = _playerAltitude call EFUNC(weather,calculateTemperatureAtHeight); _humidity = EGVAR(weather,currentHumidity); _barometricPressure = _playerAltitude call EFUNC(weather,calculateBarometricPressure); -_altitude = EGVAR(weather,Altitude) + _playerAltitude; +_altitude = EGVAR(common,mapAltitude) + _playerAltitude; _airDensity = [_temperature, _barometricPressure, _humidity] call EFUNC(weather,calculateAirDensity); _densityAltitude = _airDensity call EFUNC(weather,calculateDensityAltitude); _chill = [_temperature, _humidity] call EFUNC(weather,calculateWindChill); diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index fce359de6f..d61a1f48e4 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -276,7 +276,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 12: { // ALTITUDE if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(EGVAR(weather,Altitude) + _playerAltitude)); + _textCenterBig = Str(round(EGVAR(common,mapAltitude) + _playerAltitude)); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; @@ -300,7 +300,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 14: { // User Screen 1 _textCenterLine1Left = Str(round(_playerDir)); - _textCenterLine2Left = Str(round(EGVAR(weather,Altitude) + _playerAltitude)); + _textCenterLine2Left = Str(round(EGVAR(common,mapAltitude) + _playerAltitude)); _textCenterLine3Left = Str(round(abs(_windSpeed) * 10) / 10); _textCenterLine1Right = GVAR(Directions) select GVAR(Direction); _textCenterLine2Right = "m"; diff --git a/addons/logistics_uavbattery/CfgVehicles.hpp b/addons/logistics_uavbattery/CfgVehicles.hpp index ca924a1cb8..a6f2db786f 100644 --- a/addons/logistics_uavbattery/CfgVehicles.hpp +++ b/addons/logistics_uavbattery/CfgVehicles.hpp @@ -30,10 +30,7 @@ class CfgVehicles { class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { - class _xx_ACE_UAVBattery { - count = 6; - name = "ACE_UAVBattery"; - }; + MACRO_ADDITEM(ACE_UAVBattery,6); }; }; }; diff --git a/addons/logistics_uavbattery/CfgWeapons.hpp b/addons/logistics_uavbattery/CfgWeapons.hpp index 923d2dd934..46120f7c3d 100644 --- a/addons/logistics_uavbattery/CfgWeapons.hpp +++ b/addons/logistics_uavbattery/CfgWeapons.hpp @@ -6,7 +6,7 @@ class CfgWeapons { scope = 2; displayName = CSTRING(Battery_Name); descriptionShort = CSTRING(Battery_Description); - model = QUOTE(PATHTOF(models\ace_battery.p3d)); + model = QUOTE(PATHTOF(data\ace_battery.p3d)); picture = QUOTE(PATHTOF(ui\UAV_battery_ca.paa)); class ItemInfo: InventoryItem_Base_F { mass = 20; diff --git a/addons/logistics_uavbattery/data/ace_battery.p3d b/addons/logistics_uavbattery/data/ace_battery.p3d new file mode 100644 index 0000000000..fff6e0fc1e Binary files /dev/null and b/addons/logistics_uavbattery/data/ace_battery.p3d differ diff --git a/addons/logistics_uavbattery/models/battery.rvmat b/addons/logistics_uavbattery/data/battery.rvmat similarity index 87% rename from addons/logistics_uavbattery/models/battery.rvmat rename to addons/logistics_uavbattery/data/battery.rvmat index 36329ac896..91ba414cc3 100644 --- a/addons/logistics_uavbattery/models/battery.rvmat +++ b/addons/logistics_uavbattery/data/battery.rvmat @@ -8,7 +8,7 @@ PixelShaderID="Super"; VertexShaderID="Super"; class Stage1 { - texture="z\ace\addons\logistics_uavbattery\models\battery_nohq.paa"; + texture="z\ace\addons\logistics_uavbattery\data\battery_nohq.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; @@ -38,7 +38,7 @@ class Stage3 { }; }; class Stage4 { - texture="z\ace\addons\logistics_uavbattery\models\default_as.paa"; + texture="z\ace\addons\logistics_uavbattery\data\default_as.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; @@ -48,7 +48,7 @@ class Stage4 { }; }; class Stage5 { - texture="z\ace\addons\logistics_uavbattery\models\battery_smdi.paa"; + texture="z\ace\addons\logistics_uavbattery\data\battery_smdi.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; diff --git a/addons/logistics_uavbattery/data/battery_co.paa b/addons/logistics_uavbattery/data/battery_co.paa new file mode 100644 index 0000000000..2d20df9d70 Binary files /dev/null and b/addons/logistics_uavbattery/data/battery_co.paa differ diff --git a/addons/logistics_uavbattery/data/battery_nohq.paa b/addons/logistics_uavbattery/data/battery_nohq.paa new file mode 100644 index 0000000000..54569435c7 Binary files /dev/null and b/addons/logistics_uavbattery/data/battery_nohq.paa differ diff --git a/addons/logistics_uavbattery/data/battery_smdi.paa b/addons/logistics_uavbattery/data/battery_smdi.paa new file mode 100644 index 0000000000..5f20937613 Binary files /dev/null and b/addons/logistics_uavbattery/data/battery_smdi.paa differ diff --git a/addons/logistics_uavbattery/models/default_as.paa b/addons/logistics_uavbattery/data/default_as.paa similarity index 100% rename from addons/logistics_uavbattery/models/default_as.paa rename to addons/logistics_uavbattery/data/default_as.paa diff --git a/addons/logistics_uavbattery/models/ace_battery.p3d b/addons/logistics_uavbattery/models/ace_battery.p3d deleted file mode 100644 index bf756d62cb..0000000000 Binary files a/addons/logistics_uavbattery/models/ace_battery.p3d and /dev/null differ diff --git a/addons/logistics_uavbattery/models/battery_co.paa b/addons/logistics_uavbattery/models/battery_co.paa deleted file mode 100644 index 14abfa75b0..0000000000 Binary files a/addons/logistics_uavbattery/models/battery_co.paa and /dev/null differ diff --git a/addons/logistics_uavbattery/models/battery_nohq.paa b/addons/logistics_uavbattery/models/battery_nohq.paa deleted file mode 100644 index 11b7e6e14d..0000000000 Binary files a/addons/logistics_uavbattery/models/battery_nohq.paa and /dev/null differ diff --git a/addons/logistics_uavbattery/models/battery_smdi.paa b/addons/logistics_uavbattery/models/battery_smdi.paa deleted file mode 100644 index 85ea45371f..0000000000 Binary files a/addons/logistics_uavbattery/models/battery_smdi.paa and /dev/null differ diff --git a/addons/logistics_wirecutter/CfgWeapons.hpp b/addons/logistics_wirecutter/CfgWeapons.hpp index 31de39cf2c..4297cb3b83 100644 --- a/addons/logistics_wirecutter/CfgWeapons.hpp +++ b/addons/logistics_wirecutter/CfgWeapons.hpp @@ -6,7 +6,7 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); displayName = CSTRING(wirecutterName); descriptionShort = CSTRING(wirecutterDescription); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; + model = QUOTE(PATHTOF(data\ace_wirecutter.p3d)); picture = QUOTE(PATHTOF(ui\item_wirecutter_ca.paa)); scope = 2; class ItemInfo: InventoryItem_Base_F { diff --git a/addons/logistics_wirecutter/data/ace_wirecutter.p3d b/addons/logistics_wirecutter/data/ace_wirecutter.p3d new file mode 100644 index 0000000000..ebb459f99f Binary files /dev/null and b/addons/logistics_wirecutter/data/ace_wirecutter.p3d differ diff --git a/addons/logistics_wirecutter/data/ace_wirecutter.rvmat b/addons/logistics_wirecutter/data/ace_wirecutter.rvmat new file mode 100644 index 0000000000..1983a2c8f1 --- /dev/null +++ b/addons/logistics_wirecutter/data/ace_wirecutter.rvmat @@ -0,0 +1,90 @@ +class StageTI +{ + texture = "a3\data_f\default_glass_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,1}; +emmisive[] = {0,0,0,1}; +specular[] = {0,0,0,1}; +specularPower = 0; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\logistics_wirecutter\data\ace_wirecutter_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,32,128,1)fresnel(0.71,0.74)"; + uvSource = "none"; +}; +class Stage7 +{ + texture = "a3\data_f\env_land_co.paa"; + useWorldEnvMap = "true"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1.0,0.0,0.0}; + up[] = {0.0,1.0,0.0}; + dir[] = {0.0,0.0,0.0}; + pos[] = {0.0,0.0,0.0}; + }; +}; \ No newline at end of file diff --git a/addons/logistics_wirecutter/data/ace_wirecutter_co.paa b/addons/logistics_wirecutter/data/ace_wirecutter_co.paa new file mode 100644 index 0000000000..6dc2f01fac Binary files /dev/null and b/addons/logistics_wirecutter/data/ace_wirecutter_co.paa differ diff --git a/addons/logistics_wirecutter/data/ace_wirecutter_nohq.paa b/addons/logistics_wirecutter/data/ace_wirecutter_nohq.paa new file mode 100644 index 0000000000..7158e713ab Binary files /dev/null and b/addons/logistics_wirecutter/data/ace_wirecutter_nohq.paa differ diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 1fb4a0b622..e67c45e675 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -25,7 +25,7 @@ #ifndef STRING_MACROS_GUARD #define STRING_MACROS_GUARD #define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1)) - #define LESTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) + #define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) #define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) #define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) #endif @@ -68,6 +68,11 @@ count = COUNT; \ } +#define MACRO_ADDBACKPACK(BACKPACK,COUNT) class _xx_##BACKPACK { \ + backpack = #BACKPACK; \ + count = COUNT; \ +} + #ifdef DISABLE_COMPILE_CACHE #define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf)) diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 0f252d5b97..9b7627e66e 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -74,7 +74,6 @@ Mostrar as coordenadas de grade no ponteiro do mouse? - Moduł ten pozwala dostosować opcje widoku ekranu mapy. Dieses Modul erweitert die Kartenfunktionen. Tento modul umožňuje přizpůsobit mapu s obrazem. @@ -83,7 +82,7 @@ Blue Force Tracking Blue Force Tracking - Seguimiento de fuerzas amigas + Blue Force Tracking Blue Force Tracking Blue Force Tracking Rastreio de forças azuis @@ -93,12 +92,14 @@ RFA ativo Aktywuj BFT Povolit BFT + Activar BFT Enable Blue Force Tracking. Default: No Ativa Rastreio de Forças Azuis. Padrão: Não Aktywuj Blue Force Tracking. Domyślnie: Nie Povolit Blue Force Tracking. Výchozí: Ne + Activar Blue Force Tracking. Por defecto: No Interval @@ -133,7 +134,6 @@ Esconder marcadores que pertencem ao grupo de IA? - Pozwala śledzić na mapie pozycje sojuszniczych jednostek za pomocą markerów BFT. Dieses Modul ermöglicht es verbündete Einheiten mit dem BFT auf der Karte zu verfolgen. Umožňuje sledovat přátelské jednokty na mapě v rámci BFT. diff --git a/addons/maptools/CfgWeapons.hpp b/addons/maptools/CfgWeapons.hpp index 2e2271509b..5cec99bfb0 100644 --- a/addons/maptools/CfgWeapons.hpp +++ b/addons/maptools/CfgWeapons.hpp @@ -5,7 +5,7 @@ class CfgWeapons { class ACE_MapTools: ACE_ItemCore { displayName = CSTRING(Name); descriptionShort = CSTRING(Description); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; + model = QUOTE(PATHTOF(data\ace_MapTools.p3d)); picture = PATHTOF(UI\maptool_item.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { diff --git a/addons/maptools/data/ace_MapTools.p3d b/addons/maptools/data/ace_MapTools.p3d new file mode 100644 index 0000000000..f0952c09fa Binary files /dev/null and b/addons/maptools/data/ace_MapTools.p3d differ diff --git a/addons/maptools/data/ace_maptools.rvmat b/addons/maptools/data/ace_maptools.rvmat new file mode 100644 index 0000000000..a76a437c9d --- /dev/null +++ b/addons/maptools/data/ace_maptools.rvmat @@ -0,0 +1,90 @@ +class StageTI +{ + texture = "a3\data_f\default_glass_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,1}; +emmisive[] = {0,0,0,1}; +specular[] = {0.6,0.6,0.6,1}; +specularPower = 250; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\maptools\data\ace_maptools_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,32,128,1)fresnel(0.71,0.74)"; + uvSource = "none"; +}; +class Stage7 +{ + texture = "a3\data_f\env_land_co.paa"; + useWorldEnvMap = "true"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1.0,0.0,0.0}; + up[] = {0.0,1.0,0.0}; + dir[] = {0.0,0.0,0.0}; + pos[] = {0.0,0.0,0.0}; + }; +}; \ No newline at end of file diff --git a/addons/maptools/data/ace_maptools_ca.paa b/addons/maptools/data/ace_maptools_ca.paa new file mode 100644 index 0000000000..b4f54a7792 Binary files /dev/null and b/addons/maptools/data/ace_maptools_ca.paa differ diff --git a/addons/maptools/data/ace_maptools_nohq.paa b/addons/maptools/data/ace_maptools_nohq.paa new file mode 100644 index 0000000000..6bba02066d Binary files /dev/null and b/addons/maptools/data/ace_maptools_nohq.paa differ diff --git a/addons/medical/CfgActions.hpp b/addons/medical/CfgActions.hpp new file mode 100644 index 0000000000..ccaac6f75b --- /dev/null +++ b/addons/medical/CfgActions.hpp @@ -0,0 +1,6 @@ +class CfgActions { + class None; + class Heal: None { + show = 0; + }; +}; \ No newline at end of file diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 66df5550fc..aab193c098 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -727,21 +727,23 @@ class CfgVehicles { model = QUOTE(PATHTOF(data\littergeneric_bandages3.p3d)); }; class ACE_MedicalLitter_packingBandage: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\litter_packingBandage.p3d)); + model = QUOTE(PATHTOF(data\littergeneric_packingBandage.p3d)); }; class ACE_MedicalLitter_gloves: ACE_MedicalLitterBase { model = QUOTE(PATHTOF(data\littergeneric_gloves.p3d)); }; class ACE_MedicalLitter_atropine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\litter_atropine.p3d)); + model = QUOTE(PATHTOF(data\littergeneric_atropine.p3d)); }; class ACE_MedicalLitter_epinephrine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\litter_epinephrine.p3d)); + model = QUOTE(PATHTOF(data\littergeneric_epinephrine.p3d)); }; class ACE_MedicalLitter_morphine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\litter_morphine.p3d)); + model = QUOTE(PATHTOF(data\littergeneric_morphine.p3d)); + }; + class ACE_MedicalLitter_QuickClot: ACE_MedicalLitterBase { + model = QUOTE(PATHTOF(data\littergeneric_Quikclot.p3d)); }; - class Item_Base_F; class ACE_fieldDressingItem: Item_Base_F { scope = 2; @@ -750,10 +752,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_fieldDressing { - name = "ACE_fieldDressing"; - count = 1; - }; + MACRO_ADDITEM(ACE_fieldDressing,1); }; }; class ACE_packingBandageItem: Item_Base_F { @@ -763,10 +762,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_packingBandage { - name = "ACE_packingBandage"; - count = 1; - }; + MACRO_ADDITEM(ACE_packingBandage,1); }; }; class ACE_elasticBandageItem: Item_Base_F { @@ -776,10 +772,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_elasticBandage { - name = "ACE_elasticBandage"; - count = 1; - }; + MACRO_ADDITEM(ACE_elasticBandage,1); }; }; class ACE_tourniquetItem: Item_Base_F { @@ -789,10 +782,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_tourniquet { - name = "ACE_tourniquet"; - count = 1; - }; + MACRO_ADDITEM(ACE_tourniquet,1); }; }; class ACE_morphineItem: Item_Base_F { @@ -802,10 +792,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_morphine { - name = "ACE_morphine"; - count = 1; - }; + MACRO_ADDITEM(ACE_morphine,1); }; }; class ACE_atropineItem: Item_Base_F { @@ -815,10 +802,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_atropine { - name = "ACE_atropine"; - count = 1; - }; + MACRO_ADDITEM(ACE_atropine,1); }; }; class ACE_epinephrineItem: Item_Base_F { @@ -828,10 +812,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_epinephrine { - name = "ACE_epinephrine"; - count = 1; - }; + MACRO_ADDITEM(ACE_epinephrine,1); }; }; class ACE_plasmaIVItem: Item_Base_F { @@ -841,10 +822,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_plasmaIV { - name = "ACE_plasmaIV"; - count = 1; - }; + MACRO_ADDITEM(ACE_plasmaIV,1); }; }; @@ -855,10 +833,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_bloodIV { - name = "ACE_bloodIV"; - count = 1; - }; + MACRO_ADDITEM(ACE_bloodIV,1); }; }; class ACE_salineIVItem: Item_Base_F { @@ -868,10 +843,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_salineIV { - name = "ACE_salineIV"; - count = 1; - }; + MACRO_ADDITEM(ACE_salineIV,1); }; }; class ACE_quikClotItem: Item_Base_F { @@ -881,10 +853,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_quikClot { - name = "ACE_quikclot"; - count = 1; - }; + MACRO_ADDITEM(ACE_quikclot,1); }; }; class ACE_personalAidKitItem: Item_Base_F { @@ -894,10 +863,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_personalAidKit { - name = "ACE_personalAidKit"; - count = 1; - }; + MACRO_ADDITEM(ACE_personalAidKit,1); }; }; class ACE_surgicalKitItem: Item_Base_F { @@ -907,10 +873,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_surgicalKit { - name = "ACE_surgicalKit"; - count = 1; - }; + MACRO_ADDITEM(ACE_surgicalKit,1); }; }; class ACE_bodyBagItem: Item_Base_F { @@ -920,10 +883,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_bodyBag { - name = "ACE_bodyBag"; - count = 1; - }; + MACRO_ADDITEM(ACE_bodyBag,1); }; }; @@ -935,119 +895,38 @@ class CfgVehicles { model = PATHTOF(data\ace_medcrate.p3d); author = ECSTRING(common,ACETeam); class TransportItems { - class ACE_fieldDressing { - name = "ACE_fieldDressing"; - count = 50; - }; - class ACE_morphine { - name = "ACE_morphine"; - count = 25; - }; - class ACE_epinephrine { - name = "ACE_epinephrine"; - count = 25; - }; - class ACE_bloodIV { - name = "ACE_bloodIV"; - count = 15; - }; - class ACE_bloodIV_500 { - name = "ACE_bloodIV_500"; - count = 15; - }; - class ACE_bloodIV_250 { - name = "ACE_bloodIV_250"; - count = 15; - }; - class ACE_bodyBag { - name = "ACE_bodyBag"; - count = 10; - }; + MACRO_ADDITEM(ACE_fieldDressing,50); + MACRO_ADDITEM(ACE_morphine,25); + MACRO_ADDITEM(ACE_epinephrine,25); + MACRO_ADDITEM(ACE_bloodIV,15); + MACRO_ADDITEM(ACE_bloodIV_500,15); + MACRO_ADDITEM(ACE_bloodIV_250,15); + MACRO_ADDITEM(ACE_bodyBag,10); }; }; class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate { displayName = CSTRING(medicalSupplyCrate_advanced); class TransportItems { - class ACE_fieldDressing { - name = "ACE_fieldDressing"; - count = 25; - }; - class ACE_packingBandage { - name = "ACE_packingBandage"; - count = 25; - }; - class ACE_elasticBandage { - name = "ACE_elasticBandage"; - count = 25; - }; - class ACE_tourniquet { - name = "ACE_tourniquet"; - count = 15; - }; - class ACE_morphine { - name = "ACE_morphine"; - count = 15; - }; - class ACE_atropine { - name = "ACE_atropine"; - count = 15; - }; - class ACE_epinephrine { - name = "ACE_epinephrine"; - count = 15; - }; - class ACE_plasmaIV { - name = "ACE_plasmaIV"; - count = 7; - }; - class ACE_plasmaIV_500 { - name = "ACE_plasmaIV_500"; - count = 7; - }; - class ACE_plasmaIV_250 { - name = "ACE_plasmaIV_250"; - count = 7; - }; - class ACE_salineIV { - name = "ACE_salineIV"; - count = 7; - }; - class ACE_salineIV_500 { - name = "ACE_salineIV_500"; - count = 7; - }; - class ACE_salineIV_250 { - name = "ACE_salineIV_250"; - count = 7; - }; - class ACE_bloodIV { - name = "ACE_bloodIV"; - count = 7; - }; - class ACE_bloodIV_500 { - name = "ACE_bloodIV_500"; - count = 7; - }; - class ACE_bloodIV_250 { - name = "ACE_bloodIV_250"; - count = 7; - }; - class ACE_quikClot { - name = "ACE_quikclot"; - count = 20; - }; - class ACE_personalAidKit { - name = "ACE_personalAidKit"; - count = 3; - }; - class ACE_surgicalKit { - name = "ACE_surgicalKit"; - count = 2; - }; - class ACE_bodyBag { - name = "ACE_bodyBag"; - count = 5; - }; + MACRO_ADDITEM(ACE_fieldDressing,25); + MACRO_ADDITEM(ACE_packingBandage,25); + MACRO_ADDITEM(ACE_elasticBandage,25); + MACRO_ADDITEM(ACE_tourniquet,15); + MACRO_ADDITEM(ACE_morphine,15); + MACRO_ADDITEM(ACE_atropine,15); + MACRO_ADDITEM(ACE_epinephrine,15); + MACRO_ADDITEM(ACE_plasmaIV,7); + MACRO_ADDITEM(ACE_plasmaIV_500,7); + MACRO_ADDITEM(ACE_plasmaIV_250,7); + MACRO_ADDITEM(ACE_salineIV,7); + MACRO_ADDITEM(ACE_salineIV_500,7); + MACRO_ADDITEM(ACE_salineIV_250,7); + MACRO_ADDITEM(ACE_bloodIV,7); + MACRO_ADDITEM(ACE_bloodIV_500,7); + MACRO_ADDITEM(ACE_bloodIV_250,7); + MACRO_ADDITEM(ACE_quikClot,20); + MACRO_ADDITEM(ACE_personalAidKit,3); + MACRO_ADDITEM(ACE_surgicalKit,2); + MACRO_ADDITEM(ACE_bodyBag,5); }; }; }; diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index ef6c702604..6de00eff22 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -98,9 +98,13 @@ class CfgWeapons { mass = 1; }; }; + class ACE_plasmaIV: ACE_ItemCore { scope = 2; displayName = CSTRING(Plasma_IV); + model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d)); + hiddenSelections[] = {"camo"}; + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_1000ml_ca.paa)) }; picture = QUOTE(PATHTOF(ui\items\plasmaIV_x_ca.paa)); descriptionShort = CSTRING(Plasma_IV_Desc_Short); descriptionUse = CSTRING(Plasma_IV_Desc_Use); @@ -110,21 +114,27 @@ class CfgWeapons { }; class ACE_plasmaIV_500: ACE_plasmaIV { displayName = CSTRING(Plasma_IV_500); + model = QUOTE(PATHTOF(data\IVBag_500ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_500ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_plasmaIV_250: ACE_plasmaIV { displayName = CSTRING(Plasma_IV_250); + model = QUOTE(PATHTOF(data\IVBag_250ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_250ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; }; class ACE_bloodIV: ACE_ItemCore { scope = 2; - model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d"; + model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d)); displayName = CSTRING(Blood_IV); picture = QUOTE(PATHTOF(ui\items\bloodIV_x_ca.paa)); + hiddenSelections[] = {"camo"}; + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_1000ml_ca.paa)) }; descriptionShort = CSTRING(Blood_IV_Desc_Short); descriptionUse = CSTRING(Blood_IV_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -133,12 +143,16 @@ class CfgWeapons { }; class ACE_bloodIV_500: ACE_bloodIV { displayName = CSTRING(Blood_IV_500); + model = QUOTE(PATHTOF(data\IVBag_500ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_500ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_bloodIV_250: ACE_bloodIV { displayName = CSTRING(Blood_IV_250); + model = QUOTE(PATHTOF(data\IVBag_250ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_250ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; @@ -146,6 +160,9 @@ class CfgWeapons { class ACE_salineIV: ACE_ItemCore { scope = 2; displayName = CSTRING(Saline_IV); + model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d)); + hiddenSelections[] = {"camo"}; + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_1000ml_ca.paa)) }; picture = QUOTE(PATHTOF(ui\items\salineIV_x_ca.paa)); descriptionShort = CSTRING(Saline_IV_Desc_Short); descriptionUse = CSTRING(Saline_IV_Desc_Use); @@ -155,12 +172,16 @@ class CfgWeapons { }; class ACE_salineIV_500: ACE_salineIV { displayName = CSTRING(Saline_IV_500); + model = QUOTE(PATHTOF(data\IVBag_500ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_500ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_salineIV_250: ACE_salineIV { displayName = CSTRING(Saline_IV_250); + model = QUOTE(PATHTOF(data\IVBag_250ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_250ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; @@ -168,6 +189,7 @@ class CfgWeapons { class ACE_quikclot: ACE_ItemCore { scope = 2; displayName = CSTRING(QuikClot_Display); + model = QUOTE(PATHTOF(data\QuikClot.p3d)); picture = QUOTE(PATHTOF(ui\items\quickclot_x_ca.paa)); descriptionShort = CSTRING(QuikClot_Desc_Short); descriptionUse = CSTRING(QuikClot_Desc_Use); diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 463ed95406..44830081f2 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -12,6 +12,7 @@ class CfgPatches { }; }; +#include "CfgActions.hpp" #include "CfgEventHandlers.hpp" #include "CfgFactionClasses.hpp" #include "CfgVehicles.hpp" diff --git a/addons/medical/data/IVBag.rvmat b/addons/medical/data/IVBag.rvmat new file mode 100644 index 0000000000..c33c0ead90 --- /dev/null +++ b/addons/medical/data/IVBag.rvmat @@ -0,0 +1,99 @@ +#define _ARMA_ + +class StageTI +{ + texture = "a3\data_f\default_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,0}; +specular[] = {0.3,0.3,0.3,0.3}; +specularPower = 150; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\medical\data\IVBag_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,64,64,1)fresnelGlass(2)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage7 +{ + useWorldEnvMap = "true"; + texture = "a3\data_f\env_land_ca.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/medical/data/IVBag_1000ml.p3d b/addons/medical/data/IVBag_1000ml.p3d new file mode 100644 index 0000000000..e76108b4ff Binary files /dev/null and b/addons/medical/data/IVBag_1000ml.p3d differ diff --git a/addons/medical/data/IVBag_250ml.p3d b/addons/medical/data/IVBag_250ml.p3d new file mode 100644 index 0000000000..1e727c45d8 Binary files /dev/null and b/addons/medical/data/IVBag_250ml.p3d differ diff --git a/addons/medical/data/IVBag_500ml.p3d b/addons/medical/data/IVBag_500ml.p3d new file mode 100644 index 0000000000..569244fe88 Binary files /dev/null and b/addons/medical/data/IVBag_500ml.p3d differ diff --git a/addons/medical/data/IVBag_blood_1000ml_ca.paa b/addons/medical/data/IVBag_blood_1000ml_ca.paa new file mode 100644 index 0000000000..8831da60c1 Binary files /dev/null and b/addons/medical/data/IVBag_blood_1000ml_ca.paa differ diff --git a/addons/medical/data/IVBag_blood_250ml_ca.paa b/addons/medical/data/IVBag_blood_250ml_ca.paa new file mode 100644 index 0000000000..bd1d323917 Binary files /dev/null and b/addons/medical/data/IVBag_blood_250ml_ca.paa differ diff --git a/addons/medical/data/IVBag_blood_500ml_ca.paa b/addons/medical/data/IVBag_blood_500ml_ca.paa new file mode 100644 index 0000000000..ad093988fe Binary files /dev/null and b/addons/medical/data/IVBag_blood_500ml_ca.paa differ diff --git a/addons/medical/data/IVBag_nohq.paa b/addons/medical/data/IVBag_nohq.paa new file mode 100644 index 0000000000..3018c3a044 Binary files /dev/null and b/addons/medical/data/IVBag_nohq.paa differ diff --git a/addons/medical/data/IVBag_plasma_1000ml_ca.paa b/addons/medical/data/IVBag_plasma_1000ml_ca.paa new file mode 100644 index 0000000000..c3959990d9 Binary files /dev/null and b/addons/medical/data/IVBag_plasma_1000ml_ca.paa differ diff --git a/addons/medical/data/IVBag_plasma_250ml_ca.paa b/addons/medical/data/IVBag_plasma_250ml_ca.paa new file mode 100644 index 0000000000..6ba7ae4f9d Binary files /dev/null and b/addons/medical/data/IVBag_plasma_250ml_ca.paa differ diff --git a/addons/medical/data/IVBag_plasma_500ml_ca.paa b/addons/medical/data/IVBag_plasma_500ml_ca.paa new file mode 100644 index 0000000000..3a58b45ff8 Binary files /dev/null and b/addons/medical/data/IVBag_plasma_500ml_ca.paa differ diff --git a/addons/medical/data/IVBag_saline_1000ml_ca.paa b/addons/medical/data/IVBag_saline_1000ml_ca.paa new file mode 100644 index 0000000000..3637870600 Binary files /dev/null and b/addons/medical/data/IVBag_saline_1000ml_ca.paa differ diff --git a/addons/medical/data/IVBag_saline_250ml_ca.paa b/addons/medical/data/IVBag_saline_250ml_ca.paa new file mode 100644 index 0000000000..d37f6d2ce5 Binary files /dev/null and b/addons/medical/data/IVBag_saline_250ml_ca.paa differ diff --git a/addons/medical/data/IVBag_saline_500ml_ca.paa b/addons/medical/data/IVBag_saline_500ml_ca.paa new file mode 100644 index 0000000000..f3305e5b02 Binary files /dev/null and b/addons/medical/data/IVBag_saline_500ml_ca.paa differ diff --git a/addons/medical/data/QuikClot.p3d b/addons/medical/data/QuikClot.p3d new file mode 100644 index 0000000000..85ec2e9923 Binary files /dev/null and b/addons/medical/data/QuikClot.p3d differ diff --git a/addons/medical/data/QuikClot.rvmat b/addons/medical/data/QuikClot.rvmat new file mode 100644 index 0000000000..778e9812e1 --- /dev/null +++ b/addons/medical/data/QuikClot.rvmat @@ -0,0 +1,82 @@ +class StageTI +{ + texture="a3\data_f\default_ti_ca.paa"; +}; +ambient[]={1,1,1,1}; +diffuse[]={1,1,1,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.050000008,0.050000008,0.050000008,1}; +specularPower=50; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 +{ + texture="z\ace\addons\medical\data\quikclot_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource="tex"; + class uvTransform + { + aside[]={0,9,0}; + up[]={4.5,0,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 +{ + texture="#(argb,8,8,3)color(0,0,0,0)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage4 +{ + texture="#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage5 +{ + texture="#(argb,8,8,3)color(1,1,1,1,SMDI)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 +{ + texture="#(ai,64,64,1)fresnel(1.5,1.22)"; + uvSource="none"; +}; +class Stage7 +{ + texture="a3\data_f\env_land_co.paa"; + uvSource="none"; +}; diff --git a/addons/medical/data/QuikClot_CO.paa b/addons/medical/data/QuikClot_CO.paa new file mode 100644 index 0000000000..ce1a412b74 Binary files /dev/null and b/addons/medical/data/QuikClot_CO.paa differ diff --git a/addons/medical/data/QuikClot_NOHQ.paa b/addons/medical/data/QuikClot_NOHQ.paa new file mode 100644 index 0000000000..0b5f78ff0f Binary files /dev/null and b/addons/medical/data/QuikClot_NOHQ.paa differ diff --git a/addons/medical/data/ace_gloves_ca.paa b/addons/medical/data/ace_gloves_ca.paa deleted file mode 100644 index 0873d7fbf4..0000000000 Binary files a/addons/medical/data/ace_gloves_ca.paa and /dev/null differ diff --git a/addons/medical/data/litter_packingbandage.p3d b/addons/medical/data/litter_packingbandage.p3d deleted file mode 100644 index 5c0cdda10e..0000000000 Binary files a/addons/medical/data/litter_packingbandage.p3d and /dev/null differ diff --git a/addons/medical/data/littergeneric_Quikclot.p3d b/addons/medical/data/littergeneric_Quikclot.p3d new file mode 100644 index 0000000000..e309736148 Binary files /dev/null and b/addons/medical/data/littergeneric_Quikclot.p3d differ diff --git a/addons/medical/data/litter_atropine.p3d b/addons/medical/data/littergeneric_atropine.p3d similarity index 100% rename from addons/medical/data/litter_atropine.p3d rename to addons/medical/data/littergeneric_atropine.p3d diff --git a/addons/medical/data/litter_epinephrine.p3d b/addons/medical/data/littergeneric_epinephrine.p3d similarity index 100% rename from addons/medical/data/litter_epinephrine.p3d rename to addons/medical/data/littergeneric_epinephrine.p3d diff --git a/addons/medical/data/littergeneric_gloves.p3d b/addons/medical/data/littergeneric_gloves.p3d index 269742c802..abc55ebcc9 100644 Binary files a/addons/medical/data/littergeneric_gloves.p3d and b/addons/medical/data/littergeneric_gloves.p3d differ diff --git a/addons/medical/data/littergeneric_gloves.rvmat b/addons/medical/data/littergeneric_gloves.rvmat new file mode 100644 index 0000000000..0a0df2c55c --- /dev/null +++ b/addons/medical/data/littergeneric_gloves.rvmat @@ -0,0 +1,32 @@ +ambient[]={1,1,1,1}; +diffuse[]={0.5,0.5,0.5,1}; +forcedDiffuse[]={0.5,0.5,0.5,0}; +emmisive[]={0,0,0,1}; +specular[]={0.20000001,0.20000001,0.20000001,0}; +specularPower=350.799999; +PixelShaderID="NormalMapSpecularDIMap"; +VertexShaderID="NormalMap"; +class Stage1 +{ + texture="z\ace\addons\medical\data\littergeneric_gloves_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture= "#(argb,8,8,3)color(0.1,0.1,0.1,0,SMDI)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; diff --git a/addons/medical/data/littergeneric_gloves_co.paa b/addons/medical/data/littergeneric_gloves_co.paa new file mode 100644 index 0000000000..77deb00196 Binary files /dev/null and b/addons/medical/data/littergeneric_gloves_co.paa differ diff --git a/addons/medical/data/littergeneric_gloves_nohq.paa b/addons/medical/data/littergeneric_gloves_nohq.paa new file mode 100644 index 0000000000..86388fad83 Binary files /dev/null and b/addons/medical/data/littergeneric_gloves_nohq.paa differ diff --git a/addons/medical/data/litter_morphine.p3d b/addons/medical/data/littergeneric_morphine.p3d similarity index 100% rename from addons/medical/data/litter_morphine.p3d rename to addons/medical/data/littergeneric_morphine.p3d diff --git a/addons/medical/data/littergeneric_packingbandage.p3d b/addons/medical/data/littergeneric_packingbandage.p3d new file mode 100644 index 0000000000..73e86d92b4 Binary files /dev/null and b/addons/medical/data/littergeneric_packingbandage.p3d differ diff --git a/addons/medical/data/littergeneric_packingbandage.rvmat b/addons/medical/data/littergeneric_packingbandage.rvmat new file mode 100644 index 0000000000..8deaff550f --- /dev/null +++ b/addons/medical/data/littergeneric_packingbandage.rvmat @@ -0,0 +1,31 @@ +ambient[]={1,1,1,1}; +diffuse[]={0.5,0.5,0.5,1}; +forcedDiffuse[]={0.5,0.5,0.5,0}; +emmisive[]={0,0,0,1}; +specular[]={0,0,0,0}; +PixelShaderID="NormalMapSpecularDIMap"; +VertexShaderID="NormalMap"; +class Stage1 +{ + texture="z\ace\addons\medical\data\littergeneric_packingbandage_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture= "#(argb,8,8,3)color(0,0,0,1,SMDI)"; + uvSource="tex"; + class uvTransform + { + aside[]={0,0,0}; + up[]={0,0,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; diff --git a/addons/medical/data/littergeneric_packingbandage_nohq.paa b/addons/medical/data/littergeneric_packingbandage_nohq.paa new file mode 100644 index 0000000000..b3d88b53ab Binary files /dev/null and b/addons/medical/data/littergeneric_packingbandage_nohq.paa differ diff --git a/addons/medical/data/model.cfg b/addons/medical/data/model.cfg new file mode 100644 index 0000000000..114fae7ada --- /dev/null +++ b/addons/medical/data/model.cfg @@ -0,0 +1,24 @@ +class CfgSkeletons { + class Default { + isDiscrete = 1; + skeletonInherit = ""; + skeletonBones[] = {}; + }; +}; + +class CfgModels { + class Default { + sectionsInherit=""; + sections[] = {""}; + skeletonName = ""; + }; + class IVBagBase: Default { + sectionsInherit = ""; + sections[] = {"camo"}; + skeletonName = ""; + }; + + class IVBag_250ml: IVBagBase {}; + class IVBag_500ml: IVBagBase {}; + class IVBag_1000ml: IVBagBase {}; +}; \ No newline at end of file diff --git a/addons/medical/data/packingbandage.p3d b/addons/medical/data/packingbandage.p3d index 714275e3a3..002c68ed13 100644 Binary files a/addons/medical/data/packingbandage.p3d and b/addons/medical/data/packingbandage.p3d differ diff --git a/addons/medical/data/packingbandage.rvmat b/addons/medical/data/packingbandage.rvmat index b90d8469c6..ba2fdfb2e6 100644 --- a/addons/medical/data/packingbandage.rvmat +++ b/addons/medical/data/packingbandage.rvmat @@ -1,9 +1,9 @@ ambient[]={1,1,1,1}; diffuse[]={0.5,0.5,0.5,1}; forcedDiffuse[]={0.5,0.5,0.5,0}; -emmisive[]={0,0,0,1}; -specular[]={0.30000001,0.30000001,0.30000001,0}; -specularPower=57.799999; +emmisive[]={0,0,0,0}; +specular[]={0,0,0,0}; +specularPower=0; PixelShaderID="NormalMapSpecularDIMap"; VertexShaderID="NormalMap"; class Stage1 @@ -20,13 +20,13 @@ class Stage1 }; class Stage2 { - texture="z\ace\addons\medical\data\packingbandage_smdi.paa"; + texture= "#(argb,8,8,3)color(0,0,0,1,SMDI)"; uvSource="tex"; class uvTransform { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; + aside[]={0,0,0}; + up[]={0,0,0}; + dir[]={0,0,0}; pos[]={0,0,0}; }; }; diff --git a/addons/medical/data/packingbandage_co.paa b/addons/medical/data/packingbandage_co.paa new file mode 100644 index 0000000000..cac0cd7c90 Binary files /dev/null and b/addons/medical/data/packingbandage_co.paa differ diff --git a/addons/medical/data/packingbandage_color.paa b/addons/medical/data/packingbandage_color.paa deleted file mode 100644 index 54b1f75e2e..0000000000 Binary files a/addons/medical/data/packingbandage_color.paa and /dev/null differ diff --git a/addons/medical/data/packingbandage_nohq.paa b/addons/medical/data/packingbandage_nohq.paa index 1b3782c501..27420ea40a 100644 Binary files a/addons/medical/data/packingbandage_nohq.paa and b/addons/medical/data/packingbandage_nohq.paa differ diff --git a/addons/medical/data/packingbandage_smdi.paa b/addons/medical/data/packingbandage_smdi.paa deleted file mode 100644 index 8d5b3848ac..0000000000 Binary files a/addons/medical/data/packingbandage_smdi.paa and /dev/null differ diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index 831a1fa6a0..c29edcd5e3 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -49,7 +49,7 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == _unit = _args select 0; _startTime = _unit getvariable [QGVAR(reviveStartTime), 0]; - if (ACE_time - _startTime > GVAR(maxReviveTime)) exitwith { + if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith { [(_this select 1)] call cba_fnc_removePerFrameHandler; _unit setvariable [QGVAR(inReviveState), nil, true]; _unit setvariable [QGVAR(reviveStartTime), nil]; diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index 3298c0a869..7e5cd8c1b7 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -6,10 +6,14 @@ * 0: The unit that will be put in an unconscious state * 1: Set unconsciouns * 2: Minimum unconscious ACE_time + * 3: Force AI Unconscious (skip random death chance) * * ReturnValue: * nil * + * Example: + * [bob, true] call ace_medical_fnc_setUnconscious; + * * Public: yes */ diff --git a/addons/medical/functions/fnc_treatment_failure.sqf b/addons/medical/functions/fnc_treatment_failure.sqf index 53fd03d2f3..dd49729686 100644 --- a/addons/medical/functions/fnc_treatment_failure.sqf +++ b/addons/medical/functions/fnc_treatment_failure.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" -private ["_args", "_caller", "_target","_selectionName","_className","_config","_callback", "_usersOfItems", "_weaponSelect"]; +private ["_args", "_caller", "_target","_selectionName","_className","_config","_callback", "_usersOfItems", "_weaponSelect", "_lastAnim"]; _args = _this select 0; _caller = _args select 0; @@ -30,7 +30,17 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeWeapon "ACE_FakePrimaryWeapon"; }; if (vehicle _caller == _caller) then { - [_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation); + _lastAnim = _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""]; + //Don't play another medic animation (when player is rapidily treating) + TRACE_2("Reseting to old animation", animationState player, _lastAnim); + switch (true) do { + case (_lastAnim == "AinvPknlMstpSlayWrflDnon_medic"): {_lastAnim = "AmovPknlMstpSrasWrflDnon"}; + case (_lastAnim == "AinvPpneMstpSlayWrflDnon_medic"): {_lastAnim = "AmovPpneMstpSrasWrflDnon"}; + case (_lastAnim == "AinvPknlMstpSlayWnonDnon_medic"): {_lastAnim = "AmovPknlMstpSnonWnonDnon"}; + case (_lastAnim == "AinvPpneMstpSlayWpstDnon_medic"): {_lastAnim = "AinvPpneMstpSlayWpstDnon"}; + case (_lastAnim == "AinvPknlMstpSlayWpstDnon_medic"): {_lastAnim = "AmovPknlMstpSrasWpstDnon"}; + }; + [_caller, _lastAnim, 1] call EFUNC(common,doAnimation); }; _caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf index b3b6e9d52a..19c12d9299 100644 --- a/addons/medical/functions/fnc_treatment_success.sqf +++ b/addons/medical/functions/fnc_treatment_success.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" -private ["_args", "_caller", "_target","_selectionName","_className","_config","_callback", "_weaponSelect"]; +private ["_args", "_caller", "_target","_selectionName","_className","_config","_callback", "_weaponSelect", "_lastAnim"]; _args = _this select 0; _caller = _args select 0; _target = _args select 1; @@ -28,7 +28,17 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeWeapon "ACE_FakePrimaryWeapon"; }; if (vehicle _caller == _caller) then { - [_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation); + _lastAnim = _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""]; + //Don't play another medic animation (when player is rapidily treating) + TRACE_2("Reseting to old animation", animationState player, _lastAnim); + switch (true) do { + case (_lastAnim == "AinvPknlMstpSlayWrflDnon_medic"): {_lastAnim = "AmovPknlMstpSrasWrflDnon"}; + case (_lastAnim == "AinvPpneMstpSlayWrflDnon_medic"): {_lastAnim = "AmovPpneMstpSrasWrflDnon"}; + case (_lastAnim == "AinvPknlMstpSlayWnonDnon_medic"): {_lastAnim = "AmovPknlMstpSnonWnonDnon"}; + case (_lastAnim == "AinvPpneMstpSlayWpstDnon_medic"): {_lastAnim = "AinvPpneMstpSlayWpstDnon"}; + case (_lastAnim == "AinvPknlMstpSlayWpstDnon_medic"): {_lastAnim = "AmovPknlMstpSrasWpstDnon"}; + }; + [_caller, _lastAnim, 1] call EFUNC(common,doAnimation); }; _caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 35f989e8a1..5ceb625f59 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -3192,10 +3192,12 @@ Condition PAK Podmínka osobní lékárničky + Condición EPA When can the Personal Aid Kit be used? Kde může být použita osobní lékárnička? + ¿Cuando se puede utilizar el Equipo de primeros auxilios? Anywhere @@ -3299,10 +3301,12 @@ Condition Surgical kit (Adv) Podmínka chirurgické soupravy (Pokr.) + Condición de equipo quirúrgico (Av) When can the Surgical kit be used? Kde může být použita chirurgická souprava? + ¿Cuando se puede utilizar el equipo quirúrgico? Bloodstains @@ -3454,8 +3458,6 @@ É médico - - Moduł ten pozwala przypisać klasę medyczną wybranym jednostkom. Dieses Modul legt fest welche Einheit ein Sanitäter ist. Tento modul určuje, která jednotka je zdravotník. @@ -3632,10 +3634,12 @@ Anytime Kdykoli + Siempre Stable Stabilní + Estable \ No newline at end of file diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf index 2d33969b56..c918bcf454 100644 --- a/addons/microdagr/XEH_clientInit.sqf +++ b/addons/microdagr/XEH_clientInit.sqf @@ -39,25 +39,4 @@ GVAR(newWaypointPosition) = []; GVAR(currentWaypoint) = -1; GVAR(rangeFinderPositionASL) = []; - -GVAR(mapAltitude) = getNumber (configFile >> "CfgWorlds" >> worldName >> "elevationOffset"); - -private ["_worldMapLong", "_worldMapLat", "_zone", "_band", "_squareID"]; - -//Calculate the map's MGRS: -_worldMapLong = getNumber (configFile >> "CfgWorlds" >> worldName >> "longitude"); -_worldMapLat = getNumber (configFile >> "CfgWorlds" >> worldName >> "latitude"); -//Pull UTM grid from world's long/lat -_zone = 1 + (floor ((_worldMapLong + 180) / 6)); -_band = "Z"; -if (_worldMapLat <= -80) then { - _band = "A"; -} else { - if (_worldMapLat < 84) then { - _band = "CDEFGHJKLMNPQRSTUVWXX" select [(floor ((_worldMapLat / 8) + 10)), 1]; - }; -}; -//calculating square ID from long/lat is a pain in the ass, just fake it unless someone wants to actualy do this -_squareID = if ((count worldName) > 2) then {toUpper(worldName select [0,2])} else {"XG"}; -GVAR(mgrsGridZoneDesignator) = format ["%1%2 %3", _zone, _band, _squareID]; - +GVAR(mgrsGridZoneDesignator) = format ["%1 %2",EGVAR(common,MGRS_data) select 0, EGVAR(common,MGRS_data) select 1]; diff --git a/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf b/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf index 066b44508d..0822bdf310 100644 --- a/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf +++ b/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -private ["_display", "_editText", "_gridPosTuple", "_actualPos"]; +private ["_display", "_editText", "_actualPos"]; PARAMS_1(_keypadButton); disableSerialization; @@ -34,8 +34,7 @@ _editText = ctrlText (_display displayCtrl IDC_MODEMARK_CORDSEDIT); switch (_keypadButton) do { case ("ok"): { if ((count GVAR(newWaypointPosition)) == 0) then { - _gridPosTuple = [_editText] call BIS_fnc_gridToPos; - _actualPos = [(((_gridPosTuple select 0) select 0) + 0.5 * ((_gridPosTuple select 1) select 0)), (((_gridPosTuple select 0) select 1) + 0.5 * ((_gridPosTuple select 1) select 1))]; + _actualPos = [_editText, true] call EFUNC(common,getMapPosFromGrid); _actualPos set [2, (getTerrainHeightASL _actualPos)]; GVAR(newWaypointPosition) = _actualPos; [APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode); diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index 7e2a1ad53e..910f422c75 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -private ["_display", "_waypoints", "_posString", "_eastingText", "_northingText", "_numASL", "_aboveSeaLevelText", "_compassAngleText", "_targetPosName", "_targetPosLocationASL", "_bearingText", "_rangeText", "_targetName", "_bearing", "_2dDistanceKm", "_SpeedText", "_playerPos2d", "_wpListBox", "_currentIndex", "_wpName", "_wpPos", "_settingListBox", "_yearString", "_monthSring", "_dayString", "_daylight"]; +private ["_display", "_waypoints", "_posString", "_eastingText", "_northingText", "_numASL", "_aboveSeaLevelText", "_compassAngleText", "_targetPos", "_targetPosName", "_targetPosLocationASL", "_bearingText", "_rangeText", "_targetName", "_bearing", "_2dDistanceKm", "_SpeedText", "_playerPos2d", "_wpListBox", "_currentIndex", "_wpName", "_wpPos", "_settingListBox", "_yearString", "_monthSring", "_dayString"]; disableSerialization; _display = displayNull; @@ -37,18 +37,14 @@ _waypoints = [] call FUNC(deviceGetWaypoints); switch (GVAR(currentApplicationPage)) do { case (APP_MODE_INFODISPLAY): { //Easting/Northing: - _posString = mapGridPosition ACE_player; - _eastingText = ""; - _northingText = ""; - if (count _posString > 0) then { - _eastingText = (_posString select [0, ((count _posString)/2)]) + "e"; - _northingText = (_posString select [(count _posString)/2, (count _posString - 1)]) + "n"; - }; + _posString = [getPos ACE_player] call EFUNC(common,getMapGridFromPos); + _eastingText = (_posString select 0) + "e"; + _northingText = (_posString select 1) + "n"; (_display displayCtrl IDC_MODEDISPLAY_EASTING) ctrlSetText _eastingText; (_display displayCtrl IDC_MODEDISPLAY_NORTHING) ctrlSetText _northingText; //Elevation: - _numASL = ((getPosASL ace_player) select 2) + GVAR(mapAltitude); + _numASL = ((getPosASL ace_player) select 2) + EGVAR(common,mapAltitude); _aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber; _aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"}; (_display displayCtrl IDC_MODEDISPLAY_ELEVATIONNUM) ctrlSetText _aboveSeaLevelText; @@ -82,7 +78,8 @@ case (APP_MODE_INFODISPLAY): { if (GVAR(currentWaypoint) == -2) then { if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { - _targetPosName = format ["[%1]", (mapGridPosition GVAR(rangeFinderPositionASL))]; + _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos); + _targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1]; _targetPosLocationASL = GVAR(rangeFinderPositionASL); }; } else { @@ -100,7 +97,7 @@ case (APP_MODE_INFODISPLAY): { }; _2dDistanceKm = (((getPosASL ace_player) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000; _rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)]; - _numASL = (_targetPosLocationASL select 2) + GVAR(mapAltitude); + _numASL = (_targetPosLocationASL select 2) + EGVAR(common,mapAltitude); _aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber; _aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"}; }; @@ -136,7 +133,8 @@ case (APP_MODE_COMPASS): { if (GVAR(currentWaypoint) == -2) then { if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { - _targetPosName = format ["[%1]", (mapGridPosition GVAR(rangeFinderPositionASL))]; + _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos); + _targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1]; _targetPosLocationASL = GVAR(rangeFinderPositionASL); }; } else { diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index 7d3ac64af5..a636ffa4de 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -306,6 +306,7 @@ Wypełnienie mapy MicroDAGR Relleno del mapa MicroDAGR MicroDAGR - Vyplnění mapy + MicroDAGR-Kartenfüllung Preenchimento de mapa do MicroDAGR @@ -313,6 +314,7 @@ Wypełnienie mapy MicroDAGR Relleno del mapa MicroDAGR MicroDAGR - Vyplnění mapy + MicroDAGR-Kartenfüllung Preenchimento de mapa do MicroDAGR @@ -356,4 +358,4 @@ Controla quantos dados são preenchidos nos itens microDAGR. Menos dados restringe a visualização de mapa para mostrar menos informações no minimapa<br/>Fonte: MicroDAGR.pbo - \ No newline at end of file + diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf index f044d8242c..1eb791a058 100644 --- a/addons/missileguidance/functions/fnc_onFired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -1,20 +1,21 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" +PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); + // Bail if guidance is disabled // Bail on locality of the projectile, it should be local to us if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false }; +//Bail if shooter isn't player AND system not enabled for AI: if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false }; -private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"]; -private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"]; - -PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); - // Bail on not missile if(! (_ammo isKindOf "MissileBase") ) exitWith { false }; +private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"]; +private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"]; + //Verify ammo has explicity added guidance config (ignore inheritances) _configs = configProperties [(configFile >> "CfgAmmo" >> _ammo), QUOTE(configName _x == QUOTE(QUOTE(ADDON))), false]; if( (count _configs) < 1) exitWith {}; diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp index 2738a649a9..44773d79c2 100644 --- a/addons/mk6mortar/CfgVehicles.hpp +++ b/addons/mk6mortar/CfgVehicles.hpp @@ -31,6 +31,8 @@ class CfgVehicles { class Turrets: Turrets { class MainTurret: MainTurret { turretInfoType = "ACE_Mk6_RscWeaponRangeArtillery"; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; }; }; class ACE_SelfActions { diff --git a/addons/mk6mortar/RscInGameUI.hpp b/addons/mk6mortar/RscInGameUI.hpp index 102362216a..740334886c 100644 --- a/addons/mk6mortar/RscInGameUI.hpp +++ b/addons/mk6mortar/RscInGameUI.hpp @@ -3,8 +3,17 @@ class RscInGameUI { class CA_IGUI_elements_group: RscControlsGroup {}; }; class ACE_Mk6_RscWeaponRangeArtillery: RscWeaponRangeArtillery { - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery',(_this select 0))]; _this call FUNC(turretDisplayLoaded);); - controls[] = {"ACE_MILS_GROUP", "CA_IGUI_elements_group","CA_RangeElements_group"}; + onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Mk6Mortar')])] call EFUNC(common,localEvent);); + controls[] = {"ACE_ChargeDisplay", "ACE_MILS_GROUP", "CA_IGUI_elements_group","CA_RangeElements_group"}; + class ACE_ChargeDisplay: RscStructuredText { + idc = 80085; + colorText[] = {1, 1, 1, 1}; + colorBackground[] = {0, 0, 0, 0.1}; + x = "(profilenamespace getvariable ['IGUI_GRID_WEAPON_X', ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))])"; + y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; + w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + }; class ACE_MILS_GROUP: CA_IGUI_elements_group { idc = 80170; class controls { diff --git a/addons/mk6mortar/XEH_clientInit.sqf b/addons/mk6mortar/XEH_clientInit.sqf index 973772c96a..cde5277260 100644 --- a/addons/mk6mortar/XEH_clientInit.sqf +++ b/addons/mk6mortar/XEH_clientInit.sqf @@ -3,3 +3,4 @@ if (!hasInterface) exitWith {}; ["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler); +["infoDisplayChanged", {_this call FUNC(turretDisplayLoaded);}] call EFUNC(common,addEventHandler); diff --git a/addons/mk6mortar/config.cpp b/addons/mk6mortar/config.cpp index bbd7a2f892..8a54d15a5b 100644 --- a/addons/mk6mortar/config.cpp +++ b/addons/mk6mortar/config.cpp @@ -12,10 +12,13 @@ class CfgPatches { }; }; +#include "ACE_Settings.hpp" #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" + +//UI Stuff: class RscText; class RscListbox; class RscListNBox; @@ -23,7 +26,7 @@ class RscPicture; class RscControlsGroup; class ScrollBar; class RscActiveText; +class RscStructuredText; #include "RscInGameUI.hpp" #include "RscRangeTable.hpp" -#include "ACE_Settings.hpp" diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index 3f739aee2f..67538a076f 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -21,7 +21,7 @@ */ #include "script_component.hpp" -private ["_shooterMan", "_bisAirFriction", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed"]; +private ["_shooterMan", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed"]; disableSerialization; @@ -35,11 +35,6 @@ if (_vehicle distance ACE_player > 8000) exitWith {false}; _shooterMan = gunner _vehicle; if (!([_shooterMan] call EFUNC(common,isPlayer))) exitWith {false}; -//Should be zero, just make sure: -_bisAirFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction"); -if (_bisAirFriction != 0) exitWith {ERROR("Non zero base airFriction");}; - - //Calculate air density: _altitude = (getPosASL _vehicle) select 2; _temperature = _altitude call EFUNC(weather,calculateTemperatureAtHeight); diff --git a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf index e74cb315f7..760597a40e 100644 --- a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf +++ b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf @@ -16,33 +16,29 @@ */ #include "script_component.hpp" -private ["_chargeText", "_xPos", "_yPos", "_wPos", "_hPos", "_tubeWeaponName", "_fireModes"]; - PARAMS_2(_player,_newVehicle); +private["_tubeWeaponName" ,"_fireModes"]; + if (isNull _newVehicle) exitWith {}; if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {}; -_chargeText = (findDisplay 46) ctrlCreate ["RscStructuredText", 80085]; - -_xPos = (profilenamespace getvariable ["IGUI_GRID_WEAPON_X", ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))]); -_yPos = 2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable ["IGUI_GRID_WEAPON_Y", (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]); -_wPos = 10 * (((safezoneW / safezoneH) min 1.2) / 40); -_hPos = 1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25); - -_chargeText ctrlSetPosition [_xPos, _yPos, _wPos, _hPos]; -_chargeText ctrlCommit 0; - _tubeWeaponName = (weapons _newVehicle) select 0; _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes"); +//Restore last firemode: +_lastFireMode = _newVehicle getVariable [QGVAR(lastFireMode), -1]; +if (_lastFireMode != -1) then { + _player action ["SwitchWeapon", _newVehicle, _player, _lastFireMode]; +}; + [{ + private["_chargeText", "_currentChargeMode", "_currentFireMode", "_display", "_elevDeg", "_elevationDiff", "_lookVector", "_notGunnerView", "_realAzimuth", "_realElevation", "_upVectorDir", "_useMils", "_weaponDir"]; PARAMS_2(_args,_pfID); - EXPLODE_3_PVT(_args,_mortarVeh,_chargeText,_fireModes); + EXPLODE_2_PVT(_args,_mortarVeh,_fireModes); if ((vehicle ACE_player) != _mortarVeh) then { [_pfID] call CBA_fnc_removePerFrameHandler; - ctrlDelete _chargeText; } else { _useMils = _mortarVeh getVariable [QGVAR(useMils), true]; @@ -51,8 +47,9 @@ _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes") _currentFireMode = (weaponState [_mortarVeh, [0]]) select 2; _currentChargeMode = _fireModes find _currentFireMode; - _text = format ["%1: %2 ", (localize LSTRING(rangetable_charge)), _currentChargeMode, QUOTE(PATHTOF(UI\ui_charges.paa))]; - _chargeText ctrlSetStructuredText parseText _text; + //Save firemode on vehicle: + _mortarVeh setVariable [QGVAR(lastFireMode), _currentChargeMode]; + if (shownArtilleryComputer && {!GVAR(allowComputerRangefinder)}) then { //Don't like this solution, but it works closeDialog 0; @@ -62,18 +59,51 @@ _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes") _display = uiNamespace getVariable ["ACE_Mk6_RscWeaponRangeArtillery", displayNull]; if (isNull _display) exitWith {}; //It may be null for the first frame + _chargeText = format ["%1: %2 ", (localize LSTRING(rangetable_charge)), _currentChargeMode, QUOTE(PATHTOF(UI\ui_charges.paa))]; + //Hud should hidden in 3rd person _notGunnerView = cameraView != "GUNNER"; - //Update CurrentElevation Display: + //Calc real azimuth/elevation + //(looking at the sky VS looking at ground will radicaly change fire direction because BIS) + _realAzimuth = -1; + _realElevation = -1; + if ((ctrlText (_display displayCtrl 173)) == "--") then { + //No range (looking at sky), it will follow weaponDir: + _weaponDir = _mortarVeh weaponDirection (currentWeapon _mortarVeh); + _realAzimuth = (_weaponDir select 0) atan2 (_weaponDir select 1); + _realElevation = asin (_weaponDir select 2); + } else { + //Valid range, will fire at camera dir + _lookVector = (ATLToASL (positionCameraToWorld [0,0,0])) vectorFromTo (ATLToASL (positionCameraToWorld [0,0,10])); + _realAzimuth = ((_lookVector select 0) atan2 (_lookVector select 1)); + _upVectorDir = (((vectorUp _mortarVeh) select 0) atan2 ((vectorUp _mortarVeh) select 1)); + _elevationDiff = (cos (_realAzimuth - _upVectorDir)) * acos ((vectorUp _mortarVeh) select 2); + _realElevation = ((180 / PI) * (_mortarVeh animationPhase "mainGun")) + 75 - _elevationDiff; + }; + + //Update Heading Display: + if (_notGunnerView || (!GVAR(allowCompass))) then { + (_display displayCtrl 80156) ctrlSetText ""; + } else { + if (_useMils) then { + (_display displayCtrl 80156) ctrlSetText str (((round (_realAzimuth * 6400 / 360)) + 6400) % 6400); + } else { + (_display displayCtrl 80156) ctrlSetText str ((round (_realAzimuth + 360)) % 360); + }; + }; + + //Update CurrentElevation Display and "charge" text if (_notGunnerView) then { + (_display displayCtrl 80085) ctrlSetStructuredText parseText ""; (_display displayCtrl 80175) ctrlSetText ""; } else { - _elevDeg = parseNumber ctrlText (_display displayCtrl 175); + (_display displayCtrl 80085) ctrlSetStructuredText parseText _chargeText; + if (_useMils) then { - (_display displayCtrl 80175) ctrlSetText str round (_elevDeg * 6400 / 360); + (_display displayCtrl 80175) ctrlSetText str ((round (_realElevation * 6400 / 360)) % 6400); } else { - (_display displayCtrl 80175) ctrlSetText str _elevDeg; + (_display displayCtrl 80175) ctrlSetText str (((round (_realElevation * 100)) / 100) % 360); }; }; @@ -85,24 +115,13 @@ _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes") if (_elevDeg <= 0) then { //Bad data means "----" out of range (_display displayCtrl 80176) ctrlSetText (ctrlText (_display displayCtrl 176)); } else { + _elevDeg = _elevDeg + (_realElevation - (parseNumber ctrlText (_display displayCtrl 175))); if (_useMils) then { - (_display displayCtrl 80176) ctrlSetText str round (_elevDeg * 6400 / 360); + (_display displayCtrl 80176) ctrlSetText str round ((round (_elevDeg * 6400 / 360)) % 6400); } else { - (_display displayCtrl 80176) ctrlSetText str _elevDeg; + (_display displayCtrl 80176) ctrlSetText str (((round (_elevDeg * 100)) / 100) % 360); }; }; }; - - //Update Heading Display: - if (_notGunnerView || (!GVAR(allowCompass))) then { - (_display displayCtrl 80156) ctrlSetText ""; - } else { - _rotationDegrees = ((getDir _mortarVeh) + (((-180 / PI) * (_mortarVeh animationPhase "mainTurret")) + 360)) % 360; - if (_useMils) then { - (_display displayCtrl 80156) ctrlSetText str round (_rotationDegrees * 6400 / 360); - } else { - (_display displayCtrl 80156) ctrlSetText (ctrlText (_display displayCtrl 156)); - }; - }; }; -}, 0, [_newVehicle, _chargeText,_fireModes]] call CBA_fnc_addPerFrameHandler; +}, 0, [_newVehicle, _fireModes]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf index c81ff32132..23518f64f3 100644 --- a/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf +++ b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf @@ -3,18 +3,28 @@ * Called when the mk6's in game UI is loaded. Hides rangefinder data if it is disabled. * * Arguments: - * None + * 0: Display + * 1: Type * * Return Value: * None * * Example: - * [] call ace_mk6mortar_fnc_turretDisplayLoaded + * [rsc,"Mk6Mortar"] call ace_mk6mortar_fnc_turretDisplayLoaded * * Public: No */ #include "script_component.hpp" +disableSerialization; + +PARAMS_2(_display,_rscType); + +if (_rscType != "Mk6Mortar") exitWith {}; +if (isNull _display) exitWith {}; + +private ["_fnc_hideControl", "_xPos", "_yPos", "_wPos", "_hPos"]; + #define CTRL_CA_OPTICSPITCH (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSPITCH") #define CTRL_CA_OPTICSZOOM (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSZOOM") #define CTRL_CA_SOLUTION_TEXT (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_SOLUTION_TEXT") @@ -29,15 +39,8 @@ #define CTRL_CA_ELEV (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV") #define CTRL_CA_ELEV_NEED (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV_NEED") -private ["_display", "_fnc_hideControl"]; - -disableSerialization; - -_display = uiNamespace getVariable ["ACE_Mk6_RscWeaponRangeArtillery", displayNull]; -if (isNull _display) exitWith {}; - _fnc_hideControl = { - private "_idc"; + private ["_idc", "_pos"]; PARAMS_2(_path,_hideCtrl); _idc = getNumber (_path >> "IDC"); _pos = []; @@ -64,4 +67,3 @@ _fnc_hideControl = { [CTRL_CA_HEADING, true] call _fnc_hideControl; [CTRL_CA_ELEV, true] call _fnc_hideControl; [CTRL_CA_ELEV_NEED, true] call _fnc_hideControl; - diff --git a/addons/movement/ACE_Settings.hpp b/addons/movement/ACE_Settings.hpp index 8424f9cba9..fdc0bd36b0 100644 --- a/addons/movement/ACE_Settings.hpp +++ b/addons/movement/ACE_Settings.hpp @@ -5,4 +5,4 @@ class ACE_Settings { isClientSettable = 1; displayName = CSTRING(UseImperial); }; -}; \ No newline at end of file +}; diff --git a/addons/movement/CfgEventHandlers.hpp b/addons/movement/CfgEventHandlers.hpp index 0cd959a047..e75956f440 100644 --- a/addons/movement/CfgEventHandlers.hpp +++ b/addons/movement/CfgEventHandlers.hpp @@ -1,4 +1,3 @@ - class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/movement/CfgFatigue.hpp b/addons/movement/CfgFatigue.hpp index 288462ccb9..e7dfdf9ad8 100644 --- a/addons/movement/CfgFatigue.hpp +++ b/addons/movement/CfgFatigue.hpp @@ -1,4 +1,3 @@ - class CfgFatigue { MinValue1 = 0.2; MinValue2 = 0.8; diff --git a/addons/movement/CfgInventoryGlobalVariable.hpp b/addons/movement/CfgInventoryGlobalVariable.hpp index 1210f3df58..cf25595254 100644 --- a/addons/movement/CfgInventoryGlobalVariable.hpp +++ b/addons/movement/CfgInventoryGlobalVariable.hpp @@ -1,4 +1,3 @@ - class CfgInventoryGlobalVariable { maxSoldierLoad = 1200; }; diff --git a/addons/movement/CfgMoves.hpp b/addons/movement/CfgMoves.hpp index bd9519b013..50d3e3ab2b 100644 --- a/addons/movement/CfgMoves.hpp +++ b/addons/movement/CfgMoves.hpp @@ -1,4 +1,3 @@ - class CfgMovesBasic { class ManActions { ACE_Climb = "ACE_Climb"; diff --git a/addons/movement/CfgVehicles.hpp b/addons/movement/CfgVehicles.hpp new file mode 100644 index 0000000000..e620d38a24 --- /dev/null +++ b/addons/movement/CfgVehicles.hpp @@ -0,0 +1,6 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + maxGunElev = 80; // Allows looking further up (default: 60) + }; +}; diff --git a/addons/movement/config.cpp b/addons/movement/config.cpp index 496e4982ac..8ea42fbf0c 100644 --- a/addons/movement/config.cpp +++ b/addons/movement/config.cpp @@ -16,4 +16,5 @@ class CfgPatches { #include "CfgFatigue.hpp" //#include "CfgInventoryGlobalVariable.hpp" #include "CfgMoves.hpp" +#include "CfgVehicles.hpp" #include "ACE_Settings.hpp" diff --git a/addons/mx2a/stringtable.xml b/addons/mx2a/stringtable.xml index 88d6bef6b5..e8df673866 100644 --- a/addons/mx2a/stringtable.xml +++ b/addons/mx2a/stringtable.xml @@ -6,6 +6,7 @@ MX-2A MX-2A MX-2A + MX-2A MX-2A @@ -17,4 +18,4 @@ Dispositivo de imagem térmica - \ No newline at end of file + diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index 7b6bbda138..021a4e2a0b 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -35,7 +35,7 @@ if ((_iconType == ICON_NAME_SPEAK) || (_iconType == ICON_SPEAK)) then { _alpha = _alpha max 0.6;//Boost alpha when speaking } else { if (_iconType == ICON_NAME_RANK) then { - _icon = TEXTURES_RANKS select ((["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"] find (rank _target)) + 1); + _icon = format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa",(toLower(rank _target))]; _size = 1; }; }; diff --git a/addons/nametags/functions/fnc_moduleNameTags.sqf b/addons/nametags/functions/fnc_moduleNameTags.sqf index 7373d85de1..7a6d2fa3c8 100644 --- a/addons/nametags/functions/fnc_moduleNameTags.sqf +++ b/addons/nametags/functions/fnc_moduleNameTags.sqf @@ -21,13 +21,17 @@ if !(_activated) exitWith {}; GVAR(Module) = true; [_logic, QGVAR(playerNamesViewDistance), "playerNamesViewDistance" ] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(showNamesForAI), "showNamesForAI" ] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(showCursorTagForVehicles), "showCursorTagForVehicles" ] call EFUNC(common,readSettingFromModule); // Do Not Force - read module setting only non-default is set due to using SCALAR if ((_logic getVariable "showPlayerNames") != -1) then { [_logic, QGVAR(showPlayerNames), "showPlayerNames" ] call EFUNC(common,readSettingFromModule); }; +if ((_logic getVariable "showNamesForAI") != -1) then { + [_logic, QGVAR(showNamesForAI), "showNamesForAI" ] call EFUNC(common,readSettingFromModule); +}; +if ((_logic getVariable "showVehicleCrewInfo") != -1) then { + [_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule); +}; diag_log text "[ACE]: NameTags Module Initialized."; diff --git a/addons/nametags/script_component.hpp b/addons/nametags/script_component.hpp index da912b48c4..7bf0acbc4a 100644 --- a/addons/nametags/script_component.hpp +++ b/addons/nametags/script_component.hpp @@ -16,15 +16,3 @@ #define ICON_NAME_RANK 2 #define ICON_NAME_SPEAK 3 #define ICON_SPEAK 4 - -//todo?: custom rank icons?? -#define TEXTURES_RANKS [ \ - "", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\captain_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\major_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \ - ] \ No newline at end of file diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index 8571b4c537..e811b3447c 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -258,6 +258,7 @@ Wymuś pod kursorem Forzar mostrar solo en el cursor Vynuceno zobrazit pouze na kurzor + Erzwinge nur mit Mauszeiger anzuzeigen Forçar mostrar somente no cursor @@ -265,6 +266,7 @@ Wymuś po wciśnięciu klawisza Forzar mostrar solo al pulsar tecla Vynuceno zobrazit pouze na klávesu + Erzwinge nur mit Tastendruck anzuzeigen Forçar somente mostrar em tecla ativada @@ -272,6 +274,7 @@ Wymuś pod kursorem i po wciśnięciu klawisza Forzar mostrar en el cursor y al pulsar tecla Vynuceno zobrazit pouze na kurzor a klávesu + Erzwinge nur mit Mauszeiger und Tastendruck anzuzeigen Forçar mostrar somente em cursor e tecla ativada @@ -295,6 +298,7 @@ Opcja ta pozwala dostosować sposób wyświetlania imion nad głowami graczy. Opcja "Tylko po wciśnięciu klawisza" wyświetla imiona tylko przytrzymania klawisza "Modyfikator" dostępnego w menu ustawień addonów -> ACE3. Mostrar nombres de los jugadores y establecer su activación. Predeterminado: Habilitado Zobrazit jména hráčů a nastavit jejich aktivaci. Výchozí: Povoleno + Erlaubt das Anzeigen von Spielernamen und stellt ein, ob sie standardmäßig aktiviert oder deaktiviert sind. Standard: aktiviert Mostrar os nomes dos jogadores e definir sua ativação. Padrão: Ativado @@ -302,6 +306,7 @@ Opcja ta pozwala dostosować sposób wyświetlania efektu fal dźwiękowych nad głowami mówiących graczy, wyświetlanych po przytrzymaniu klawisza PTT. Opcja ta współpracuje z TFAR oraz ACRE2. Efecto de ondas sonoras encima de las cabezas de los jugadores que hablan después de mantener la tecla PTT. Esta opción funciona con TFAR y ACRE2. Efekt zvukových vln nad hlavami hráčů když mluví skrz PTT klávesu. Tato volba funguje s TFAR a ACRE2. + Es wird ein Schallwellensymbol über den Köpfen von sprechenden Spielern angezeigt, die ihre Push-to-Talk-Taste drücken. Diese Option funktioniert mit TFAR und ACRE2. Efeito de ondas sonoras acima das cabeças dos jogadores que falam depois mantendo pressionada a tecla PTT. Esta opção funciona com TFAR e ACRE2. @@ -309,6 +314,7 @@ Rozmiar imion Tamaño de las Etiquetas de nombre Velikost jmenovky + Namensschildgröße Tamanho das etiquetas de nome @@ -316,7 +322,8 @@ Skalowanie tekstu oraz ikon Escala del texto y el icono Velikost textu a ikon + Text- und Symbolgrößen Escala de tamanho dos ícones e textos - \ No newline at end of file + diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp index d80547f2b6..513692eaab 100644 --- a/addons/optionsmenu/gui/pauseMenu.hpp +++ b/addons/optionsmenu/gui/pauseMenu.hpp @@ -95,6 +95,11 @@ class RscDisplayInterruptEditor3D: RscStandardDisplay { class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {}; }; }; +class RscDisplayMovieInterrupt: RscStandardDisplay { + class controls { + class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {}; + }; +}; class RscDisplayMain: RscStandardDisplay { //Hide the button if there is no world (-world=empty) //Seems odd to use onMouseMoving, but I don't want to overload onLoad diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index d1b6199413..717fde4732 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -334,6 +334,7 @@ Debuguj do schowka Depurar al portapapeles Debug do schránky + Debug in die Zwischenablage Depuração para área de transferência @@ -341,11 +342,13 @@ Wysyła informacje o debugowaniu do RPT oraz schowka. Envía información de depuración al RPT y el portapapeles. Pošle debug informace do RPT a schránky. + Protokolliert Debug-Informationen im RPT und speichert sie in der Zwischenablage. Envia informação de depuração para RPT e área de transferência. ACE News Noticias ACE + ACE-Neuigkeiten Notícias do ACE Wiadomości ACE ACE Novinky @@ -353,9 +356,10 @@ Show News on Main Menu Mostrar noticias en el menú principal + Zeige Neuigkeiten im Hauptmenü Mostrar notícias no menu principal Pokazuj wiadomości ACE w menu głównym Zobrazit novinky v hlavním menu - \ No newline at end of file + diff --git a/addons/parachute/CfgEventHandlers.hpp b/addons/parachute/CfgEventHandlers.hpp index 8c7edda20f..7a1f8119ca 100644 --- a/addons/parachute/CfgEventHandlers.hpp +++ b/addons/parachute/CfgEventHandlers.hpp @@ -8,3 +8,10 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; +class Extended_Respawn_EventHandlers { + class CAManBase { + class ADDON { + respawn = QUOTE(call COMPILE_FILE(XEH_respawn)); + }; + }; +}; \ No newline at end of file diff --git a/addons/parachute/CfgVehicles.hpp b/addons/parachute/CfgVehicles.hpp index bc5ecbd60f..0999ba5c38 100644 --- a/addons/parachute/CfgVehicles.hpp +++ b/addons/parachute/CfgVehicles.hpp @@ -2,19 +2,36 @@ class CfgVehicles { class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { - class _xx_ACE_Altimeter { - name = "ACE_Altimeter"; - count = 6; - }; + MACRO_ADDITEM(ACE_Altimeter,6); }; class TransportBackpacks { - class _xx_ACE_NonSteerableParachute { - backpack = "ACE_NonSteerableParachute"; - count = 4; - }; + MACRO_ADDBACKPACK(ACE_NonSteerableParachute,4); + MACRO_ADDBACKPACK(ACE_ReserveParachute,4); }; }; + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_CutParachute { + displayName = CSTRING(CutParachute); + exceptions[] = {"isNotInside"}; + condition = QUOTE([_player] call FUNC(checkCutParachute)); + statement = QUOTE([_player] call FUNC(cutParachute)); + showDisabled = 0; + priority = 2.9; + icon = QUOTE(PATHTOF(UI\cut_ca.paa)); + hotkey = "C"; // Did this realy Work? + }; + }; + }; + + class Helicopter; + class ParachuteBase: Helicopter { + ace_hasReserveParachute = 1; + ace_reserveParachute = "ACE_ReserveParachute"; + }; + class B_Parachute; class ACE_NonSteerableParachute: B_Parachute { author = ECSTRING(common,ACETeam); @@ -28,6 +45,16 @@ class CfgVehicles { mass = 100; }; + class ACE_ReserveParachute: ACE_NonSteerableParachute { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(ReserveParachute); + scope = 2; + mass = 70; + ParachuteClass = "NonSteerable_Parachute_F"; + ace_reserveParachute = ""; + ace_hasReserveParachute = 0; + }; + class B_Soldier_05_f; class B_Pilot_F: B_Soldier_05_f {backpack = "ACE_NonSteerableParachute";}; class I_Soldier_04_F; class I_pilot_F: I_Soldier_04_F {backpack = "ACE_NonSteerableParachute";}; class O_helipilot_F; class O_Pilot_F: O_helipilot_F {backpack = "ACE_NonSteerableParachute";}; diff --git a/addons/parachute/UI/cut_ca.paa b/addons/parachute/UI/cut_ca.paa new file mode 100644 index 0000000000..2f5948535b Binary files /dev/null and b/addons/parachute/UI/cut_ca.paa differ diff --git a/addons/parachute/XEH_postInit.sqf b/addons/parachute/XEH_postInit.sqf index a8f83b43a3..86626882e0 100644 --- a/addons/parachute/XEH_postInit.sqf +++ b/addons/parachute/XEH_postInit.sqf @@ -23,7 +23,7 @@ if (!hasInterface) exitWith {}; if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if (!('ACE_Altimeter' in assignedItems ace_player)) exitWith {false}; if (!(missionNamespace getVariable [QGVAR(AltimeterActive), false])) then { - [ace_player] call FUNC(showAltimeter); + [ACE_player] call FUNC(showAltimeter); } else { call FUNC(hideAltimeter); }; @@ -42,3 +42,5 @@ GVAR(PFH) = false; // don't show speed and height when in expert mode ["infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call EFUNC(common,addEventHandler); +//[ACE_Player,([ACE_player] call EFUNC(common,getAllGear))] call FUNC(storeParachute); +["playerInventoryChanged", FUNC(storeParachute) ] call EFUNC(common,addEventHandler); diff --git a/addons/parachute/XEH_preInit.sqf b/addons/parachute/XEH_preInit.sqf index f446d955b8..7bc0823215 100644 --- a/addons/parachute/XEH_preInit.sqf +++ b/addons/parachute/XEH_preInit.sqf @@ -22,5 +22,7 @@ PREP(handleInfoDisplayChanged); PREP(hideAltimeter); PREP(onEachFrame); PREP(showAltimeter); - +PREP(cutParachute); +PREP(checkCutParachute); +PREP(storeParachute); ADDON = true; diff --git a/addons/parachute/XEH_respawn.sqf b/addons/parachute/XEH_respawn.sqf new file mode 100644 index 0000000000..31e3ff2ae2 --- /dev/null +++ b/addons/parachute/XEH_respawn.sqf @@ -0,0 +1,17 @@ +/* + * Author: joko // Jonas + * Reset the parachute system. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * None + * + * Public: No + */ +#include "script_component.hpp" +ACE_player setVariable [QGVAR(chuteIsCut), false]; \ No newline at end of file diff --git a/addons/parachute/functions/fnc_checkCutParachute.sqf b/addons/parachute/functions/fnc_checkCutParachute.sqf new file mode 100644 index 0000000000..8301007fa3 --- /dev/null +++ b/addons/parachute/functions/fnc_checkCutParachute.sqf @@ -0,0 +1,19 @@ +/* + * Author: joko // Jonas + * Reset the parachute system. + * + * Arguments: + * 0: Object + * + * Return Value: + * Boolean + * + * Example: + * [player] call FUNC(checkCutParachute); + * + * Public: No + */ +#include "script_component.hpp" +private["_unit"]; +_unit = _this select 0; +(vehicle _unit isKindOf 'ParachuteBase' && !(_unit getvariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) \ No newline at end of file diff --git a/addons/parachute/functions/fnc_cutParachute.sqf b/addons/parachute/functions/fnc_cutParachute.sqf new file mode 100644 index 0000000000..e8300012c3 --- /dev/null +++ b/addons/parachute/functions/fnc_cutParachute.sqf @@ -0,0 +1,22 @@ +/* + * Author: joko // Jonas + * Cut Parachute and delete Old + * + * Arguments: + * 0: Object + * + * Return Value: + * Nothing + * + * Example: + * [player] call FUNC(cutParachute); + * + * Public: No + */ +#include "script_component.hpp" +private["_unit","_vehicle"]; +_unit = _this select 0; +_vehicle = vehicle _unit; +_unit action ["GetOut", _vehicle]; +deleteVehicle _vehicle; +_unit setVariable [QGVAR(chuteIsCut), true]; \ No newline at end of file diff --git a/addons/parachute/functions/fnc_doLanding.sqf b/addons/parachute/functions/fnc_doLanding.sqf index a620c5a4ca..3582dc797f 100644 --- a/addons/parachute/functions/fnc_doLanding.sqf +++ b/addons/parachute/functions/fnc_doLanding.sqf @@ -14,10 +14,11 @@ * Public: No */ #include "script_component.hpp" -private ["_unit"]; +private["_unit"]; _unit = _this select 0; GVAR(PFH) = false; [_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation); +_unit setVariable [QGVAR(chuteIsCut), false]; [{ if (ACE_time >= ((_this select 0) select 0) + 1) then { ((_this select 0) select 1) playActionNow "Crouch"; diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf new file mode 100644 index 0000000000..45889b05b6 --- /dev/null +++ b/addons/parachute/functions/fnc_storeParachute.sqf @@ -0,0 +1,30 @@ +/* + * Author: joko // Jonas + * Add the Reserve Parachute to Units or Save Backpack if is a Parachute in Unit + * + * Arguments: + * None + * + * Return Value: + * 0: Unit + * 1: getAllGear-Array + * + * Example: + * None + * + * Public: No + */ + #include "script_component.hpp" + private ["_unit","_backpack"]; + _unit = _this select 0; + _backpack = (_this select 1) select 6 ; + if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) then { + _unit addBackpack (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]); + } else { + if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then { + _unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute")]; + }; + if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && !(animationState _unit == 'para_pilot')) then { + _unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))]; + }; + }; \ No newline at end of file diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index d3cdbd9a7d..b9ccad48a4 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -49,5 +49,13 @@ Paracadute non manovrabile Para-querdas não controlável + + Cut Parachute + Fallschirm abschneiden + + + Reserve Parachute + Reserve Fallschirm + diff --git a/addons/rangecard/CfgVehicles.hpp b/addons/rangecard/CfgVehicles.hpp index a5832756ff..9e0793e36b 100644 --- a/addons/rangecard/CfgVehicles.hpp +++ b/addons/rangecard/CfgVehicles.hpp @@ -53,10 +53,7 @@ class CfgVehicles { displayName = "Range Card"; vehicleClass = "Items"; class TransportItems { - class ACE_RangeCard { - name = "ACE_RangeCard"; - count = 1; - }; + MACRO_ADDITEM(ACE_RangeCard,1); }; }; diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index b5ec9683f4..04317d46d7 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -149,7 +149,7 @@ if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) t _barometricPressure = 1013.25; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _barometricPressure = 1013.25 * (1 - (0.0065 * EGVAR(weather,altitude)) / 288.15) ^ 5.255754495; + _barometricPressure = 1013.25 * (1 - (0.0065 * EGVAR(common,mapAltitude)) / 288.15) ^ 5.255754495; }; _relativeHumidity = 0.5; diff --git a/addons/rangecard/stringtable.xml b/addons/rangecard/stringtable.xml index cf013f2ae3..bda93bcab3 100644 --- a/addons/rangecard/stringtable.xml +++ b/addons/rangecard/stringtable.xml @@ -6,6 +6,7 @@ Tabela balistyczna Tarjeta de distancias Vzdálenostní tabulka + Entfernungsspinne Tabela de distâncias @@ -13,6 +14,7 @@ Co 50 metrów - MRAD/MRAD (siatka/pokrętło) Incrementos de 50 METROS -- MRAD/MRAD (retícula/torretas) Přidat 50 METRŮ -- MRAD/MRAD (síťka/věže) + 50-Meter-Schritte MRAD/MRAD (Fadenkreuz/Geschützturm) Incrementos de 50 METROS - MRAD/MRAD (retícula/torres) @@ -20,6 +22,7 @@ Otwórz tabelę balistyczną Abrir tarjeta de distancias Otevřít vzdálenostní tabulku + Öffne Entfernungsspinne Abrir tabela de distâncias @@ -27,6 +30,7 @@ Otwórz kopię tabeli balistycznej Abrir copia de tarjeta de distancias Otevřít kopii vzdálenostní tabulky + Öffne Kopie der Entfernungsspinne Abrir cópia da tabela de distâncias @@ -34,6 +38,7 @@ Otwórz tabelę balistyczną Abrir tarjeta de distancias Otevřít vzdálenostní tabulku + Öffne Entfernungsspinne Abrir tabela de distäncias @@ -41,6 +46,7 @@ Otwórz kopię tabeli balistycznej Abrir copia de tarjeta de distancias Otevřít kopii vzdálenostní tabulky + Öffne Kopie der Entfernungsspinne Abrir cópia da tabela de distâncias @@ -48,7 +54,8 @@ Skopiuj tabelę balistyczną Copiar tarjeta de distancias Kopírovat vzdálenostní tabulku + Kopiere Entfernungsspinne Copiar tabela de distäncias - \ No newline at end of file + diff --git a/addons/reloadlaunchers/functions/fnc_load.sqf b/addons/reloadlaunchers/functions/fnc_load.sqf index 745bb2a5cb..ce7b743df5 100644 --- a/addons/reloadlaunchers/functions/fnc_load.sqf +++ b/addons/reloadlaunchers/functions/fnc_load.sqf @@ -38,7 +38,7 @@ _onSuccess = { }; _onFailure = { - [localize LESTRING(common,ActionAborted)] call DEFUNC(common,displayTextStructured); + [localize ELSTRING(common,ActionAborted)] call DEFUNC(common,displayTextStructured); }; _condition = { diff --git a/addons/safemode/XEH_postInit.sqf b/addons/safemode/XEH_postInit.sqf index 7ab283f6b6..c7132dd76c 100644 --- a/addons/safemode/XEH_postInit.sqf +++ b/addons/safemode/XEH_postInit.sqf @@ -14,7 +14,7 @@ if (!hasInterface) exitWith {}; // Conditions: canInteract if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; + if !([ACE_player] call EFUNC(common,canUseWeapon) && {currentWeapon ACE_player != binocular ACE_player}) exitWith {false}; // Statement [ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety); diff --git a/addons/sandbag/CfgVehicles.hpp b/addons/sandbag/CfgVehicles.hpp index b16d2f978d..76a986bfbd 100644 --- a/addons/sandbag/CfgVehicles.hpp +++ b/addons/sandbag/CfgVehicles.hpp @@ -22,10 +22,7 @@ class CfgVehicles { displayName = CSTRING(sandbagEmpty_displayName); vehicleClass = "Items"; class TransportItems { - class ACE_Sandbag_empty { - name = "ACE_Sandbag_empty"; - count = 1; - }; + MACRO_ADDITEM(ACE_Sandbag_empty,1); }; }; /* @@ -103,7 +100,7 @@ class CfgVehicles { scope = 1; model = PATHTOF(data\ace_sandbag_nogeo.p3d); }; - + class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { diff --git a/addons/sandbag/stringtable.xml b/addons/sandbag/stringtable.xml index 70dde0da56..5576add969 100644 --- a/addons/sandbag/stringtable.xml +++ b/addons/sandbag/stringtable.xml @@ -6,7 +6,7 @@ Sandsack Мешок с песком Worek z piaskiem - Sandbag + Saco de arena Sac de sable Pytel s pískem Sacco di Sabbia @@ -18,7 +18,7 @@ Sandsack (leer) Мешок с песком (пустой) Worek na piasek - Sandbag (empty) + Saco de arena (vacio) Sac de sable (vide) Pytel na písek (prázdný) Sacco di Sabbia (Vuoto) @@ -30,7 +30,7 @@ Nicht möglich Установка на этом месте невозможна Nie można tu budować - Cannot build here + No se puede construir aqui Impossible de construire ici Zde nelze postavit Impossibile costruire qui @@ -42,7 +42,7 @@ Sandsack abbauen Взять мешок с песком Zabierz worek - Pick up sandbag + Coger saco de arena Prendre sac de sable Zvednout pytel Prendi Sacco di Sabbia @@ -54,7 +54,7 @@ Sandsack tragen Нести мешок с песком Przenieś worek - Carry sandbag + Portar saco de arena Porter sac de sable Nést pytel Trasporta Sacco di Sabbia @@ -66,7 +66,7 @@ Tragen beenden Завершить переноску Zostaw worek - End carrying + Dejar de portar Arreter de porter Položit Fine Trasporto @@ -78,7 +78,7 @@ Sandsack ablegen Положить мешок Upuść worek - Drop sandbag + Soltar saco de arena Lacher sac de sable Odložit pytel Lascia Sacco di Sabbia @@ -90,7 +90,7 @@ Aufbauen Подтвердить установку Potwierdź rozłożenie - Confirm Deployment + Confirmar despliegue Confirmer Déploiement Potvrdit Položení Conferma Posizionamento @@ -102,7 +102,7 @@ Abbrechen Отменить установку Anuluj rozłożenie - Cancel Deployment + Cancelar despliegue Annuler Déploiement Zrušit Položení Cancella Posizionamento @@ -114,7 +114,7 @@ Sandsack aufbauen Установить мешок с песком Rozłóż worek z piaskiem - Deploy sandbag + Desplegar saco de arena Deployer sac de sable Umístit pytel Posiziona Sacco di Sabbia @@ -126,7 +126,7 @@ Sandsack Kiste Ящик мешков с песком Skrzynia worków na piasek - Sandbag box + Caja de sacos de arena Caisse de sacs de sable Bedna na pytle s pískem Contenitore Sacchi di Sabbia @@ -138,7 +138,7 @@ Hier gibt es keinen Sand Здесь нет песка Tu nie ma piasku - Here is no sand + Aqui no hay arena Pas de sable ici Tady není písek Qui non cè Sabbia diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index c915750d02..5fbcdab06e 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -63,7 +63,7 @@ class CfgVehicles { GVAR(sitRotation) = 10; }; // Camping Chair - class Land_CampingChair_V2_F: ThingX { + class Land_CampingChair_V2_F: ThingX { XEH_ENABLED; MACRO_SEAT_ACTION GVAR(canSit) = 1; @@ -71,44 +71,8 @@ class CfgVehicles { GVAR(sitPosition[]) = {0, -0.1, -0.45}; GVAR(sitRotation) = 45; }; - // Chair (Plastic) - class Land_ChairPlastic_F: ThingX { - XEH_ENABLED; - MACRO_SEAT_ACTION - GVAR(canSit) = 1; - GVAR(sitDirection) = 90; - GVAR(sitPosition[]) = {0, 0, -0.5}; - GVAR(sitRotation) = 5; - }; - // Chair (Wooden) - class Land_ChairWood_F: ThingX { - XEH_ENABLED; - MACRO_SEAT_ACTION - GVAR(canSit) = 1; - GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, -0.05, 0}; - GVAR(sitRotation) = 75; - }; - // Office Chair - class Land_OfficeChair_01_F: ThingX { - XEH_ENABLED; - MACRO_SEAT_ACTION - GVAR(canSit) = 1; - GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, 0, -0.6}; - GVAR(sitRotation) = 15; - }; - // Rattan Chair - class Land_RattanChair_01_F: ThingX { - XEH_ENABLED; - MACRO_SEAT_ACTION - GVAR(canSit) = 1; - GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) - GVAR(sitRotation) = 2; - }; // Field Toilet - class Land_FieldToilet_F: ThingX { + class Land_FieldToilet_F: ThingX { XEH_ENABLED; MACRO_SEAT_ACTION GVAR(canSit) = 1; @@ -117,7 +81,7 @@ class CfgVehicles { GVAR(sitRotation) = 10; }; // Toiletbox - class Land_ToiletBox_F: ThingX { + class Land_ToiletBox_F: ThingX { XEH_ENABLED; MACRO_SEAT_ACTION GVAR(canSit) = 1; @@ -125,4 +89,42 @@ class CfgVehicles { GVAR(sitPosition[]) = {0, 0.75, -1.1}; GVAR(sitRotation) = 10; }; + + class Furniture_base_F; + // Chair (Plastic) + class Land_ChairPlastic_F: Furniture_base_F { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 90; + GVAR(sitPosition[]) = {0, 0, -0.5}; + GVAR(sitRotation) = 5; + }; + // Chair (Wooden) + class Land_ChairWood_F: Furniture_base_F { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, -0.05, 0}; + GVAR(sitRotation) = 75; + }; + // Office Chair + class Land_OfficeChair_01_F: Furniture_base_F { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, 0, -0.6}; + GVAR(sitRotation) = 15; + }; + // Rattan Chair + class Land_RattanChair_01_F: Furniture_base_F { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) + GVAR(sitRotation) = 2; + }; }; diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf index e2bf1b23c1..1e477cd952 100644 --- a/addons/sitting/XEH_clientInit.sqf +++ b/addons/sitting/XEH_clientInit.sqf @@ -9,4 +9,3 @@ if !(hasInterface) exitWith {}; // Handle interruptions ["medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); ["SetHandcuffed", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); -["SetSurrendered", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); diff --git a/addons/sitting/XEH_preInit.sqf b/addons/sitting/XEH_preInit.sqf index 86912ada6b..1649aaba2b 100644 --- a/addons/sitting/XEH_preInit.sqf +++ b/addons/sitting/XEH_preInit.sqf @@ -6,6 +6,7 @@ PREP(canSit); PREP(canStand); PREP(getRandomAnimation); PREP(handleInterrupt); +PREP(hasChairMoved); PREP(moduleInit); PREP(sit); PREP(stand); diff --git a/addons/sitting/functions/fnc_canSit.sqf b/addons/sitting/functions/fnc_canSit.sqf index c9762e265c..c34281e496 100644 --- a/addons/sitting/functions/fnc_canSit.sqf +++ b/addons/sitting/functions/fnc_canSit.sqf @@ -14,9 +14,13 @@ * * Public: No */ +//#define DEBUG_MODE_FULL #include "script_component.hpp" PARAMS_2(_seat,_player); -// Sitting enabled, is seat object and not occupied -(GVAR(enable) && {getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} && {isNil{_seat getVariable QGVAR(seatOccupied)}}) +// Sitting enabled, is seat object, not occupied and standing up (or not on a big slope) +GVAR(enable) && +{getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} && +{isNil{_seat getVariable QGVAR(seatOccupied)}} && +{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}} diff --git a/addons/sitting/functions/fnc_handleInterrupt.sqf b/addons/sitting/functions/fnc_handleInterrupt.sqf index 8127e924ef..fb32635195 100644 --- a/addons/sitting/functions/fnc_handleInterrupt.sqf +++ b/addons/sitting/functions/fnc_handleInterrupt.sqf @@ -9,7 +9,7 @@ * None * * Example: - * [player] call ace_sitting_fnc_handleInterrupt; + * player call ace_sitting_fnc_handleInterrupt; * * Public: No */ @@ -18,5 +18,5 @@ PARAMS_1(_player); if (_player getVariable [QGVAR(isSitting), false]) then { - [_player] call FUNC(stand); + _player call FUNC(stand); }; diff --git a/addons/sitting/functions/fnc_hasChairMoved.sqf b/addons/sitting/functions/fnc_hasChairMoved.sqf new file mode 100644 index 0000000000..fe56438878 --- /dev/null +++ b/addons/sitting/functions/fnc_hasChairMoved.sqf @@ -0,0 +1,27 @@ +/* + * Author: Jonpas + * Checks if chair moved from original position. + * + * Arguments: + * 0: Seat + * 1: Seat Position + * + * Return Value: + * None + * + * Example: + * [seat, seatPos] call ace_sitting_fnc_hasChairMoved; + * + * Public: No + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +PARAMS_2(_seat,_seatPosOrig); + +TRACE_2("Chair position",_seatPosOrig,getPosASL _seat); + +// Check each coordinate due to possibility of tiny movements in simulation +(getPosASL _seat) select 0 < (_seatPosOrig select 0) - 0.01 || {(getPosASL _seat) select 0 > (_seatPosOrig select 0) + 0.01} || +{(getPosASL _seat) select 1 < (_seatPosOrig select 1) - 0.01 || {(getPosASL _seat) select 1 > (_seatPosOrig select 1) + 0.01}} || +{(getPosASL _seat) select 2 < (_seatPosOrig select 2) - 0.01 || {(getPosASL _seat) select 2 > (_seatPosOrig select 2) + 0.01}} diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index 1944cb2190..6959bd4778 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -14,6 +14,7 @@ * * Public: No */ +//#define DEBUG_MODE_FULL #include "script_component.hpp" private ["_configFile", "_sitDirection", "_sitPosition", "_sitRotation", "_sitDirectionVisual"]; @@ -37,7 +38,8 @@ _sitRotation = if (isNumber (_configFile >> QGVAR(sitRotation))) then {getNumber // Set direction and position _player setDir _sitDirection; -_player setPosASL (_seat modelToWorld _sitPosition) call EFUNC(common,positionToASL); +// No need for ATL/ASL as modelToWorld returns in format position +_player setPos (_seat modelToWorld _sitPosition); // Set variables _player setVariable [QGVAR(isSitting), true]; @@ -45,12 +47,20 @@ _seat setVariable [QGVAR(seatOccupied), true, true]; // To prevent multiple peop // Add rotation control PFH _sitDirectionVisual = getDirVisual _player; // Needed for precision and issues with using above directly +_seatPosOrig = getPosASL _seat; [{ - EXPLODE_3_PVT(_this select 0,_player,_sitDirectionVisual,_sitRotation); + EXPLODE_5_PVT(_this select 0,_player,_sitDirectionVisual,_sitRotation,_seat,_seatPosOrig); // Remove PFH if not sitting any more if !(_player getVariable [QGVAR(isSitting), false]) exitWith { [_this select 1] call cba_fnc_removePerFrameHandler; + TRACE_1("Remove PFH",_player getVariable [ARR_2(QGVAR(isSitting),false)]); + }; + + // Stand up if chair moves + if ([_seat, _seatPosOrig] call FUNC(hasChairMoved)) exitWith { + _player call FUNC(stand); + TRACE_2("Chair moved",getPosASL _seat,_seatPosOrig); }; // Set direction to boundary when passing it @@ -60,4 +70,4 @@ _sitDirectionVisual = getDirVisual _player; // Needed for precision and issues w if (getDir _player < _sitDirectionVisual - _sitRotation) exitWith { _player setDir (_sitDirectionVisual - _sitRotation); }; -}, 0, [_player, _sitDirectionVisual, _sitRotation]] call cba_fnc_addPerFrameHandler; +}, 0, [_player, _sitDirectionVisual, _sitRotation, _seat, _seatPosOrig]] call cba_fnc_addPerFrameHandler; diff --git a/addons/sitting/stringtable.xml b/addons/sitting/stringtable.xml index cbf63d2117..443c34c360 100644 --- a/addons/sitting/stringtable.xml +++ b/addons/sitting/stringtable.xml @@ -6,30 +6,35 @@ Usiądź Sentar Sednout si + Sentarse Stand Up Wstań Levantar Vstát + Levantarse Enable Sitting Habilitar opção para sentar Aktywuj siadanie Povolit sezení + Acivar asiento Sitting Sentado Siadanie Sedící + Sentarse This module allows you to disable the ability to sit on chairs and toilets. Este módulo permite que você desabilite a capacidade de sentar-se em cadeiras e banheiros. Moduł ten pozwala na włączenie lub wyłączenie możliwości siadania na krzesłach i toaletach. Tento modul dovoluje zakázat možnost sedět na židlých a toaletách. + Este módulo te permite desactivar la capacidad de sentarte en sillas y aseos. \ No newline at end of file diff --git a/addons/slideshow/$PBOPREFIX$ b/addons/slideshow/$PBOPREFIX$ new file mode 100644 index 0000000000..78ced9578e --- /dev/null +++ b/addons/slideshow/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\slideshow \ No newline at end of file diff --git a/addons/slideshow/CfgEventHandlers.hpp b/addons/slideshow/CfgEventHandlers.hpp new file mode 100644 index 0000000000..b928bc2de6 --- /dev/null +++ b/addons/slideshow/CfgEventHandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; diff --git a/addons/slideshow/CfgVehicles.hpp b/addons/slideshow/CfgVehicles.hpp new file mode 100644 index 0000000000..7bb3b81713 --- /dev/null +++ b/addons/slideshow/CfgVehicles.hpp @@ -0,0 +1,49 @@ +class CfgVehicles { + class ACE_Module; + class GVAR(module): ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACE_missionModules"; + displayName = CSTRING(DisplayName); + function = QFUNC(moduleInit); + scope = 2; + isGlobal = 0; // Server only + isTriggerActivated = 0; + isDisposable = 0; + icon = QUOTE(PATHTOF(UI\Icon_Module_Slideshow_ca.paa)); + class Arguments { + class Objects { + displayName = CSTRING(Objects_DisplayName); + description = CSTRING(Objects_Description); + typeName = "STRING"; + defaultValue = ""; + }; + class Controllers { + displayName = CSTRING(Controllers_DisplayName); + description = CSTRING(Controllers_Description); + typeName = "STRING"; + defaultValue = ""; + }; + class Images { + displayName = CSTRING(Images_DisplayName); + description = CSTRING(Images_Description); + typeName = "STRING"; + defaultValue = ""; + }; + class Names { + displayName = CSTRING(Names_DisplayName); + description = CSTRING(Names_Description); + typeName = "STRING"; + defaultValue = ""; + }; + class Duration { + displayName = CSTRING(Duration_DisplayName); + description = CSTRING(Duration_Description); + typeName = "NUMBER"; + defaultValue = 0; + }; + }; + class ModuleDescription { + description = CSTRING(Description); + }; + }; +}; diff --git a/addons/slideshow/README.md b/addons/slideshow/README.md new file mode 100644 index 0000000000..58b22c1e17 --- /dev/null +++ b/addons/slideshow/README.md @@ -0,0 +1,10 @@ +ace_slideshow +=============== + +Adds ability to have slide-shows on them and control them with a controller (another object). + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Jonpas] (https://github.com/jonpas) diff --git a/addons/slideshow/UI/Icon_Module_Slideshow_ca.paa b/addons/slideshow/UI/Icon_Module_Slideshow_ca.paa new file mode 100644 index 0000000000..882a279579 Binary files /dev/null and b/addons/slideshow/UI/Icon_Module_Slideshow_ca.paa differ diff --git a/addons/slideshow/XEH_preInit.sqf b/addons/slideshow/XEH_preInit.sqf new file mode 100644 index 0000000000..0f9e270896 --- /dev/null +++ b/addons/slideshow/XEH_preInit.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(addSlideActions); +PREP(autoTransition); +PREP(createSlideshow); +PREP(makeList); +PREP(moduleInit); + +GVAR(slideshows) = 0; + +ADDON = true; diff --git a/addons/slideshow/config.cpp b/addons/slideshow/config.cpp new file mode 100644 index 0000000000..3af3bd5354 --- /dev/null +++ b/addons/slideshow/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[]= {"Jonpas", "DaC"}; + authorUrl = "https://github.com/jonpas"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/slideshow/functions/fnc_addSlideActions.sqf b/addons/slideshow/functions/fnc_addSlideActions.sqf new file mode 100644 index 0000000000..80e9b387af --- /dev/null +++ b/addons/slideshow/functions/fnc_addSlideActions.sqf @@ -0,0 +1,51 @@ +/* + * Author: Jonpas + * Adds controller slide actions. + * + * Arguments: + * 0: Objects + * 1: Images + * 2: Names + * 3: Controller + * 4: Current Slideshow + * + * Return Value: + * None + * + * Example: + * [[object], ["image"], ["name"], controller, 1] call ace_slideshow_fnc_addSlideActions + * + * Public: No + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +PARAMS_5(_objects,_images,_names,_controller,_currentSlideshow); + +private ["_actions"]; +_actions = []; +{ + _actions pushBack + [ + [ + format [QGVAR(slideshow%1_slide%2), _currentSlideshow, _forEachIndex + 1], + _names select _forEachIndex, + "", + { + EXPLODE_2_PVT(_this select 2,_objects,_image); + { + _x setObjectTextureGlobal [0, _image] + } forEach _objects; + }, + {true}, + {}, + [_objects, _x] + ] call EFUNC(interact_menu,createAction), + [], + _controller + ]; +} forEach _images; + +TRACE_1("Children actions",_actions); + +_actions diff --git a/addons/slideshow/functions/fnc_autoTransition.sqf b/addons/slideshow/functions/fnc_autoTransition.sqf new file mode 100644 index 0000000000..639a0fb70b --- /dev/null +++ b/addons/slideshow/functions/fnc_autoTransition.sqf @@ -0,0 +1,45 @@ +/* + * Author: Jonpas + * Handles automatic slide transitions using waitAndExecute in a PFH-like manner resulting in no performance loss. + * + * Arguments: + * 0: Objects + * 1: Controller Objects + * 2: Image Paths + * 3: Action Names + * 4: Duration (0 disables automatic transitions) + * + * Return Value: + * Parsed List + * + * Example: + * [objects, controllers, images, actionNames, duration] call ace_slideshow_fnc_autoTransition + * + * Public: No + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +PARAMS_4(_objects,_images,_varString,_duration); + +private ["_currentSlide"]; + +// Get current slide number of this slideshow +_currentSlide = missionNamespace getVariable [_varString, 0]; + +// Increment slide or return to first slide if reached end +_currentSlide = (_currentSlide + 1) mod (count _images); + +// Save slide back into global variable (PFH's local variables do not persist through PFH run) +missionNamespace setVariable [_varString, _currentSlide]; + +// Set slide +{ + _x setObjectTextureGlobal [0, _images select _currentSlide]; +} forEach _objects; + +TRACE_4("Auto-transition",_images select _currentSlide,_currentSlide,count _images,_duration); + + +// Next slide +[FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call EFUNC(common,waitAndExecute); diff --git a/addons/slideshow/functions/fnc_createSlideshow.sqf b/addons/slideshow/functions/fnc_createSlideshow.sqf new file mode 100644 index 0000000000..debeac3340 --- /dev/null +++ b/addons/slideshow/functions/fnc_createSlideshow.sqf @@ -0,0 +1,80 @@ +/* + * Author: Jonpas, DaC + * Prepares necessary variables and default image. + * + * Arguments: + * 0: Objects + * 1: Controller Objects + * 2: Image Paths + * 3: Action Names + * 4: Slide Duration (0 disables automatic transitions) + * + * Return Value: + * Parsed List + * + * Example: + * [[object1, object2, object3], [controller1], ["images\image1.paa", "images\image2.paa"], ["Action1", "Action2"], 5] call ace_slideshow_fnc_createSlideshow + * + * Public: Yes + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +PARAMS_5(_objects,_controllers,_images,_names,_duration); + +// Verify data +if (count _images != count _names || {count _images == 0} || {count _names == 0}) exitWith { + diag_log "[ACE] ERROR: Slideshow Images or Names fields can NOT be empty and must have equal number of items!" +}; + +// Objects synced to the module +{ + _objects pushBack _x; +} forEach (synchronizedObjects _logic); + +// If no controllers use objects as controllers +if (count _controllers == 0) then { + _controllers = _objects; +}; + +TRACE_4("Information",_objects,_controllers,_images,_names); + +// Default images on whiteboards (first image) +{ + _x setObjectTextureGlobal [0, _images select 0]; +} forEach _objects; + +// Number of slideshows (multiple modules support) +GVAR(slideshows) = GVAR(slideshows) + 1; +private ["_currentSlideshow"]; +_currentSlideshow = GVAR(slideshows); // Local variable in case GVAR gets changed during execution of below code + +// Add interactions if automatic transitions are disabled, else setup automatic transitions +if (_duration == 0) then { + private ["_actionsObject", "_actionsClass", "_mainAction", "_slidesAction"]; + { + // Add MainAction if one does not already exist + _actionsObject = _x getVariable [QEGVAR(interact_menu,actions), []]; + _actionsClass = missionNamespace getVariable [format [QEGVAR(interact_menu,Act_%1), typeOf _x], []]; + if (count _actionsObject == 0 && {count _actionsClass == 0}) then { + _mainAction = ["ACE_MainActions", localize ELSTRING(interaction,MainAction), "", {}, {true}] call EFUNC(interact_menu,createAction); + [_x, 0, [], _mainAction] call EFUNC(interact_menu,addActionToObject); + TRACE_2("Adding ACE_MainActions",_actionsObject,_actionsClass); + }; + + // Add Slides sub-action and populate with images + _slidesAction = [QGVAR(Slides), localize LSTRING(Interaction), "", {}, {true}, {(_this select 2) call FUNC(addSlideActions)}, [_objects,_images,_names,_x,_currentSlideshow], [0,0,0], 2] call EFUNC(interact_menu,createAction); + [_x, 0, ["ACE_MainActions"], _slidesAction] call EFUNC(interact_menu,addActionToObject); + } forEach _controllers; +} else { + // Formatted GVAR string (multiple modules support) + private ["_varString"]; + _varString = format [QGVAR(slideshow%1), _currentSlideshow]; + TRACE_1("Current Slide",_varString); + + // Set formatted GVAR to first slide + missionNamespace setVariable [_varString, 0]; + + // Automatic transitions handler + [FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call EFUNC(common,waitAndExecute); +}; diff --git a/addons/slideshow/functions/fnc_makeList.sqf b/addons/slideshow/functions/fnc_makeList.sqf new file mode 100644 index 0000000000..9ce4a723cc --- /dev/null +++ b/addons/slideshow/functions/fnc_makeList.sqf @@ -0,0 +1,57 @@ +/* + * Author: Jonpas + * Makes a list from a string using comma as a delimiter, optionally remove whitespace and check each for object existence. + * + * Arguments: + * 0: Text + * 1: Remove Whitespace + * 2: Check Nil + * + * Return Value: + * Parsed List + * + * Example: + * ["text", true, false] call ace_slideshow_fnc_makeList + * + * Public: No + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +PARAMS_3(_list,_removeWhitespace,_checkNil); + +private ["_splittedList", "_listNoWhitespace", "_nilCheckPassedList"]; + +// Split using comma delimiter +_splittedList = [_list, ","] call BIS_fnc_splitString; + +// Remove whitespace +_listNoWhitespace = []; +if (_removeWhitespace) then { + { + _listNoWhitespace pushBack ([_x] call EFUNC(common,stringRemoveWhiteSpace)); + } forEach _splittedList; + _list = _listNoWhitespace; +}; + +// Check for object existence +_nilCheckPassedList = ""; +if (_checkNil) then { + { + if !(isNil _x) then { + if (_nilCheckPassedList == "") then { + _nilCheckPassedList = _x; + } else { + _nilCheckPassedList = _nilCheckPassedList + "," + _x; + }; + }; + } forEach _list; + + // Add Array characters and parse into array + _list = "[" + _nilCheckPassedList + "]"; + _list = [] call compile _list; +}; + +TRACE_4("Lists",_splittedList,_listNoWhitespace,_nilCheckPassedList,_list); + +_list diff --git a/addons/slideshow/functions/fnc_moduleInit.sqf b/addons/slideshow/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..50de48693e --- /dev/null +++ b/addons/slideshow/functions/fnc_moduleInit.sqf @@ -0,0 +1,39 @@ +/* + * Author: Jonpas + * Initializes the module. + * + * Arguments: + * 0: The module logic + * 1: Units + * 2: Activated + * + * Return Value: + * None + * + * Public: No + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +if !(isServer) exitWith {}; + +PARAMS_3(_logic,_units,_activated); + +if !(_activated) exitWith {}; + +private ["_objects", "_controllers", "_images", "_names", "_duration"]; + +_logic = [_this, 0, objNull, [objNull]] call BIS_fnc_param; +if (isNull _logic) exitWith {}; + +// Extract variables from logic +_objects = [_logic getVariable ["Objects", ""], true, true] call FUNC(makeList); +_controllers = [_logic getVariable ["Controllers", ""], true, true] call FUNC(makeList); +_images = [_logic getVariable ["Images", ""], true, false] call FUNC(makeList); +_names = [_logic getVariable ["Names", ""], true, false] call FUNC(makeList); +_duration = _logic getVariable ["Duration", 0]; + +// Prepare with actions +[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow); + +diag_log text format ["[ACE]: Slideshow Module Initialized for: %1 with Duration: %2", _objects, _duration]; diff --git a/addons/slideshow/functions/script_component.hpp b/addons/slideshow/functions/script_component.hpp new file mode 100644 index 0000000000..c4c2d6d966 --- /dev/null +++ b/addons/slideshow/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\slideshow\script_component.hpp" diff --git a/addons/slideshow/script_component.hpp b/addons/slideshow/script_component.hpp new file mode 100644 index 0000000000..12f60ee1ab --- /dev/null +++ b/addons/slideshow/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT slideshow +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_SLIDESHOW + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_SLIDESHOW + #define DEBUG_SETTINGS DEBUG_SETTINGS_SLIDESHOW +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml new file mode 100644 index 0000000000..63547c06e2 --- /dev/null +++ b/addons/slideshow/stringtable.xml @@ -0,0 +1,44 @@ + + + + + Slideshow + + + This module allows you to set up slide-shows on different objects. One module per image list. Only objects with hiddenSelection 0 are supported. + + + Objects + + + Object names (can also be synchronized objects) slide-show will be displayed on, separated by commas if multiple. Reference INFO for object support. + + + Controllers + + + Controller object names, separated by commas if multiple. + + + Images + + + List of images that will be used for the slide-show, separated by commas, with full path correctly formatted (eg. images\image.paa). + + + Interaction Names + + + List of names that will be used for interaction entries, separated by commas, in order of images. + + + Slide Duration + + + Duration of each slide. Default: 0 (Automatic Transitions Disabled) + + + Slides + + + \ No newline at end of file diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp index d42946214b..b0b8bf9c77 100644 --- a/addons/spottingscope/CfgVehicles.hpp +++ b/addons/spottingscope/CfgVehicles.hpp @@ -24,10 +24,7 @@ class CfgVehicles { displayName = CSTRING(DisplayName); vehicleClass = "Items"; class TransportItems { - class ACE_SpottingScope { - name = "ACE_SpottingScope"; - count = 1; - }; + MACRO_ADDITEM(ACE_SpottingScope,1); }; }; diff --git a/addons/spottingscope/stringtable.xml b/addons/spottingscope/stringtable.xml index 8c5425dc2b..e20f0635ea 100644 --- a/addons/spottingscope/stringtable.xml +++ b/addons/spottingscope/stringtable.xml @@ -6,7 +6,7 @@ Teleskop Зрительная труба Teleskop - Spotting Scope + Telescopio Téléscope de visée Zaměřovací Dalekohled Spotting Scope @@ -18,7 +18,7 @@ Teleskop aufnehmen Поднять зрительная трубу Zabierz teleskop - Pick up Spotting Scope + Coger telescopio Prendre téléscope de visée Zvednout Zaměřovací dalekohled Raccogli spottingscope @@ -30,7 +30,7 @@ Teleskop aufstellen Установить зрительная трубу Ustaw teleskop - Place Spotting Scope + Colocar telescopio Placer téléscope de visée Položit Zaměřovací dalekohled Posiziona spottingscope diff --git a/addons/tacticalladder/CfgVehicles.hpp b/addons/tacticalladder/CfgVehicles.hpp index d180ccae40..bd66176e34 100644 --- a/addons/tacticalladder/CfgVehicles.hpp +++ b/addons/tacticalladder/CfgVehicles.hpp @@ -13,14 +13,14 @@ class CfgVehicles { }; }; }; - + class Bag_Base; class ACE_TacticalLadder_Pack: Bag_Base { scope = 2; displayName = CSTRING(DisplayName); descriptionShort = ""; model = PATHTOF(data\ace_tacticalladder_pack.p3d); - picture = PATHTOF(UI\ace_tactical_ladder_pack_ca.paa); + picture = PATHTOF(UI\ace_tactical_ladder_pack_ca.paa); maximumLoad = 0; mass = 50; }; @@ -28,13 +28,10 @@ class CfgVehicles { class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportBackpacks { - class _xx_ACE_TacticalLadder_Pack { - backpack = "ACE_TacticalLadder_Pack"; - count = 3; - }; + MACRO_ADDBACKPACK(ACE_TacticalLadder_Pack,3); }; }; - + class House; class ACE_Tactical_Ladder: House { XEH_ENABLED; diff --git a/addons/tacticalladder/data/ace_tacticalladder.p3d b/addons/tacticalladder/data/ace_tacticalladder.p3d index 3126601117..a331f24084 100644 Binary files a/addons/tacticalladder/data/ace_tacticalladder.p3d and b/addons/tacticalladder/data/ace_tacticalladder.p3d differ diff --git a/addons/tripod/$PBOPREFIX$ b/addons/tripod/$PBOPREFIX$ index a374eb7994..2a79aeafd9 100644 --- a/addons/tripod/$PBOPREFIX$ +++ b/addons/tripod/$PBOPREFIX$ @@ -1 +1 @@ -z\ace\addons\tripod +z\ace\addons\tripod \ No newline at end of file diff --git a/addons/tripod/CfgEventHandlers.hpp b/addons/tripod/CfgEventHandlers.hpp index ed5027f094..d700ed4c85 100644 --- a/addons/tripod/CfgEventHandlers.hpp +++ b/addons/tripod/CfgEventHandlers.hpp @@ -1,7 +1,7 @@ class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE( call COMPILE_FILE(XEH_preInit) ); - }; + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; }; class Extended_PostInit_EventHandlers { diff --git a/addons/tripod/CfgVehicles.hpp b/addons/tripod/CfgVehicles.hpp index 714d2cafb1..a489e18704 100644 --- a/addons/tripod/CfgVehicles.hpp +++ b/addons/tripod/CfgVehicles.hpp @@ -1,4 +1,3 @@ - class CfgVehicles { class Man; class CAManBase: Man { @@ -24,10 +23,7 @@ class CfgVehicles { displayName = CSTRING(DisplayName); vehicleClass = "Items"; class TransportItems { - class ACE_Tripod { - name = "ACE_Tripod"; - count = 1; - }; + MACRO_ADDITEM(ACE_Tripod,1); }; }; @@ -37,7 +33,7 @@ class CfgVehicles { MACRO_ADDITEM(ACE_Tripod,2); }; }; - + class thingX; class ACE_TripodObject: thingX { XEH_ENABLED; @@ -50,7 +46,7 @@ class CfgVehicles { animPeriod = 0.02; initPhase = 0; minValue = 0; - maxValue = 1; + maxValue = 1; }; class retract_leg_1: slide_down_tripod {}; class retract_leg_2: retract_leg_1 {}; diff --git a/addons/tripod/CfgWeapons.hpp b/addons/tripod/CfgWeapons.hpp index cc7521f0f2..5ae0ee84d2 100644 --- a/addons/tripod/CfgWeapons.hpp +++ b/addons/tripod/CfgWeapons.hpp @@ -1,4 +1,3 @@ - class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; diff --git a/addons/tripod/stringtable.xml b/addons/tripod/stringtable.xml index 254af3295f..caddca415f 100644 --- a/addons/tripod/stringtable.xml +++ b/addons/tripod/stringtable.xml @@ -30,6 +30,7 @@ Podnieś trójnóg snajperski Coger equipo SSWT Zvednout SSWT soupravu + SSWT-Werkzeug aufheben Pegar kit SSWT @@ -37,6 +38,7 @@ Reguluj trójnóg snajperski Ajustar equipo SSWT Regulovat SSWT soupravu + SSWT-Werkzeug anpassen Ajustar kit SSWT @@ -44,6 +46,7 @@ Gotowe Hecho Hotovo + Fertig Feito @@ -51,7 +54,8 @@ + Modyfikator, regulacja + Modificador, ajuste + Modifikátor, regulace + + Modifikator, anpassen + Modificador, ajuste - \ No newline at end of file + diff --git a/addons/vector/CfgVehicles.hpp b/addons/vector/CfgVehicles.hpp index cf0d50d18f..f06f79aa12 100644 --- a/addons/vector/CfgVehicles.hpp +++ b/addons/vector/CfgVehicles.hpp @@ -1,9 +1,3 @@ - -#define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \ - weapon = #WEAPON; \ - count = COUNT; \ -} - class CfgVehicles { class Item_Base_F; class ACE_Item_Vector: Item_Base_F { diff --git a/addons/vector/functions/fnc_illuminate.sqf b/addons/vector/functions/fnc_illuminate.sqf index 0c3779e441..cbf9d56fef 100644 --- a/addons/vector/functions/fnc_illuminate.sqf +++ b/addons/vector/functions/fnc_illuminate.sqf @@ -7,35 +7,36 @@ disableSerialization; _dlgVector = GETUVAR(ACE_dlgVector,displayNull); if (_this select 0) then { - { - private ["_string", "_index"]; + if (ctrlIDC _x != 170) then { + private ["_string", "_index"]; - _string = ctrlText _x; - _index = _string find ".paa"; + _string = ctrlText _x; + _index = _string find ".paa"; - if (_index != -1 && {_string find "_illum.paa" == -1}) then { - _string = toArray _string; - _string resize _index; + if (_index != -1 && {_string find "_illum.paa" == -1}) then { + _string = toArray _string; + _string resize _index; - _x ctrlSetText format ["%1_illum.paa", toString _string]; + _x ctrlSetText format ["%1_illum.paa", toString _string]; + }; }; } forEach allControls _dlgVector; - } else { - { - private ["_string", "_index"]; + if (ctrlIDC _x != 170) then { + private ["_string", "_index"]; - _string = ctrlText _x; - _index = _string find "_illum.paa"; + _string = ctrlText _x; + _index = _string find "_illum.paa"; - if (_index != -1) then { - _string = toArray _string; - _string resize _index; + if (_index != -1) then { + _string = toArray _string; + _string resize _index; + + _x ctrlSetText format ["%1.paa", toString _string]; + }; - _x ctrlSetText format ["%1.paa", toString _string]; }; } forEach allControls _dlgVector; - }; diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index b8de5321c2..bdf96f35a0 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -6,6 +6,7 @@ Ogranicznik zasięgu widzenia Limitador de distancia de visión Omezovač dohlednosti + Sichtweitenbegrenzung Limitador de distância de visão @@ -13,6 +14,7 @@ Pozwala ustawić maksymalny limit zasięgu widzenia. Permite limitar la distancia máxima de visión que se puede establecer por los jugadores. Umožňuje určit maximální dohlednost, kterou si může hráč nastavit + Erlaubt das Einschränken der maximalen Sichtweite, welche von Spielern eingestellt werden kann. Permite limitar a distância máxima de visão que pode ser definida pelos jogadores. @@ -20,6 +22,7 @@ Wł. zasięg widzenia ACE Habilitar distancia de visión ACE Povolit ACE dohlednost + Aktiviere ACE-Sichtweite Habilitar distância de visão ACE @@ -27,6 +30,7 @@ Aktywuje możliwość zmiany zasięgu widzenia w menu ustawień ACE Habilita la distancia de visión ACE Povolit ACE dohlednost + Aktiviert ACE-Sichtweite Habilita a distância de visão ACE @@ -34,6 +38,7 @@ Limit zas. widzenia Limite de distancia de visión Limit dohlednosti + Sichtweitengrenze Limite da distância de visão @@ -41,6 +46,7 @@ Ustawia maksymalny limit zasięgu widzenia jaki mogą ustawić gracze (do 10000) Establece el límite de cuan alta pueden aumentar los clientes la distancia de visión (hasta 10.000) Stanoví limit jak daleko si může client zvýšit dohlednost (do 10000) + Setze die Grenze fest, wie weit Spieler ihre Sichtweite erhöhen können (bis 10000) Estabelecer um limite de quão alto os clientes podem aumentar sua distância de visão (até 10000) @@ -48,6 +54,7 @@ Limit zasięgu widzenia jest ustawiany tutaj i może zostać nadpisany poprzez moduł Establecer aqui el límite para la distancia de visión de los clientes. Puede ser anulado por módulo Limit dohlednoti pro klienty se nastavuje zde a může být potlačeno pomocí modulu. + Stellt die Grenze für die Sichtweite des Spielers ein. Das kann von einem Modul überschrieben werden. Permite limitar a distância de visão máxima que pode ser definida por jogadores. Pode ser substituído por módulo. @@ -55,6 +62,7 @@ Zasięg widzenia (piechota) Distancia de visión del cliente (A pie) Dohlednost (Pěšák) + Spielersichtweite (zu Fuß) Distância de visão do cliente (A pé) @@ -62,6 +70,7 @@ Zmienia zasięg widzenia kiedy gracz porusza się na piechotę. Cambia en juego la distancia de visión cuando el jugador va a pie. Změna dohlednosti pro hráče pokud jde po svých. + Verändert die Sichtweite, wenn ein Spieler zu Fuß unterwegs ist. Muda a distância de visão do jogador dentro do jogo quando ele está a pé. @@ -69,6 +78,7 @@ Zasięg widzenia (pojazdy naziemne) Distancia de visión del cliente (Vehículo terrestre) Dohlednost (Pozemní technika) + Spielersichtweite (Landfahrzeuge) Distância de visão do cliente (Veículo terrestre) @@ -76,6 +86,7 @@ Zmienia zasięg widzenia kiedy gracz porusza się pojazdami naziemnymi. Cambia en juego la distancia de visión cuando el jugador va en un vehículo terrestre. Změna dohlednosti pro hráče pokud je v pozemní technice. + Verändert die Sichtweite, wenn ein Spieler in einem Landfahrzeug ist. Muda a distância de visão do jogador dentro do jogo quando ele está dentro de um veículo terrestre. @@ -83,6 +94,7 @@ Zasięg widzenia (pojazdy lotnicze) Distancia de visión del cliente (Vehículo aéreo) Dohlednost (Vzdušná technika) + Spielersichtweite (Luftfahrzeuge) Distância de visão do cliente (Veículo aéreo) @@ -90,6 +102,7 @@ Zmienia zasięg widzenia kiedy gracz porusza się pojazdami lotniczymi. Cambia en juego la distancia de visión cuando el jugador va en un vehículo aéreo. Změna dohlednosti pro hráče pokud je ve vzdušné technice. + Verändert die Sichtweite wenn ein Spieler in einem Luftfahrzeug ist. Muda a distância de visão do jogador dentro do jogo quando ele está dentro de um veículo aéreo. @@ -97,6 +110,7 @@ Dynamiczny zasięg rysowania obiektów Distancia de visión dinámica de objetos Dynamická dohlednost objektů + Dynamische Objektsichtweite Distância de visão dinâmica dos objetos @@ -104,6 +118,7 @@ Zmienia zasięg rysowania obiektów jako mnożnik zasięgu widzenia. Establece la distancia de visión de objetos como un coeficiente de la distancia de visión. Nastaví objekt dohlednosti jako koeficient dohlednosti. + Passt die Objektsichtweite dynamisch der Sichtweite an. Estabelece a distância de visão dos objetos com um coeficiente da distância de visão. @@ -111,6 +126,7 @@ Wyłącz Apagada Vypnout + Aus Desligado @@ -118,6 +134,7 @@ Bardzo niski Muy baja Velmi málo + Sehr niedrig Muito baixo @@ -125,6 +142,7 @@ Niski Baja Málo + Niedrig Baixo @@ -132,6 +150,7 @@ Średni Media Středně + Mittel Médio @@ -139,6 +158,7 @@ Wysoki Alta Hodně + Hoch Alto @@ -146,6 +166,7 @@ Bardzo wysoki Muy alta Velmi hodně + Sehr hoch Muito alto @@ -153,6 +174,7 @@ Zasięg widzenia: Distancia de visión: Dohlednost: + Sichtweite: Distância de visão: @@ -160,6 +182,7 @@ Zasięg widzenia obiektów wynosi La distancia de visión de objetos es: Dohlednost objektů je + Objektsichtweite ist Distância de visão do objeto é @@ -167,6 +190,7 @@ Ta opcja jest nieprawidłowa! Limit wynosi Esta opción no es valida! El limite es Tato volba je neplatná! Limit je + Diese Option ist ungültig! Die Grenze ist Essa opção é inválida. O limte é @@ -174,7 +198,8 @@ Ustawienia wideo Ajustes de vídeo Nastavení videa + Grafikeinstellungen Ajustes de vídeo - \ No newline at end of file + diff --git a/addons/weather/functions/fnc_calculateBarometricPressure.sqf b/addons/weather/functions/fnc_calculateBarometricPressure.sqf index e0d8e8f878..869deb93cb 100644 --- a/addons/weather/functions/fnc_calculateBarometricPressure.sqf +++ b/addons/weather/functions/fnc_calculateBarometricPressure.sqf @@ -14,4 +14,4 @@ */ #include "script_component.hpp" -((1013.25 - 10 * overcast) * (1 - (0.0065 * (GVAR(Altitude) + _this)) / (KELVIN(GVAR(currentTemperature)) + 0.0065 * GVAR(Altitude))) ^ 5.255754495); \ No newline at end of file +((1013.25 - 10 * overcast) * (1 - (0.0065 * (EGVAR(common,mapAltitude) + _this)) / (KELVIN(GVAR(currentTemperature)) + 0.0065 * EGVAR(common,mapAltitude))) ^ 5.255754495); diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index 55c6e9c3c0..2e39f80764 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -11,31 +11,6 @@ */ #include "script_component.hpp" -GVAR(Altitude) = getNumber(configFile >> "CfgWorlds" >> worldName >> "elevationOffset"); -GVAR(Latitude) = getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude"); - -if (worldName in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { GVAR(Latitude) = 50; GVAR(Altitude) = 0; }; -if (worldName in ["Altis", "Stratis"]) then { GVAR(Latitude) = 40; GVAR(Altitude) = 0; }; -if (worldName in ["Takistan", "Zargabad", "Mountains_ACR"]) then { GVAR(Latitude) = 35; GVAR(Altitude) = 2000; }; -if (worldName in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { GVAR(Latitude) = 35; GVAR(Altitude) = 100; }; -if (worldName in ["fallujah"]) then { GVAR(Latitude) = 33; GVAR(Altitude) = 0; }; -if (worldName in ["fata", "Abbottabad"]) then { GVAR(Latitude) = 30; GVAR(Altitude) = 1000; }; -if (worldName in ["sfp_wamako"]) then { GVAR(Latitude) = 14; GVAR(Altitude) = 0; }; -if (worldName in ["sfp_sturko"]) then { GVAR(Latitude) = 56; GVAR(Altitude) = 0; }; -if (worldName in ["Bornholm"]) then { GVAR(Latitude) = 55; GVAR(Altitude) = 0; }; -if (worldName in ["Imrali"]) then { GVAR(Latitude) = 40; GVAR(Altitude) = 0; }; -if (worldName in ["Caribou"]) then { GVAR(Latitude) = 68; GVAR(Altitude) = 0; }; -if (worldName in ["Namalsk"]) then { GVAR(Latitude) = 65; GVAR(Altitude) = 0; }; -if (worldName in ["MCN_Aliabad"]) then { GVAR(Latitude) = 36; GVAR(Altitude) = 0; }; -if (worldName in ["Clafghan"]) then { GVAR(Latitude) = 34; GVAR(Altitude) = 640; }; -if (worldName in ["Sangin", "hellskitchen"]) then { GVAR(Latitude) = 32; GVAR(Altitude) = 0; }; -if (worldName in ["Sara"]) then { GVAR(Latitude) = 40; GVAR(Altitude) = 0; }; -if (worldName in ["reshmaan"]) then { GVAR(Latitude) = 35; GVAR(Altitude) = 2000; }; -if (worldName in ["Thirsk"]) then { GVAR(Latitude) = 65; GVAR(Altitude) = 0; }; -if (worldName in ["lingor"]) then { GVAR(Latitude) = -4; GVAR(Altitude) = 0; }; -if (worldName in ["Panthera3"]) then { GVAR(Latitude) = 46; GVAR(Altitude) = 0; }; -if (worldName in ["Kunduz"]) then { GVAR(Latitude) = 37; GVAR(Altitude) = 400; }; - // Assume default wind values // Source: https://weatherspark.com/averages/32194/Lemnos-Limnos-North-Aegean-Islands-Greece GVAR(WindSpeedMax) = [[8.8, 5.5], [8.8, 5], [8.6, 4.8], [7.6, 3.4], [7.0, 3.0], [7.1, 3.0], [7.5, 3.1], [8.0, 3.2], [7.6, 3.5], [7.8, 4.6], [7.9, 5.0], [8.2, 5.5]]; diff --git a/addons/winddeflection/CfgEventHandlers.hpp b/addons/winddeflection/CfgEventHandlers.hpp index d856993322..a835fd0e88 100644 --- a/addons/winddeflection/CfgEventHandlers.hpp +++ b/addons/winddeflection/CfgEventHandlers.hpp @@ -3,7 +3,11 @@ class Extended_PreInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; - +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; class Extended_FiredBIS_EventHandlers { class AllVehicles { class ADDON { diff --git a/addons/winddeflection/XEH_postInit.sqf b/addons/winddeflection/XEH_postInit.sqf new file mode 100644 index 0000000000..63d866fb60 --- /dev/null +++ b/addons/winddeflection/XEH_postInit.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +if !(hasInterface) exitWith {}; + +GVAR(trackedBullets) = []; + +["SettingsInitialized", { + //If not enabled, dont't add PFEH + if (!GVAR(enabled)) exitWith {}; + + [] call FUNC(updateTrajectoryPFH); + +}] call EFUNC(common,addEventHandler); diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index f7090cfc2a..d3f9da8153 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -34,6 +34,6 @@ if (!((_bullet isKindOf "BulletBase") || (_bullet isKindOf "GrenadeBase"))) exit if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false}; -[_bullet, getNumber(configFile >> "cfgAmmo" >> (_this select 4) >> "airFriction")] call FUNC(updateTrajectoryPFH); +GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> (_this select 4) >> "airFriction")]; true; \ No newline at end of file diff --git a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf index 40e349095e..23d0be6b79 100644 --- a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf +++ b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf @@ -13,38 +13,44 @@ * * Public: No */ +// #define ENABLE_PERFORMANCE_COUNTERS #include "script_component.hpp" [{ - private ["_args", "_bullet", "_airFriction", "_time", "_deltaT", "_bulletVelocity", "_bulletSpeed", "_trueVelocity", "_trueSpeed", "_dragRef", "_drag", "_accelRef", "_accel"]; + // BEGIN_COUNTER(pfeh); + private["_accel", "_accelRef", "_bulletSpeed", "_bulletVelocity", "_deleted", "_deltaT", "_drag", "_dragRef", "_isWind", "_lastTime", "_trueSpeed", "_trueVelocity"]; - _args = _this select 0; - _bullet = _args select 0; - _airFriction = _args select 1; - _time = _args select 2; - - _bulletVelocity = velocity _bullet; - _bulletSpeed = vectorMagnitude _bulletVelocity; - - if (!alive _bullet || ((_bullet isKindOf "BulletBase") && _bulletSpeed < 100)) exitwith { - [_this select 1] call cba_fnc_removePerFrameHandler; - }; - - _deltaT = ACE_time - _time; - _args set[2, ACE_time]; - - if (vectorMagnitude ACE_wind > 0) then { - _trueVelocity = _bulletVelocity vectorDiff ACE_wind; - _trueSpeed = vectorMagnitude _trueVelocity; + _lastTime = (_this select 0) select 0; + _deltaT = ACE_time - _lastTime; + (_this select 0) set [0, ACE_time]; + _deleted = 0; + _isWind = (vectorMagnitude ACE_wind > 0); - _dragRef = _deltaT * _airFriction * _bulletSpeed * _bulletSpeed; - _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); - _bulletVelocity = _bulletVelocity vectorDiff _accelRef; + { + _x params ["_bullet", "_airFriction"]; - _drag = _deltaT * _airFriction * _trueSpeed; - _accel = _trueVelocity vectorMultiply (_drag); - _bulletVelocity = _bulletVelocity vectorAdd _accel; - }; - _bullet setVelocity _bulletVelocity; - -}, GVAR(simulationInterval), [_this select 0, _this select 1, ACE_time]] call CBA_fnc_addPerFrameHandler; \ No newline at end of file + _bulletVelocity = velocity _bullet; + _bulletSpeed = vectorMagnitude _bulletVelocity; + + if ((!alive _bullet) || {(_bullet isKindOf "BulletBase") && {_bulletSpeed < 100}}) then { + GVAR(trackedBullets) deleteAt (_forEachIndex - _deleted); + _deleted = _deleted + 1; + } else { + if (_isWind) then { + _trueVelocity = _bulletVelocity vectorDiff ACE_wind; + _trueSpeed = vectorMagnitude _trueVelocity; + + _dragRef = _deltaT * _airFriction * _bulletSpeed * _bulletSpeed; + _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); + _bulletVelocity = _bulletVelocity vectorDiff _accelRef; + + _drag = _deltaT * _airFriction * _trueSpeed; + _accel = _trueVelocity vectorMultiply (_drag); + _bulletVelocity = _bulletVelocity vectorAdd _accel; + }; + _bullet setVelocity _bulletVelocity; + }; + + } forEach GVAR(trackedBullets); + // END_COUNTER(pfeh); +}, GVAR(simulationInterval), [ACE_time]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index 036456e35e..f7b4324233 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -66,6 +66,7 @@ Wpływ wiatru Desviación por viento Účinky větru + Windablenkung Desvio de vento @@ -141,4 +142,4 @@ Influência do vento na trajetória dos projéteis - \ No newline at end of file + diff --git a/addons/yardage450/stringtable.xml b/addons/yardage450/stringtable.xml index 971b3a4889..30887673e7 100644 --- a/addons/yardage450/stringtable.xml +++ b/addons/yardage450/stringtable.xml @@ -6,6 +6,7 @@ Yardage 450 Yardage 450 Yardage 450 + Yardage 450 Yardage 450 @@ -25,4 +26,4 @@ Yardage 450 - Botão de energia - \ No newline at end of file + diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index f77f9846a4..41d515c2fc 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -1,6 +1,6 @@ /* * Author: SilentSpike - * Flips the capture state of the unit the module is attached to. + * Flips the capture state of the unit the module is placed on. * * Arguments: * 0: The module logic @@ -16,18 +16,20 @@ #include "script_component.hpp" PARAMS_3(_logic,_units,_activated); -private ["_unit","_captive"]; +private ["_mouseOver","_unit","_captive"]; if (!_activated) exitWith {}; if (isNil QEFUNC(captives,setHandcuffed)) then { [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { - _unit = attachedTo _logic; + _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); - if (isNull _unit) then { + if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { + _unit = effectivecommander (_mouseOver select 1); + if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index 591b216ad7..8518e2f9ad 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -1,6 +1,6 @@ /* * Author: SilentSpike - * Flips the surrender state of the unit the module is attached to. + * Flips the surrender state of the unit the module is placed on. * * Arguments: * 0: The module logic @@ -16,18 +16,20 @@ #include "script_component.hpp" PARAMS_3(_logic,_units,_activated); -private ["_unit","_surrendering"]; +private ["_mouseOver","_unit","_surrendering"]; if (!_activated) exitWith {}; if (isNil QEFUNC(captives,setSurrendered)) then { [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { - _unit = attachedTo _logic; + _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); - if (isNull _unit) then { + if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { + _unit = effectivecommander (_mouseOver select 1); + if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index 2d8bae85e8..529c8389ee 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -1,6 +1,6 @@ /* * Author: SilentSpike - * Flips the unconscious state of the unit the module is attached to. + * Flips the unconscious state of the unit the module is placed on. * * Arguments: * 0: The module logic @@ -16,18 +16,20 @@ #include "script_component.hpp" PARAMS_3(_logic,_units,_activated); -private ["_unit","_conscious"]; +private ["_mouseOver","_unit","_conscious"]; if (!_activated) exitWith {}; if (isNil QEFUNC(medical,setUnconscious)) then { [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { - _unit = attachedTo _logic; + _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); - if (isNull _unit) then { + if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { + _unit = effectivecommander (_mouseOver select 1); + if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 80d08a3275..7c70978aa4 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -6,6 +6,7 @@ Ustawienia Zeusa Ajustes Zeus Nastavení Zeuse + Zeus-Einstellungen Ajustes do Zeus @@ -13,6 +14,7 @@ Pozwala kontrolować różne aspekty Zeusa. Proporciona control sobre diversos aspectos de Zeus. Poskytuje kontrolu na různými aspekty Zeuse. + Bietet die Steuerung verschiedener Zeus-Optionen an. Proporciona controle sobre diversos aspectos do Zeus. @@ -20,6 +22,7 @@ Wiad. o nowym Zeusie Mensajes de ascensión Zpráva o novém Zeusovi + Aufstiegsnachrichten Mensagens de ascensão @@ -27,6 +30,7 @@ Wyświetlaj globalną wiadomość kiedy gracz zostanie przydzielony jako Zeus Mostrar mensajes emergentes globales cuando a un jugador se le asigna como Zeus. Zobrazit globální zprávu když je hráč přiřazen jako Zeus. + Zeige globale Popup-Nachrichten wenn ein Spieler zu Zeus wird. Mostra uma mensagem popup quando um jogador é atribuido ao Zeus. @@ -34,6 +38,7 @@ Orzeł Zeusa Águila Zeus Orel Zeuse + Zeus-Adler Águia do Zeus @@ -41,6 +46,7 @@ Spawnuj orła, który podąrza za kamerą Zeusa. Generar un águila que sigue la cámara Zeus. Vytvoří orla, který následuje kameru Zeuse. + Erstelle einen Adler, der der Zeus-Kamera folgt. Cria uma águia que segue a câmera do Zeus @@ -48,6 +54,7 @@ Dźwięki wiatru Sonidos de viento Zvuky větru + Windgeräusche Sons de vento @@ -55,6 +62,7 @@ Odtwarzaj dźwięki wiatru kiedy Zeus zdalnie kontroluje jednostkę. Reproduce sonidos de viento cuando Zeus controle remotamente una unidad. Přehrát varování (vítr) když Zeus převezmě kontrolu nad jednotkou. + Spiele Windgeräusche ab, wenn Zeus eine Einheit steuert. Reproduz sons de vento quando uma unidade é remotamente controlada pelo Zeus. @@ -62,6 +70,7 @@ Ostrz. o ostrzale arty. Advertencia de artefactos explosivos Varování před dělostřelectvem + Artilleriewarnung Aviso de explosivos @@ -69,6 +78,7 @@ Odtwarzaj wiadomość radiową kiedy Zeus używa artylerii. Reproduce un aviso de radio cuando Zeus utiliza artefactos explosivos. Přehrát varování (rádio) když Zeus použije dělostřelectvo. + Spiele eine Radiowarnung ab, wenn Zeus Artillerie verwendet. Reproduz uma aviso via rádio quando o Zeus usa um explosivo. @@ -76,6 +86,7 @@ Pokazuj miny Revelar minas Odhalit miny + Enthülle Minen Revelar minas @@ -83,6 +94,7 @@ Pokazuj znaczniki min dla sojuszników i twórz markery na mapie w miejscu min. Revelar minas a aliados y establecer marcadores de mapa. Odhalí miny pro spojence a umístnit jejich značku na mapu. + Enthülle Minen gegenüber Verbündeten und platziere Kartenmarkierungen. Revelar minas para aliados e colocar marcadores no mapa. @@ -90,6 +102,7 @@ Pokaż dla sojuszników Revelar a aliados Odhalit pro spojence + An Verbündete weitergeben Revelar para aliados @@ -97,6 +110,7 @@ Sojusznicy + markery na mapie Aliados + Marcas de mapa Spojenci + Značky na mapě + Verbündete + Kartenmarkierungen Aliados + Marcadores no mapa @@ -104,6 +118,7 @@ Przełącz więźnia Alternar cautivo Přepnout - Vězeň + Gefangennahme umschalten Alternar prisioneiro @@ -111,6 +126,7 @@ Przełącz kapitulację Alternar rendición Přepnout - Vzdávání + Aufgabe umschalten Alternar rendição @@ -118,6 +134,7 @@ Przełącz nieprzytomność Alternar inconsciencia Přepnout - Bezvědomí + Bewusstlosigkeit umschalten Alternar inconsciência @@ -149,6 +166,7 @@ Jednostka nie może być więźniem La unidad no debe estar cautiva Jednotka nemí být vězeň + Einheit darf nicht gefangen sein Unidade não pode ser prisioneira @@ -168,7 +186,8 @@ Wymaga addonu, który nie jest obecny Requiere un addon que no está presente Vyžaduje addon, který není přítomen + Benötigt ein Addon, das nicht vorhanden ist Requer um addon que não está presente - \ No newline at end of file + diff --git a/documentation/development/ace3-events-system.md b/documentation/development/ace3-events-system.md index 77281c9c7c..e9618d1456 100644 --- a/documentation/development/ace3-events-system.md +++ b/documentation/development/ace3-events-system.md @@ -73,7 +73,7 @@ PREP(onTapShoulder); "playerInventoryChanged" Inventory changed common - getAllGear-Array + [_player, getAllGear-Array] local diff --git a/documentation/development/Documentation guidelines and tips.md b/documentation/development/documentation-guidelines-and-tips.md similarity index 100% rename from documentation/development/Documentation guidelines and tips.md rename to documentation/development/documentation-guidelines-and-tips.md diff --git a/documentation/feature/advanced_ballistics.md b/documentation/feature/advanced-ballistics.md similarity index 100% rename from documentation/feature/advanced_ballistics.md rename to documentation/feature/advanced-ballistics.md diff --git a/documentation/feature/concertina_wire.md b/documentation/feature/concertina-wire.md similarity index 87% rename from documentation/feature/concertina_wire.md rename to documentation/feature/concertina-wire.md index 8fd8a58eb6..72c63ece5e 100644 --- a/documentation/feature/concertina_wire.md +++ b/documentation/feature/concertina-wire.md @@ -1,6 +1,6 @@ --- layout: wiki -title: concertina wire +title: Concertina Wire description: group: feature parent: wiki @@ -8,7 +8,7 @@ parent: wiki ## 1. Overview -A concertina wire is a type of barbed wire formed in large coils that can be expanded to form obstacles, in ACE3 any vehicle making contact with it get it's tires destroyed. +A concertina wire is a type of barbed wire formed in large coils that can be expanded to form obstacles, in ACE3 any vehicle making contact with it gets its tires destroyed. ## 2. Usage diff --git a/documentation/feature/interact_menu.md b/documentation/feature/interact-menu.md similarity index 100% rename from documentation/feature/interact_menu.md rename to documentation/feature/interact-menu.md diff --git a/documentation/feature/laser_selfdesignate.md b/documentation/feature/laser-selfdesignate.md similarity index 100% rename from documentation/feature/laser_selfdesignate.md rename to documentation/feature/laser-selfdesignate.md diff --git a/documentation/feature/logistics_uavbattery.md b/documentation/feature/logistics-uavbattery.md similarity index 100% rename from documentation/feature/logistics_uavbattery.md rename to documentation/feature/logistics-uavbattery.md diff --git a/documentation/feature/logistics_wirecutter.md b/documentation/feature/logistics-wirecutter.md similarity index 100% rename from documentation/feature/logistics_wirecutter.md rename to documentation/feature/logistics-wirecutter.md diff --git a/documentation/feature/modules.md b/documentation/feature/modules.md index 3d8f27136b..3b6bcef0b8 100644 --- a/documentation/feature/modules.md +++ b/documentation/feature/modules.md @@ -1,6 +1,6 @@ --- layout: wiki -title: modules +title: Modules group: feature parent: wiki --- @@ -11,4 +11,4 @@ This is taking care of module initialization **DO NOT REMOVE**. ## 2. Dependencies -`ace_main` reminder: **DO NOT REMOVE**. +`ace_main` diff --git a/documentation/feature/spotting_scope.md b/documentation/feature/spotting-scope.md similarity index 100% rename from documentation/feature/spotting_scope.md rename to documentation/feature/spotting-scope.md diff --git a/documentation/missionmaker/classnames.md b/documentation/missionmaker/class-names.md similarity index 71% rename from documentation/missionmaker/classnames.md rename to documentation/missionmaker/class-names.md index 9ea0d5b556..a40ff22ceb 100644 --- a/documentation/missionmaker/classnames.md +++ b/documentation/missionmaker/class-names.md @@ -1,7 +1,7 @@ --- layout: wiki -title: Classnames -description: A list of all the classnames in ACE3, your wet dream came true. +title: Class names +description: A list of all the class names in ACE3 group: missionmaker order: 11 parent: wiki @@ -9,27 +9,27 @@ parent: wiki Everything is ordered alphabetically. -You know an in-game name but want the classname? CTRL + F +You know an in-game name but want the class name? CTRL + F -### Atragmx +## AtragMX `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- | +class name | in game name | type | +---------- | --------- | --------- | ACE_ATragMX | ATragMX | ACE_ItemCore | -### Attachable +## Attachable `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- | +class name | in game name | type | +---------- | --------- | --------- | ACE_IR_Strobe_Item | IR strobe | ACE_ItemCore | -### Ballistics +## Ballistics `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- | +class name | in game name | type | +---------- | --------- | --------- | ACE_100Rnd_65x39_caseless_mag_Tracer_Dim | 6.5mm IR-DIM | Magazine | ACE_200Rnd_65x39_cased_Box_Tracer_Dim | 6.5mm IR-DIM | Magazine | ACE_30Rnd_65x39_caseless_mag_Tracer_Dim | 6.5mm IR-DIM | Magazine | @@ -63,118 +63,118 @@ ACE_30Rnd_9x19_mag | 9x19mm | Magazine | ACE_16Rnd_9x19_mag | 9x19mm | Magazine | ACE_10Rnd_762x54_Tracer_mag | 7.62mm | Magazine | -### Captive +## Captive `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_CableTie | cable tie | ACE_ItemCore | -### Common +## Common `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Banana | banana | ACE_ItemCore | -### Concertina_wire +## Concertina Wire `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_ConcertinaWireCoil | Concertina Wire Coil | ThingX | ACE_ConcertinaWire | Concertina Wire | deployed concertina wire | -### Dagr +## DAGR `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_DAGR | DAGR | ACE_ItemCore | -### Disposable +## Disposable `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_launch_NLAW_Used_F | used NLAW | Weapon | -### Explosives +## Explosives `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Clacker| M57 Firing Device | ACE_ItemCore | ACE_M26_Clacker| M26 Firing Device | ACE_ItemCore | ACE_DefusalKit | Defusal Kit | ACE_ItemCore | ACE_DeadManSwitch | Dead Man's Switch | ACE_ItemCore | ACE_Cellphone | Cellphone | ACE_ItemCore | -### Grenades +## Grenades `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_HandFlare_White | M127A1 Hand Held Signal (White) | Grenade | ACE_HandFlare_Red | M127A1 Hand Held Signal (Red | Grenade | ACE_HandFlare_Green | M127A1 Hand Held Signal (Green) | Grenade | ACE_HandFlare_Yellow | M127A1 Hand Held Signal (Yellow) | Grenade | ACE_M84 | M84 Stun Grenade | Grenade | -### Hearing +## Hearing `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_EarPlugs | Earplugs | ACE_ItemCore | -### HuntIR +## HuntIR `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_HuntIR_monitor | HuntIR monitor | ACE_ItemCore | ACE_HuntIR_M203 | HuntIR Round | Grenade shell | ACE_HuntIR_Box | HuntIR Transport Box | ammo box | -### Kestrel +## Kestrel `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Kestrel4500 | Kestrel 4500NV | ACE_ItemCore | -### Laser pointers +## Laser Pointers `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- acc_pointer_IR | Laser Pointer (red) | Weapon accessory | ACE_acc_pointer_red | Laser Pointer (green) | Weapon accessory | ACE_acc_pointer_green_IR | Laser Pointer (green) | Weapon accessory | ACE_acc_pointer_green | Laser Pointer (green) | Weapon accessory | -### logistics +## Logistics `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_UAVBattery | UAV Battery | ACE_ItemCore | ACE_wirecutter | Wirecutter | ACE_ItemCore | -### Map tools +## Map Tools `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_MapTools | Map Tools | ACE_ItemCore | -# Medical +## Medical `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_atropine | Atropin autoinjector | ACE_ItemCore | ACE_fieldDressing | Bandage (Basic) | ACE_ItemCore | ACE_elasticBandage | Bandage (Elastic) | ACE_ItemCore | @@ -197,33 +197,33 @@ ACE_salineIV_250 | Saline IV (250ml) | ACE_ItemCore | ACE_surgicalKit | Surgical Kit | ACE_ItemCore | ACE_tourniquet | Tourniquet (CAT) | ACE_ItemCore | -### Microdagr +## MicroDAGR `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_microDAGR | MicroDAGR GPS | ACE_ItemCore | -### mk6 mortar +## MK6 Mortar `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_RangeTable_82mm | 82mm Rangetable | ACE_ItemCore | -### M2XA +## M2XA `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_MX2A | MX-2A | Binocular | -### Nightvision +## Nightvision `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_NVG_Gen1 | NV Goggles (Gen1) | Nvgs | ACE_NVG_Gen2 | NV Goggles (Gen2) | Nvgs | ACE_NVG_Gen3 | NV Goggles (Gen3) | Nvgs | @@ -231,11 +231,11 @@ ACE_NVG_Gen4 | NV Goggles (Gen4) | Nvgs | ACE_NVG_Wide | NV Goggles (Wide) | Nvgs | -### Optics +## Optics `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_optic_Arco_2D | ARCO (2D) | Weapon accessory | ACE_optic_Arco_PIP | ARCO (PIP) | Weapon accessory | ACE_optic_LRPS_2D | LRPS (2D) | Weapon accessory | @@ -247,39 +247,39 @@ ACE_optic_MRCO_PIP | MRCO (PIP) | Weapon accessory | ACE_optic_Hamr_2D | RCO (2D) | Weapon accessory | ACE_optic_Hamr_PIP | RCO (PIP) | Weapon accessory | -### Overheating +## Overheating `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_SpareBarrel | Spare barrel | ACE_ItemCore | -### Parachute +## Parachute `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Altimeter | Altimeter Watch | ACE_ItemCore | ACE_NonSteerableParachute | Non-Steerable Parachute | Backpack | -### Rangecard +## Rangecard -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_RangeCard | rangecard | ACE_ItemCore | -### Vector +## Vector `added in 3.0.0.3` -classname | in game name | type | +class name | in game name | type | --------- | --------- | --------- ACE_Vector | Vector 21 | Binoculars | -### Vehicle lock +## Vehicle Lock `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_key_master | Vehicle Key: Master | ACE_ItemCore | ACE_key_lockpick | Lockpick | ACE_ItemCore | ACE_key_west | Vehicle Key: West | ACE_ItemCore | @@ -287,41 +287,41 @@ ACE_key_east | Vehicle Key: East | ACE_ItemCore | ACE_key_indp | Vehicle Key: Independent | ACE_ItemCore | ACE_key_civ | Vehicle Key: Civilian | ACE_ItemCore | -### Sandbag +## Sandbag `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Sandbag_empty | Sandbag (empty) | ACE_ItemCore | ACE_SandbagObject | Sandbag | ThingX | -### Spotting scope +## Spotting Scope `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_SpottingScope | Spotting Scope | ACE_ItemCore | ACE_SpottingScopeObject | Spotting Scope (placed) | StaticATWeapon | -### Tactical ladder +## Tactical Ladder `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_TacticalLadder_Pack | Telescopic Ladder | Backpack | ACE_Tactical_Ladder | Telescopic Ladder (placed) | house | -### Tripod +## Tripod `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Tripod | SSWT Kit | ACE_ItemCore | ACE_TripodObject | SSWT Kit (placed) | ThingX | -### Yardage 450 +## Yardage 450 `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Yardage450 | Yardage 450 | Binocular | \ No newline at end of file diff --git a/extras/assets/icons/Icons_Modules.psd b/extras/assets/icons/Icons_Modules.psd index 4fdcb5abc5..553449898a 100644 Binary files a/extras/assets/icons/Icons_Modules.psd and b/extras/assets/icons/Icons_Modules.psd differ diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Slideshow_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Slideshow_ca.png new file mode 100644 index 0000000000..f2b08a1746 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module/Icon_Module_Slideshow_ca.png differ diff --git a/optionals/compat_bwa3/CfgAmmo.hpp b/optionals/compat_bwa3/CfgAmmo.hpp index 599651ac10..c19e00819a 100644 --- a/optionals/compat_bwa3/CfgAmmo.hpp +++ b/optionals/compat_bwa3/CfgAmmo.hpp @@ -3,6 +3,7 @@ class CfgAmmo { class B_556x45_Ball_Tracer_Red; class B_762x51_Tracer_Red; class B_127x99_Ball_Tracer_Red; + class GrenadeHand; class BWA3_B_556x45_Ball: B_556x45_Ball_Tracer_Red { ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -132,4 +133,10 @@ class CfgAmmo { ACE_muzzleVelocities[]={}; ACE_barrelLengths[]={}; }; + class BWA3_G_DM51A1: GrenadeHand { + ace_frag_metal = 296; + ace_frag_charge = 180; + ace_frag_gurney_c = 2930; // Gurney velocity constant for PETN + ace_frag_gurney_k = 1/2; // shape factor for a cylinder + }; }; \ No newline at end of file diff --git a/optionals/compat_bwa3/CfgMagazines.hpp b/optionals/compat_bwa3/CfgMagazines.hpp new file mode 100644 index 0000000000..bf43af6426 --- /dev/null +++ b/optionals/compat_bwa3/CfgMagazines.hpp @@ -0,0 +1,9 @@ +class CfgMagazines { + class CA_Magazine; + class BWA3_200Rnd_556x45: CA_Magazine { + ACE_isBelt = 1; + }; + class BWA3_120Rnd_762x51: CA_Magazine { + ACE_isBelt = 1; + }; +}; \ No newline at end of file diff --git a/optionals/compat_bwa3/CfgWeapons.hpp b/optionals/compat_bwa3/CfgWeapons.hpp index 731396ed73..c0acea9912 100644 --- a/optionals/compat_bwa3/CfgWeapons.hpp +++ b/optionals/compat_bwa3/CfgWeapons.hpp @@ -2,6 +2,7 @@ class CfgWeapons { class Pistol_Base_F; class Rifle_Base_F; class Rifle_Long_Base_F; + class UGL_F; class BWA3_P8: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=108; @@ -30,6 +31,13 @@ class CfgWeapons { ACE_barrelTwist=304.8; ACE_barrelLength=406; }; + class BWA3_G27_AG: BWA3_G27 { + class AG40: UGL_F { + magazines[] += { + "ACE_HuntIR_M203" + }; + }; + }; class BWA3_MG4: Rifle_Long_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=480; @@ -42,7 +50,11 @@ class CfgWeapons { ACE_barrelTwist=381.0; ACE_barrelLength=736.7; }; - + class AG40: UGL_F { + magazines[] += { + "ACE_HuntIR_M203" + }; + }; class optic_Hamr; class InventoryOpticsItem_Base_F; diff --git a/optionals/compat_bwa3/config.cpp b/optionals/compat_bwa3/config.cpp index e1ca37d121..efdebaf616 100644 --- a/optionals/compat_bwa3/config.cpp +++ b/optionals/compat_bwa3/config.cpp @@ -13,3 +13,4 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgWeapons.hpp" +#include "CfgMagazines.hpp" diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index d5ab60f3eb..5d1eea96d3 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -95,13 +95,13 @@ class CfgWeapons class H_CrewHelmetHeli_B; class rhsusf_hgu56p: H_PilotHelmetHeli_B { - ace_hearing_protection = 0.75; - ace_hearing_lowerVolume = 0.70; + ace_hearing_protection = 0.85; + ace_hearing_lowerVolume = 0.75; }; class rhsusf_hgu56p_mask: H_CrewHelmetHeli_B { - ace_hearing_protection = 0.75; - ace_hearing_lowerVolume = 0.70; + ace_hearing_protection = 0.85; + ace_hearing_lowerVolume = 0.75; }; class H_HelmetB; diff --git a/optionals/tracers/CfgAmmo.hpp b/optionals/tracers/CfgAmmo.hpp index 7155087627..a432be3286 100644 --- a/optionals/tracers/CfgAmmo.hpp +++ b/optionals/tracers/CfgAmmo.hpp @@ -1,217 +1,159 @@ class CfgAmmo { - class B_556x45_Ball; - class B_556x45_Ball_Tracer_Red : B_556x45_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_556x45_Ball_Tracer_Green : B_556x45_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_556x45_Ball_Tracer_Yellow : B_556x45_Ball { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Green { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_65x39_Case; - class B_65x39_Case_green: B_65x39_Case { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_65x39_Case_yellow: B_65x39_Case { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_65x39_Caseless; - class B_65x39_Caseless_green: B_65x39_Caseless { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_65x39_Caseless_yellow: B_65x39_Caseless { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_762x51_Ball; - class B_762x51_Tracer_Red: B_762x51_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_762x51_Tracer_Green: B_762x51_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_762x51_Tracer_Yellow: B_762x51_Ball { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_762x54_Ball; - class B_762x54_Tracer_Red: B_762x54_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_762x54_Tracer_Green: B_762x54_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_762x54_Tracer_Yellow: B_762x54_Ball { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class ACE_762x39_Ball_57N231P : B_762x54_Tracer_Green { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_9x21_Ball; - class B_9x21_Ball_Tracer_Green: B_9x21_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_127x99_Ball; - class B_127x99_Ball_Tracer_Red: B_127x99_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_127x99_Ball_Tracer_Green: B_127x99_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_127x99_Ball_Tracer_Yellow: B_127x99_Ball { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_127x99_SLAP; - class B_127x99_SLAP_Tracer_Red: B_127x99_SLAP { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_127x99_SLAP_Tracer_Green: B_127x99_SLAP { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_127x99_SLAP_Tracer_Yellow: B_127x99_SLAP { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_30mm_HE; - class B_30mm_HE_Tracer_Red: B_30mm_HE { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_30mm_HE_Tracer_Green: B_30mm_HE { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_30mm_HE_Tracer_Yellow: B_30mm_HE { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class B_40mm_GPR; - class B_40mm_GPR_Tracer_Red: B_40mm_GPR { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_40mm_GPR_Tracer_Green: B_40mm_GPR { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_40mm_GPR_Tracer_Yellow: B_40mm_GPR { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class B_20mm; - class B_20mm_Tracer_Red: B_20mm { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_30mm_AP; - class B_30mm_AP_Tracer_Red: B_30mm_AP { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_30mm_AP_Tracer_Green: B_30mm_AP { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_30mm_AP_Tracer_Yellow: B_30mm_AP { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class B_30mm_APFSDS; - class B_30mm_APFSDS_Tracer_Red: B_30mm_APFSDS { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_30mm_APFSDS_Tracer_Green: B_30mm_APFSDS { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_30mm_APFSDS_Tracer_Yellow: B_30mm_APFSDS { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class B_35mm_AA; - class B_35mm_AA_Tracer_Red: B_35mm_AA { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_35mm_AA_Tracer_Green: B_35mm_AA { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_35mm_AA_Tracer_Yellow: B_35mm_AA { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class Sh_120mm_HE; - class Sh_120mm_HE_Tracer_Red: Sh_120mm_HE { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_120mm_HE_Tracer_Green: Sh_120mm_HE { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_120mm_HE_Tracer_Yellow: Sh_120mm_HE { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; - class Sh_120mm_APFSDS; - class Sh_120mm_APFSDS_Tracer_Red: Sh_120mm_APFSDS { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_120mm_APFSDS_Tracer_Green: Sh_120mm_APFSDS { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_120mm_APFSDS_Tracer_Yellow: Sh_120mm_APFSDS { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class BulletBase; + class ShellBase; class SubmunitionBullet; - class B_762x51_Minigun_Tracer_Red: SubmunitionBullet { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_762x51_Minigun_Tracer_Yellow: B_762x51_Minigun_Tracer_Red { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_762x51_Minigun_Tracer_Red_splash: B_762x51_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_762x51_Minigun_Tracer_Yellow_splash: B_762x51_Minigun_Tracer_Red_splash { - model = PATHTOF(ace_TracerYellow2.p3d); - }; + + //No idea + class B_56x15_dual: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + + //Pistol + class B_9x21_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_9x21_Ball_Tracer_Green: B_9x21_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + class B_45ACP_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_45ACP_Ball_Green: B_45ACP_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_45ACP_Ball_Yellow: B_45ACP_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + //Assault rifle + class B_556x45_Ball: BulletBase {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class B_556x45_Ball_Tracer_Red: B_556x45_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_556x45_Ball_Tracer_Green: B_556x45_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_556x45_Ball_Tracer_Yellow: B_556x45_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_65x39_Caseless: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_65x39_Caseless_green: B_65x39_Caseless {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_65x39_Caseless_yellow: B_65x39_Caseless {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_65x39_Case; + class B_65x39_Case_green: B_65x39_Case {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_65x39_Case_yellow: B_65x39_Case {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_65x39_Minigun_Caseless: SubmunitionBullet {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_65x39_Minigun_Caseless_Red_splash; + class B_65x39_Minigun_Caseless_Yellow_splash: B_65x39_Minigun_Caseless_Red_splash {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class B_65x39_Minigun_Caseless_Green_splash: B_65x39_Minigun_Caseless_Red_splash {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + //Battle rifle + class B_762x51_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_762x51_Tracer_Red: B_762x51_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_762x51_Tracer_Green: B_762x51_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_762x51_Tracer_Yellow: B_762x51_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_762x51_Minigun_Tracer_Red: SubmunitionBullet {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_762x51_Minigun_Tracer_Red_splash: B_762x51_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + + class B_762x51_Minigun_Tracer_Yellow: B_762x51_Minigun_Tracer_Red {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class B_762x51_Minigun_Tracer_Yellow_splash: B_762x51_Minigun_Tracer_Red_splash {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_762x54_Ball; + class B_762x54_Tracer_Red: B_762x54_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_762x54_Tracer_Green: B_762x54_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_762x54_Tracer_Yellow: B_762x54_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + //Sniper rifle + class B_127x99_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_127x99_Ball_Tracer_Red: B_127x99_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_127x99_Ball_Tracer_Green: B_127x99_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_127x99_Ball_Tracer_Yellow: B_127x99_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_127x99_SLAP; + class B_127x99_SLAP_Tracer_Red: B_127x99_SLAP {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_127x99_SLAP_Tracer_Green: B_127x99_SLAP {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_127x99_SLAP_Tracer_Yellow: B_127x99_SLAP {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_408_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_127x33_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + class B_127x108_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + class B_338_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + + class B_338_NM_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + + class B_127x54_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + class B_93x64_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + //Autocannon + class B_19mm_HE: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + + class B_30mm_HE; + class B_30mm_HE_Tracer_Red: B_30mm_HE {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_30mm_HE_Tracer_Green: B_30mm_HE {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_30mm_HE_Tracer_Yellow: B_30mm_HE {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_30mm_MP; + class B_30mm_MP_Tracer_Red: B_30mm_MP {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_30mm_MP_Tracer_Green: B_30mm_MP {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_30mm_MP_Tracer_Yellow: B_30mm_MP {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_40mm_GPR; + class B_40mm_GPR_Tracer_Red: B_40mm_GPR {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_40mm_GPR_Tracer_Green: B_40mm_GPR {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_40mm_GPR_Tracer_Yellow: B_40mm_GPR {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_20mm: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_20mm_Tracer_Red: B_20mm {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + + class B_25mm: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + + class B_30mm_AP: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_30mm_AP_Tracer_Red: B_30mm_AP {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_30mm_AP_Tracer_Green: B_30mm_AP {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_30mm_AP_Tracer_Yellow: B_30mm_AP {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_30mm_APFSDS; + class B_30mm_APFSDS_Tracer_Red: B_30mm_APFSDS {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_30mm_APFSDS_Tracer_Green: B_30mm_APFSDS {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_30mm_APFSDS_Tracer_Yellow: B_30mm_APFSDS {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_40mm_APFSDS; + class B_40mm_APFSDS_Tracer_Red: B_40mm_APFSDS {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_40mm_APFSDS_Tracer_Green: B_40mm_APFSDS {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_40mm_APFSDS_Tracer_Yellow: B_40mm_APFSDS {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_35mm_AA: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_35mm_AA_Tracer_Red: B_35mm_AA {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_35mm_AA_Tracer_Green: B_35mm_AA {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_35mm_AA_Tracer_Yellow: B_35mm_AA {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red.p3d + class Cannon_30mm_HE_Plane_CAS_02_F: Gatling_30mm_HE_Plane_CAS_01_F {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green.p3d + + //Cannon + class Sh_120mm_HE: ShellBase {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_white + class Sh_120mm_HE_Tracer_Red: Sh_120mm_HE {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_120mm_HE_Tracer_Green: Sh_120mm_HE {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_120mm_HE_Tracer_Yellow: Sh_120mm_HE {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + + class Sh_120mm_APFSDS: ShellBase {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_white + class Sh_120mm_APFSDS_Tracer_Red: Sh_120mm_APFSDS {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_120mm_APFSDS_Tracer_Green: Sh_120mm_APFSDS {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_120mm_APFSDS_Tracer_Yellow: Sh_120mm_APFSDS {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_125mm_APFSDS; - class Sh_125mm_APFSDS_T_Red: Sh_125mm_APFSDS { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_125mm_APFSDS_T_Green: Sh_125mm_APFSDS { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_125mm_APFSDS_T_Yellow: Sh_125mm_APFSDS { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class Sh_125mm_APFSDS_T_Red: Sh_125mm_APFSDS {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_125mm_APFSDS_T_Green: Sh_125mm_APFSDS {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_125mm_APFSDS_T_Yellow: Sh_125mm_APFSDS {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_125mm_HE; - class Sh_125mm_HE_T_Red: Sh_125mm_HE { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_125mm_HE_T_Green: Sh_125mm_HE { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_125mm_HE_T_Yellow: Sh_125mm_HE { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class Sh_125mm_HE_T_Red: Sh_125mm_HE {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_125mm_HE_T_Green: Sh_125mm_HE {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_125mm_HE_T_Yellow: Sh_125mm_HE {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_125mm_HEAT; - class Sh_125mm_HEAT_T_Red: Sh_125mm_HEAT { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_125mm_HEAT_T_Green: Sh_125mm_HEAT { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_125mm_HEAT_T_Yellow: Sh_125mm_HEAT { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class Sh_125mm_HEAT_T_Red: Sh_125mm_HEAT {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_125mm_HEAT_T_Green: Sh_125mm_HEAT {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_125mm_HEAT_T_Yellow: Sh_125mm_HEAT {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_105mm_APFSDS; - class Sh_105mm_APFSDS_T_Red: Sh_105mm_APFSDS { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_105mm_APFSDS_T_Green: Sh_105mm_APFSDS { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_105mm_APFSDS_T_Yellow: Sh_105mm_APFSDS { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class Sh_105mm_APFSDS_T_Red: Sh_105mm_APFSDS {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_105mm_APFSDS_T_Green: Sh_105mm_APFSDS {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_105mm_APFSDS_T_Yellow: Sh_105mm_APFSDS {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_105mm_HEAT_MP; - class Sh_105mm_HEAT_MP_T_Red: Sh_105mm_HEAT_MP { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_105mm_HEAT_MP_T_Green: Sh_105mm_HEAT_MP { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_105mm_HEAT_MP_T_Yellow: Sh_105mm_HEAT_MP { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; -}; + class Sh_105mm_HEAT_MP_T_Red: Sh_105mm_HEAT_MP {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_105mm_HEAT_MP_T_Green: Sh_105mm_HEAT_MP {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_105mm_HEAT_MP_T_Yellow: Sh_105mm_HEAT_MP {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow +}; \ No newline at end of file