Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into advancedDiagnose-…
Browse files Browse the repository at this point in the history
…default-setting
  • Loading branch information
OverlordZorn committed Dec 15, 2024
2 parents 97462eb + 472f919 commit 67ad378
Show file tree
Hide file tree
Showing 63 changed files with 1,560 additions and 74 deletions.
2 changes: 2 additions & 0 deletions addons/common/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ PREP(getGunner);
PREP(getInPosition);
PREP(getItemReplacements);
PREP(getLocalUnits);
PREP(getMagneticBearing);
PREP(getMagneticBearingOffset);
PREP(getMapData);
PREP(getMapGridData);
PREP(getMapGridFromPos);
Expand Down
23 changes: 23 additions & 0 deletions addons/common/functions/fnc_getMagneticBearing.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Returns magnetic heading (0..360)
*
* Arguments:
* 0: Object or Bearing <OBJECT><NUMBER> (default: ACE_player)
*
* Return Value:
* Compass Bearing <NUMBER>
*
* Example:
* [player] call ace_common_fnc_getMagneticBearing
*
* Public: Yes
*/

params [["_source", ACE_player, [objNull, 0]]];

[
(if (_source isEqualType 0) then { _source } else { getDir _source })
+ (missionNamespace getVariable [QGVAR(magneticDeclinationOffset), 0])
] call CBA_fnc_simplifyAngle;
152 changes: 152 additions & 0 deletions addons/common/functions/fnc_getMagneticBearingOffset.sqf

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions addons/common/initSettings.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ private _categorySway = [_category, LSTRING(subcategory_sway)];
0
] call CBA_fnc_addSetting;

[
QGVAR(magneticDeclination),
"CHECKBOX",
[LSTRING(magneticDeclination), LSTRING(magneticDeclinationooltip)],
_category,
false,
1,
{call FUNC(getMagneticBearingOffset)}
] call CBA_fnc_addSetting;

[
QGVAR(enableSway),
"CHECKBOX",
Expand Down
6 changes: 6 additions & 0 deletions addons/common/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,12 @@
<Chinesesimp>装载</Chinesesimp>
<Turkish>Yükle</Turkish>
</Key>
<Key ID="STR_ACE_Common_magneticDeclination">
<English>Realistic Compass Declination</English>
</Key>
<Key ID="STR_ACE_Common_magneticDeclinationooltip">
<English>Compass will point to magnetic north</English>
</Key>
<Key ID="STR_ACE_Common_playerOnly">
<English>Players only</English>
<Czech>Pouze hráči</Czech>
Expand Down
1 change: 1 addition & 0 deletions addons/compat_ef/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\ace\addons\compat_ef
37 changes: 37 additions & 0 deletions addons/compat_ef/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
class CfgWeapons {
// -- ace_nightvision --
class NVGoggles;
class EF_LPNVG: NVGoggles { // all 4 inherit from this
EGVAR(nightvision,generation) = 4;
EGVAR(nightvision,colorPreset)[] = {0,{0,0,0,0},{0.7,0.65,0.4,0},{0.199,1.3,0.114,1}};
EGVAR(nightvision,border) = QPATHTOEF(nightvision,data\nvg_mask_binos_4096.paa);
};

// -- ace_hearing --
class HelmetBase;
class EF_H_Protecta: HelmetBase {
HEARING_PROTECTION_PELTOR;
};
class EF_H_MCH; // this does not have peltor
class EF_H_MCH_Basic: EF_H_MCH {
HEARING_PROTECTION_PELTOR;
};
class EF_H_MCH_BasicNet_Des: EF_H_MCH {
HEARING_PROTECTION_PELTOR;
};
class EF_H_MCH_Full: EF_H_MCH {
HEARING_PROTECTION_PELTOR;
};
class EF_H_MCH_FullCamo_Des: EF_H_MCH {
HEARING_PROTECTION_PELTOR;
};

// -- ace_overpressure --
class autocannon_30mm;
class EF_autocannon_50mm_AAV9: autocannon_30mm {
EGVAR(overpressure,priority) = 1;
EGVAR(overpressure,angle) = 90;
EGVAR(overpressure,range) = 5;
EGVAR(overpressure,damage) = 0.3;
};
};
17 changes: 17 additions & 0 deletions addons/compat_ef/compat_ef_realisticnames/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class CfgVehicles {
class MRAP_01_gmg_base_F;
class EF_MRAP_01_FSV_base: MRAP_01_gmg_base_F {
displayName = SUBCSTRING(MRAP_01_FSV);
};
class EF_MRAP_01_AT_base: EF_MRAP_01_FSV_base {
displayName = SUBCSTRING(MRAP_01_AT);
};
class EF_MRAP_01_LAAD_base: EF_MRAP_01_FSV_base {
displayName = SUBCSTRING(MRAP_01_LAAD);
};

class Heli_Attack_01_dynamicLoadout_base_F;
class EF_AH99J_dynamicLoadout_base: Heli_Attack_01_dynamicLoadout_base_F {
displayName = SUBCSTRING(AH99J);
};
};
18 changes: 18 additions & 0 deletions addons/compat_ef/compat_ef_realisticnames/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "script_component.hpp"

class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"EF_hunter", "EF_ah99", "ace_realisticnames"};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
url = ECSTRING(main,URL);
VERSION_CONFIG;
addonRootClass = QUOTE(ADDON);
};
};

