Skip to content

Commit

Permalink
Merge branch 'master' into feature/spg9-backblast
Browse files Browse the repository at this point in the history
  • Loading branch information
mrschick committed Sep 25, 2024
2 parents 7e1d864 + ca3aa3f commit 9586765
Show file tree
Hide file tree
Showing 535 changed files with 8,474 additions and 4,457 deletions.
1 change: 1 addition & 0 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ jobs:
with:
name: ace3-${{ github.sha }}-nobin
path: .hemttout/@*
include-hidden-files: true # Because .hemttout is a hidden directory
2 changes: 1 addition & 1 deletion .github/workflows/extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Build
run: cargo build --verbose
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.arrays.os.target }}
path: target/debug/ace.dll
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/hemtt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ jobs:
with:
name: ace3-${{ github.sha }}
path: .hemttout/@*
include-hidden-files: true # Because .hemttout is a hidden directory
31 changes: 31 additions & 0 deletions .hemtt/launch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[default]
workshop = [
"450814997", # CBA_A3
]

[spe]
extends = "default"
dlc = [
"Spearhead 1944"
]

[vn]
extends = "default"
dlc = [
"S.O.G. Prairie Fire",
]

[ws]
extends = "default"
dlc = [
"Western Sahara",
]

[rhs]
extends = "default"
workshop = [
"843425103", # RHS AFRF Workshop ID
"843577117", # RHS USAF Workshop ID
"843593391", # RHS GREF Workshop ID
"843632231", # RHS SAF Workshop ID
]
5 changes: 5 additions & 0 deletions .hemtt/lints.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[sqf.banned_commands]
options.ignore = [
"addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax
"createSoundSource", # Greatly attenuated when in first person and in a vehicle
]
32 changes: 0 additions & 32 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,3 @@ exclude = [
"common/functions/fnc_dummy.sqf",
"zeus/functions/fnc_zeusAttributes.sqf",
]

[hemtt.launch.default]
workshop = [
"450814997", # CBA_A3
]

[hemtt.launch.spe]
extends = "default"
dlc = [
"spe"
]

[hemtt.launch.vn]
extends = "default"
dlc = [
"S.O.G. Prairie Fire",
]

[hemtt.launch.ws]
extends = "default"
dlc = [
"Western Sahara",
]

[hemtt.launch.rhs]
extends = "default"
workshop = [
"843425103", # RHS AFRF Workshop ID
"843577117", # RHS USAF Workshop ID
"843593391", # RHS GREF Workshop ID
"843632231", # RHS SAF Workshop ID
]
72 changes: 59 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
- Carrying and dragging
- Realistic names for vehicles and weapons
- A fire control system (FCS) for armored vehicles and helicopters
- Realistic ballistics/FCS calculated in C/C++ extensions
- Realistic ballistics/FCS calculated in Rust extensions
- Backblast area and overpressure simulation
- Disposable launchers
- Realistic G-forces
Expand Down
Binary file modified ace.dll
Binary file not shown.
Binary file modified ace_x64.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ GVAR(Protractor) = true;
__ctrl1 ctrlSetTextColor [1, 1, 1, 1];

__ctrl2 ctrlSetScale 1;
__ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3];
__ctrl2 ctrlSetPosition [safeZoneX + 0.001, safeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3];
__ctrl2 ctrlCommit 0;
__ctrl2 ctrlSetText QPATHTOF(UI\protractor_marker.paa);
__ctrl2 ctrlSetTextColor [1, 1, 1, 1];
Expand Down
32 changes: 29 additions & 3 deletions addons/advanced_fatigue/CfgEden.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,35 @@ class Cfg3DEN {
class Attributes {
class Slider;
class GVAR(slider): Slider {
attributeLoad = "params [""_ctrlGroup""]; private _slider = _ctrlGroup controlsGroupCtrl 100; private _edit = _ctrlGroup controlsGroupCtrl 101; _slider sliderSetPosition _value; _edit ctrlSetText ([_value, 1, 1] call CBA_fnc_formatNumber); ";
attributeSave = "params [""_ctrlGroup""]; sliderPosition (_ctrlGroup controlsGroupCtrl 100); ";
onLoad = "params [""_ctrlGroup""]; private _slider = _ctrlGroup controlsGroupCtrl 100; private _edit = _ctrlGroup controlsGroupCtrl 101; _slider sliderSetRange [0, 2]; _slider ctrlAddEventHandler [""SliderPosChanged"", { params [""_slider""]; private _edit = (ctrlParentControlsGroup _slider) controlsGroupCtrl 101; private _value = sliderPosition _slider; _edit ctrlSetText ([_value, 1, 1] call CBA_fnc_formatNumber); }]; _edit ctrlAddEventHandler [""KillFocus"", { params [""_edit""]; private _slider = (ctrlParentControlsGroup _edit) controlsGroupCtrl 100; private _value = ((parseNumber ctrlText _edit) min 2) max 0; _slider sliderSetPosition _value; _edit ctrlSetText str _value; }];";
#pragma hemtt suppress pw3_padded_arg
attributeLoad = QUOTE(\
params ['_ctrlGroup']; \
private _slider = _ctrlGroup controlsGroupCtrl 100; \
private _edit = _ctrlGroup controlsGroupCtrl 101; \
_slider sliderSetPosition _value; \
_edit ctrlSetText ([ARR_3(_value,1,1)] call CBA_fnc_formatNumber); \
);
attributeSave = QUOTE(params ['_ctrlGroup']; sliderPosition (_ctrlGroup controlsGroupCtrl 100));
#pragma hemtt suppress pw3_padded_arg
onLoad = QUOTE(\
params ['_ctrlGroup']; \
private _slider = _ctrlGroup controlsGroupCtrl 100; \
private _edit = _ctrlGroup controlsGroupCtrl 101; \
_slider sliderSetRange [ARR_2(0,MAX_PERFORMANCE_FACTOR)]; \
_slider ctrlAddEventHandler [ARR_2('SliderPosChanged',{ \
params ['_slider']; \
private _edit = (ctrlParentControlsGroup _slider) controlsGroupCtrl 101; \
private _value = sliderPosition _slider; \
_edit ctrlSetText ([ARR_3(_value,1,1)] call CBA_fnc_formatNumber); \
})]; \
_edit ctrlAddEventHandler [ARR_2('KillFocus',{ \
params ['_edit']; \
private _slider = (ctrlParentControlsGroup _edit) controlsGroupCtrl 100; \
private _value = ((parseNumber ctrlText _edit) min MAX_PERFORMANCE_FACTOR) max 0; \
_slider sliderSetPosition _value; \
_edit ctrlSetText str _value; \
})]; \
);
};
};
class Object {
Expand Down
12 changes: 6 additions & 6 deletions addons/advanced_fatigue/Dialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ class RscControlsGroupNoScrollbars;
class RscPicture;

class GVAR(StaminaBarContainer): RscControlsGroupNoScrollbars {
x = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_X"", ((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40))])";
y = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_Y"", (safezoneY + 4.05 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_X"", ((safeZoneX + safeZoneW) - (10 * (((safeZoneW / safeZoneH) min 1.2) / 40)) - 4.3 * (((safeZoneW / safeZoneH) min 1.2) / 40))])";
y = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_Y"", (safeZoneY + 4.05 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))])";
w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)";
h = "0.15 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)";

