Skip to content

Commit

Permalink
Merge branch 'master' into tripflares
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Feb 23, 2025
2 parents cb9964f + 8fd3b4c commit 222c408
Show file tree
Hide file tree
Showing 1,062 changed files with 68,560 additions and 57,389 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Validate Config
run: python3 tools/config_style_checker.py
- name: Validate Stringtables
Expand All @@ -34,6 +32,8 @@ jobs:
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
with:
annotate: false
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
*.zip
release/*
releases/*
.vscode/*
hemtt
hemtt.exe
.hemttout
Expand Down
12 changes: 12 additions & 0 deletions .hemtt/launch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ dlc = [
"Western Sahara",
]

[rf]
extends = "default"
dlc = [
"Reaction Forces"
]

[gm]
extends = "default"
dlc = [
"Global Mobilization - Cold War Germany"
]

[rhs]
extends = "default"
workshop = [
Expand Down
33 changes: 33 additions & 0 deletions .hemtt/lints.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
[config.file_type]
options.allow_no_extension = true

[stringtables.usage]
options.ignore = [
"str_ace_repair_hit",
]
options.ignore_unused = true

[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
]

[sqf.var_all_caps]
options.ignore = [
"SLX_*", "ACE_*"
]

[sqf.banned_macros]
options.release = [
"DEBUG_MODE_FULL", "DISABLE_COMPILE_CACHE", "ENABLE_PERFORMANCE_COUNTERS"
]

[sqf.undefined]
enabled = true
options.check_orphan_code = true

[sqf.unused]
#enabled = true #many false positives without DEBUG_MODE_FULL
options.check_params = false

[sqf.shadowed]
enabled = false

[sqf.not_private]
enabled = true
File renamed without changes.
40 changes: 40 additions & 0 deletions .vscode/sqf.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"SQF Function Header": {
"description": "SQF function header",
"prefix": "header",
"body": [
"#include \"..\\script_component.hpp\"",
"/*",
" * Author: ${1:Author}",
" * ${2:Description}",
" *",
" * Arguments:",
" * ${8:0: ${9:Description} <${10|OBJECT,NUMBER,STRING,BOOL,ARRAY,CONTROL,DISPLAY,CONFIG,CODE,ANY,LOGIC,SIDE,GROUP,HASHMAP,NAMESPACE,LOCATION,TEXT|}>}$0",
" *",
" * Return Value:",
" * ${4:${5:Description} <${6|OBJECT,NUMBER,STRING,BOOL,ARRAY,CONTROL,DISPLAY,CONFIG,CODE,ANY,LOGIC,SIDE,GROUP,HASHMAP,NAMESPACE,LOCATION,TEXT|}>}",
" *",
" * Example:",
" * [$7] call ace_${TM_DIRECTORY/(.*)addons\\\\(.*)\\\\functions(.*)/$2/}_${TM_FILENAME_BASE}",
" *",
" * Public: ${3|No,Yes|}",
" */",
"",
""
],
},
"SQF Function Header Argument": {
"description": "SQF function header argument",
"prefix": "header_argument",
"body": [
"* ${1:1}: ${2:Description} <${3|OBJECT,NUMBER,STRING,BOOL,ARRAY,CONTROL,DISPLAY,CONFIG,CODE,ANY,LOGIC,SIDE,GROUP,HASHMAP,NAMESPACE,LOCATION,TEXT|}>",
],
},
"SQF Function Header Return Value": {
"description": "SQF function header return value",
"prefix": "header_return",
"body": [
"* ${1:Description} <${2|OBJECT,NUMBER,STRING,BOOL,ARRAY,CONTROL,DISPLAY,CONFIG,CODE,ANY,LOGIC,SIDE,GROUP,HASHMAP,NAMESPACE,LOCATION,TEXT|}>",
],
},
}
21 changes: 5 additions & 16 deletions tools/.vscode/tasks.json → .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Validate SQF",
"command": "${config:python.pythonPath}",
"options": {
"cwd": "${workspaceFolder}/tools"
},
"args": [
"sqf_validator.py"
]
},
{
"label": "Validate Config",
"command": "${config:python.pythonPath}",
Expand Down Expand Up @@ -81,7 +71,6 @@
"Validate Stringtables",
"Validate headers",
"Check Strings",
"SQFVM Checker",
"HEMTT check"
],
"group": {
Expand Down Expand Up @@ -117,9 +106,9 @@
"kind": "build",
"isDefault": true
}
}
},
{
"label": "Extension: x64",
"label": "Extension: make move_x64_release",
"command": "cargo",
"options": {
"cwd": "${workspaceFolder}"
Expand All @@ -131,9 +120,9 @@
"group": {
"kind": "build"
}
}
},
{
"label": "Extension: Release",
"label": "Extension: make release",
"command": "cargo",
"options": {
"cwd": "${workspaceFolder}"
Expand All @@ -147,4 +136,4 @@
}
}
]
}
}
2 changes: 2 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Barman75
Bla1337
BlackPixxel <[email protected]>
BlackQwar
Bluefield <[email protected]>
Brakoviejo
Brisse <[email protected]>
Brostrom.A | Evul <[email protected]>
Expand Down Expand Up @@ -178,6 +179,7 @@ SzwedzikPL <[email protected]>
Tachi <[email protected]>
tbeswick96
Tessa Elieff <Fastroping Sound - CreativeCommons Attributions 3.0>
ThomasAngel
Timi007 <[email protected]>
Toaster <[email protected]>
Tonic
Expand Down
12 changes: 4 additions & 8 deletions addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define DEBUG_MODE_FULL
#include "..\script_component.hpp"
/*
* Author: esteldunedain
Expand Down Expand Up @@ -66,6 +65,10 @@ for "_i" from 0 to (count _cfgWeapons)-1 do {
_WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"];

private _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _vanillaInitialSpeed] call FUNC(calculateBarrelLengthVelocityShift);
if (_barrelLength > 0) then {
private _shiftedMV = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, 0] call FUNC(calculateBarrelLengthVelocityShift);
if (_shiftedMV == 0) then { ERROR_2("%1:%2 has length set but invalid mags",_weapon,_magazine)};
};
private _abInitialSpeed = _vanillaInitialSpeed + _barrelVelocityShift;
// --------------------------------------------------

Expand Down Expand Up @@ -113,13 +116,6 @@ for "_i" from 0 to (count _cfgWeapons)-1 do {
_weaponInitSpeeds pushBack (_abInitialSpeed / _magSpeed);
};
} forEach _data;
{
_x params ["_magazineIndex", "_abInitialSpeed", "_magazine", "_weapon"];
private _magIndex = _magazines find _magazine;
private _magSpeed = _magazineInitSpeeds select _magIndex;
private _wepIndex = _weapons find _weapon;
_wepSpeed = _weaponInitSpeeds select _wepIndex;
} forEach _data;
{
diag_log text format ["AB_WeaponInitSpeed,%1,%2", _x, _weaponInitSpeeds select _forEachIndex];
} forEach _weapons;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (GVAR(Protractor)) exitWith {
true
};
if (weaponLowered ACE_player) exitWith { false };
if (vehicle ACE_player != ACE_player) exitWith { false };
if (!isNull objectParent ACE_player) exitWith { false };
if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { false };

2 cutText ["", "PLAIN"];
Expand Down
1 change: 0 additions & 1 deletion addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* Public: No
*/