#include "CfgVehicles.hpp"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define SUBCOMPONENT realisticnames
#define SUBCOMPONENT_BEAUTIFIED Realistic Names
#include "..\script_component.hpp"
73 changes: 73 additions & 0 deletions addons/compat_ef/compat_ef_realisticnames/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Compat_EF_RealisticNames">
<Key ID="STR_ACE_Compat_EF_RealisticNames_MRAP_01_AT">
<English>M-ATV AT</English>
<Czech>M-ATV AT</Czech>
<French>M-ATV AC</French>
<Spanish>M-ATV AT</Spanish>
<Italian>M-ATV AC</Italian>
<Polish>M-ATV ppanc</Polish>
<Portuguese>M-ATV AT</Portuguese>
<Russian>M-ATV ПТ</Russian>
<German>M-ATV AT</German>
<Korean>M-ATV AT</Korean>
<Japanese>M-ATV AT</Japanese>
<Chinese>防地雷反伏擊全地形車 AT</Chinese>
<Chinesesimp>M-ATV AT</Chinesesimp>
<Turkish>M-ATV AT</Turkish>
<Hungarian>M-ATV AT</Hungarian>
</Key>
<Key ID="STR_ACE_Compat_EF_RealisticNames_MRAP_01_FSV">
<English>M-ATV FSV</English>
<Czech>M-ATV FSV</Czech>
<French>M-ATV FSV</French>
<Spanish>M-ATV FSV</Spanish>
<Italian>M-ATV FSV</Italian>
<Polish>M-ATV FSV</Polish>
<Portuguese>M-ATV FSV</Portuguese>
<Russian>M-ATV FSV</Russian>
<German>M-ATV FSV</German>
<Korean>M-ATV FSV</Korean>
<Japanese>M-ATV FSV</Japanese>
<Chinese>防地雷反伏擊全地形車 FSV</Chinese>
<Chinesesimp>M-ATV FSV</Chinesesimp>
<Turkish>M-ATV FSV</Turkish>
<Hungarian>M-ATV FSV</Hungarian>
</Key>
<Key ID="STR_ACE_Compat_EF_RealisticNames_MRAP_01_LAAD">
<English>M-ATV LAAD</English>
<Czech>M-ATV LAAD</Czech>
<French>M-ATV LAAD</French>
<Spanish>M-ATV LAAD</Spanish>
<Italian>M-ATV LAAD</Italian>
<Polish>M-ATV LAAD</Polish>
<Portuguese>M-ATV LAAD</Portuguese>
<Russian>M-ATV LAAD</Russian>
<German>M-ATV LAAD</German>
<Korean>M-ATV LAAD</Korean>
<Japanese>M-ATV LAAD</Japanese>
<Chinese>防地雷反伏擊全地形車 LAAD</Chinese>
<Chinesesimp>M-ATV LAAD</Chinesesimp>
<Turkish>M-ATV LAAD</Turkish>
<Hungarian>M-ATV LAAD</Hungarian>
</Key>
<Key ID="STR_ACE_Compat_EF_RealisticNames_AH99J">
<English>RAH-66J Comanche</English>
<Czech>RAH-66J Comanche</Czech>
<French>RAH-66J Comanche</French>
<Spanish>RAH-66J Comanche</Spanish>
<Italian>RAH-66J Comanche</Italian>
<Polish>RAH-66J Comanche</Polish>
<Portuguese>RAH-66J Comanche</Portuguese>
<Russian>RAH-66J Comanche</Russian>
<German>RAH-66J Comanche</German>
<Korean>RAH-66J 코만치</Korean>
<Japanese>RAH-66J コマンチ</Japanese>
<Chinese>RAH-66J "卡曼契"攻擊直升機</Chinese>
<Chinesesimp>RAH-66J "科曼奇"</Chinesesimp>
<Turkish>RAH-66J Comanche</Turkish>
<Hungarian>RAH-66J Comanche</Hungarian>
</Key>
</Package>
</Project>
18 changes: 18 additions & 0 deletions addons/compat_ef/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "script_component.hpp"
#include "\z\ace\addons\hearing\script_macros_hearingProtection.hpp"