class Controls {
class StaminaBar: RscPicture {
idc = 10;
x = 0;
y = 0;
w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)";
h = "0.15 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)";
text = "\A3\Ui_f\data\IGUI\RscIngameUI\RscUnitInfo\stamina_ca.paa";
};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_fatigue/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PREP_RECOMPILE_END;

#include "initSettings.inc.sqf"

GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40);
GVAR(staminaBarWidth) = 10 * (((safeZoneW / safeZoneH) min 1.2) / 40);
GVAR(dutyList) = createHashMap;
GVAR(setAnimExclusions) = [];
GVAR(inertia) = 0;
Expand Down
15 changes: 12 additions & 3 deletions addons/advanced_fatigue/functions/fnc_mainLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@ if (!alive ACE_player) exitWith {
private _velocity = velocity ACE_player;
private _normal = surfaceNormal (getPosWorld ACE_player);
private _movementVector = vectorNormalized _velocity;
private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal);
private _fwdAngle = asin (_movementVector select 2);
private _sideAngle = asin (_sideVector select 2);
private _sideAngle = if ((getPosATL ACE_player) select 2 > 0.01) then {
0 // ignore terrain normal if not touching it
} else {
private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal);
asin (_sideVector select 2);
};
if (GVAR(isSwimming)) then { // ignore when floating
_fwdAngle = 0;
_sideAngle = 0;
};


private _currentWork = REE;
private _currentSpeed = (vectorMagnitude _velocity) min 6;
Expand Down Expand Up @@ -62,7 +71,7 @@ if (isNull objectParent ACE_player && {_currentSpeed > 0.1} && {isTouchingGround
};

// Used to simulate the unevenness/roughness of the terrain
if ((getPosATL ACE_player) select 2 < 0.01) then {
if (_sideAngle != 0) then {
private _sideGradient = abs (_sideAngle / 45) min 1;

_terrainFactor = 1 + _sideGradient ^ 4;
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_fatigue/initSettings.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"SLIDER",
[LSTRING(PerformanceFactor), LSTRING(PerformanceFactor_Description)],
LSTRING(DisplayName),
[0, 10, 1, 2],
[0, MAX_PERFORMANCE_FACTOR, 1, 2],
1,
{
// Recalculate values if the setting is changed mid-mission
Expand Down
2 changes: 2 additions & 0 deletions addons/advanced_fatigue/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@
#define AE1_MAXRESERVE 4000000 // mmol
#define AE2_MAXRESERVE 84000 // mmol
#define AN_MAXRESERVE 2300 // mmol

#define MAX_PERFORMANCE_FACTOR 10
2 changes: 1 addition & 1 deletion addons/advanced_throwing/functions/fnc_throw.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ GVAR(flightPath) = [];
GVAR(flightRotation) = [];
(_unit getVariable QGVAR(activeThrowable)) spawn {
while {!isNull _this && {(getPosATL _this) select 2 > 0.05}} do {
GVAR(flightPath) pushBack [ASLtoAGL (getPosASL _this), vectorUp _this];
GVAR(flightPath) pushBack [ASLToAGL (getPosASL _this), vectorUp _this];
sleep 0.05;
};
};
Expand Down
8 changes: 4 additions & 4 deletions addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ if (isNull findDisplay 312) exitWith {
removeMissionEventHandler ["Draw3D", _thisEventHandler];
};

private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
private _unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []];

{
_x params ["_unit", "_pos"];

switch (true) do {
case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
for "_i" from 0 to 3 do {
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]];
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLToASL _pos), [1,0,0,1]];
};
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLToASL _pos), 0.75, 0.75, 0.75];
};

case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
Expand All @@ -43,7 +43,7 @@ private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveLis
for "_i" from 0 to 3 do {
drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]];
};
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLToASL _pos), 0.75, 0.75, 0.75];
};

case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
Expand Down
Loading

0 comments on commit 9586765

Please sign in to comment.