private _deleted = false;
{
_y params ["_bullet","_caliber","_bulletTraceVisible"];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ GVAR(currentGrid) = 0;
INFO_2("Starting Terrain Extension [cells: %1] [world: %2]",_gridCells,worldName);

[{
params ["_args","_idPFH"];
params ["_args", "_idPFH"];
_args params ["_mapGrids", "_gridCells", "_initStartTime"];

if (GVAR(currentGrid) >= _gridCells) exitWith {
Expand All @@ -57,12 +57,21 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]",_gridCells,worldName
for "_i" from 1 to 50 do {
private _x = floor(GVAR(currentGrid) / _mapGrids) * 50;
private _y = (GVAR(currentGrid) - floor(GVAR(currentGrid) / _mapGrids) * _mapGrids) * 50;

private _gridCenter = [_x + 25, _y + 25];
private _gridHeight = round(getTerrainHeightASL _gridCenter);
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
"ace" callExtension ["ballistics:map:set", [GVAR(currentGrid), _gridHeight, _gridNumObjects, surfaceIsWater _gridCenter]];
private _gridHeight = round getTerrainHeightASL _gridCenter;
private _gridBuildingCount = {
private _bb = boundingBoxReal [_x, "ViewGeometry"];
private _height = _bb#1#2 - _bb#0#2;
private _volume = (_bb#1#0 - _bb#0#0) * (_bb#1#1 - _bb#0#1) * _height;

(_height > 0.3) && {_volume > 10}
} count (_gridCenter nearObjects ["Building", 50]);
private _gridTreeCount = count nearestTerrainObjects [_gridCenter, ["TREE"], 50, false];
private _roughnessIndex = _gridBuildingCount + round (_gridTreeCount / 9);

"ace" callExtension ["ballistics:map:set", [GVAR(currentGrid), _gridHeight, _roughnessIndex, surfaceIsWater _gridCenter]];
GVAR(currentGrid) = GVAR(currentGrid) + 1;
if (GVAR(currentGrid) >= _gridCells) exitWith {};
};

}, 0, [_mapGrids, _gridCells, _initStartTime]] call CBA_fnc_addPerFrameHandler
Loading

0 comments on commit 222c408

Please sign in to comment.