class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common", "EF_Weapons", "EF_Marines"};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

#include "CfgWeapons.hpp"
9 changes: 9 additions & 0 deletions addons/compat_ef/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#define COMPONENT compat_ef
#define COMPONENT_BEAUTIFIED Expeditionary Forces Compatibility

#include "\z\ace\addons\main\script_mod.hpp"

// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE

#include "\z\ace\addons\main\script_macros.hpp"
2 changes: 2 additions & 0 deletions addons/cookoff/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "script_component.hpp"

GVAR(flareHash) = createHashMap;

[QGVAR(cookOffBoxLocal), LINKFUNC(cookOffBoxLocal)] call CBA_fnc_addEventHandler;
[QGVAR(cookOffLocal), LINKFUNC(cookOffLocal)] call CBA_fnc_addEventHandler;
[QGVAR(engineFireLocal), LINKFUNC(engineFireLocal)] call CBA_fnc_addEventHandler;
Expand Down
2 changes: 1 addition & 1 deletion addons/cookoff/functions/fnc_detonateAmmunitionServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ _object setVariable [QGVAR(isAmmoDetonating), true, true];
_object setVariable [QGVAR(virtualMagazines), nil];

// Save the vehicle's ammo, so it won't be removed during cook-off
if (!GVAR(removeAmmoDuringCookoff)) then {
if (!alive _object || !GVAR(removeAmmoDuringCookoff)) then {
_object setVariable [QGVAR(cookoffMagazines), [_object, true] call FUNC(getVehicleAmmo)];
};

Expand Down
4 changes: 4 additions & 0 deletions addons/cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ if (_removeAmmoDuringCookoff) then {
};
// Inventory magazines
case (_magazineInfo isEqualTo false): {
if (!alive _object) exitWith {
TRACE_1("clearing cargo mags from dead object",alive _object);
clearMagazineCargoGlobal _object;
};
// Remove selected magazine
_object addMagazineAmmoCargo [_magazineClassname, -1, _ammoCount];

Expand Down
6 changes: 4 additions & 2 deletions addons/cookoff/functions/fnc_isMagazineFlare.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

params ["_magazine"];

private _configAmmo = configFile >> "CfgAmmo" >> getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
GVAR(flareHash) getOrDefaultCall [_magazine, {
private _configAmmo = configFile >> "CfgAmmo" >> getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");

getNumber (_configAmmo >> "intensity") != 0 || {getNumber (_configAmmo >> QEGVAR(grenades,flare)) == 1}
getNumber (_configAmmo >> "intensity") != 0 || {getNumber (_configAmmo >> QEGVAR(grenades,flare)) == 1}
}, true]
4 changes: 3 additions & 1 deletion addons/dragging/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ class CBA_Extended_EventHandlers;

class CfgVehicles {
class C_man_1;
class GVAR(clone): C_man_1 {};
class GVAR(clone): C_man_1 {
scope = 1;
};

// Static weapons
class LandVehicle;
Expand Down
Binary file removed addons/dragging/anim/zDummy.rtm
Binary file not shown.
2 changes: 1 addition & 1 deletion addons/fastroping/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class CfgVehicles {

class Helicopter_Base_F;
class ACE_friesBase: Helicopter_Base_F {
destrType = "";
destrType = "DestructNo";
class Turrets {};
class ACE_Actions {};
class ACE_SelfActions {};
Expand Down
Binary file removed addons/field_rations/anim/zDummy.rtm
Binary file not shown.
16 changes: 16 additions & 0 deletions addons/fire/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@
[QGVAR(burnEffects), LINKFUNC(burnEffects)] call CBA_fnc_addEventHandler;
[QGVAR(burnSimulation), LINKFUNC(burnSimulation)] call CBA_fnc_addEventHandler;

// Make burning wrecks into fire sources
["AllVehicles", "Killed", {
params ["_vehicle", "", "", "_useEffects"];

if (_useEffects && {_vehicle getEntityInfo 13}) then {
[QGVAR(addFireSource), [
_vehicle,
(boundingBoxReal [_vehicle, "FireGeometry"]) select 2,
BURN_MAX_INTENSITY,
QGVAR(wreck) + hashValue _vehicle,
{_this getEntityInfo 13},
_vehicle
]] call CBA_fnc_serverEvent;
};
}, true, ["Man", "StaticWeapon"], true] call CBA_fnc_addClassEventHandler; // Use "Man" to exclude animals as well

[QGVAR(playScream), {
params ["_scream", "_source"];

Expand Down
Binary file removed addons/gestures/anim/zDummy.rtm
Binary file not shown.
Binary file removed addons/goggles/anim/zDummy.rtm
Binary file not shown.
2 changes: 1 addition & 1 deletion addons/intelitems/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CfgVehicles {
icon = "iconObject_2x3";
mapSize = 0.3;
simulation = "House"; // Needed because the objects don't have good collision physx
destrType = "DesturctNo";
destrType = "DestructNo";
curatorInfoTypeEmpty = QGVAR(RscSetData);
editorSubcategory = QUOTE(XADDON);
GVAR(magazine) = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ private _player = ACE_player;
if ((_origActionData select 10) isNotEqualTo {}) then {
// It should, so make a copy and pass it to the modifierFunction
_origActionData = +_origActionData;
[_target, ACE_player, _origActionData select 6, _origActionData] call (_origActionData select 10);
private _actionParams = _origActionData select 6; // Define _actionParams so its accessible within the statement/condition
[_target, ACE_player, _actionParams, _origActionData] call (_origActionData select 10);
};

_origActionData params [
Expand Down
5 changes: 3 additions & 2 deletions addons/interact_menu/functions/fnc_keyUp.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ if (GVAR(actionSelected)) then {
private _savedThis = this;
this = GVAR(selectedTarget);

if ([_target, _player, _actionData select 6] call (_actionData select 4)) then {
private _actionParams = _actionData select 6; // Define _actionParams so its accessible within the statement/condition
if ([_target, _player, _actionParams] call (_actionData select 4)) then {
// Call the statement
[_target, _player, _actionData select 6] call (_actionData select 3);
[_target, _player, _actionParams] call (_actionData select 3);

// Clear the conditions caches again if the action was performed
[QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent;
Expand Down
5 changes: 3 additions & 2 deletions addons/interact_menu/functions/fnc_render.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ if (GVAR(openedMenuType) >= 0) then {

// Check the action conditions
private _actionData = GVAR(selectedAction) select 0;
if ([_target, _player, _actionData select 6] call (_actionData select 4)) then {
private _actionParams = _actionData select 6; // Define _actionParams so its accessible within the statement/condition
if ([_target, _player, _actionParams] call (_actionData select 4)) then {
// Call the statement
[_target, _player, _actionData select 6] call (_actionData select 3);
[_target, _player, _actionParams] call (_actionData select 3);

// Clear the conditions caches again if the action was performed
[QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent;
Expand Down
9 changes: 9 additions & 0 deletions addons/interaction/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,15 @@ class CfgVehicles {
statement = QUOTE([ARR_3(_player,_target,1)] call DFUNC(tapShoulder));
exceptions[] = {"isNotSwimming"};
};
class ACE_OpenBackpack {
displayName = "$STR_ACTION_OPEN_BAG";
position = QUOTE(call DFUNC(getBackpackPos));
distance = 3.0;
condition = QUOTE(call DFUNC(canOpenBackpack));
statement = QUOTE(_player action [ARR_2('OpenBag',_target)]);
modifierFunction = QUOTE(call FUNC(modifyOpenBackpackAction));
exceptions[] = {"isNotSwimming"};
};
};

class ACE_SelfActions {
Expand Down
Loading

0 comments on commit 67ad378

Please sign in to comment.