Skip to content

Commit f3d0e2e

Browse files
authored
General - Fix and apply HEMTT suggestions (#792)
1 parent a952920 commit f3d0e2e

File tree

13 files changed

+42
-30
lines changed

13 files changed

+42
-30
lines changed

.hemtt/lints.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,15 @@
22
options.ignore = [
33
"addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax
44
]
5+
6+
[sqf.var_all_caps]
7+
options.ignore = [
8+
# Debug macros
9+
"ZEN_COUNTERS",
10+
"ZEN_PFH_COUNTER",
11+
"ZEN_PREP_RECOMPILE",
12+
"ZEN_RECOMPILES",
13+
14+
# External variables
15+
"AR_SUPPORTED_VEHICLES"
16+
]

addons/ai/functions/fnc_canThrowGrenade.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]];
2121

2222
alive _unit
2323
&& {!isPlayer _unit}
24-
&& {vehicle _unit == _unit}
24+
&& {isNull objectParent _unit}
2525
&& {_unit isKindOf "CAManBase"}
2626
&& {lifeState _unit in ["HEALTHY", "INJURED"]}
2727
&& {!(_unit call EFUNC(common,isSwimming))}

addons/ai/functions/fnc_garrison.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if (_topDown) then {
4242
};
4343

4444
{
45-
if (vehicle _x != _x) then {
45+
if (!isNull objectParent _x) then {
4646
moveOut _x;
4747
};
4848
} forEach _units;

addons/ai/functions/fnc_searchBuilding.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private _groupState = [formation _group, behaviour _leader, speedMode _group, co
4242
private _stances = [];
4343

4444
{
45-
if (alive _x && {vehicle _x == _x} && {!isPlayer _x}) then {
45+
if (alive _x && {isNull objectParent _x} && {!isPlayer _x}) then {
4646
_stances pushBack [_x, unitPos _x];
4747
[QEGVAR(common,setUnitPos), [_x, "UP"], _x] call CBA_fnc_targetEvent;
4848
};
@@ -54,7 +54,7 @@ private _stances = [];
5454

5555
// Refresh units in case some died or left/joined the group
5656
private _units = units _group select {
57-
alive _x && {vehicle _x == _x} && {!isPlayer _x}
57+
alive _x && {isNull objectParent _x} && {!isPlayer _x}
5858
};
5959

6060
// Exit the search if the group has no units left

addons/area_markers/functions/fnc_applyProperties.sqf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ private _marker = _ctrlConfigure getVariable [QGVAR(marker), ""];
2121

2222
private _sizeA = parseNumber ctrlText (_ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_SIZE_A);
2323
private _sizeB = parseNumber ctrlText (_ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_SIZE_B);
24-
_marker setMarkerSize [_sizeA, _sizeB];
24+
_marker setMarkerSizeLocal [_sizeA, _sizeB];
2525

2626
private _ctrlRotationSlider = _ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_ROTATION_SLIDER;
2727
private _rotation = sliderPosition _ctrlRotationSlider;
28-
_marker setMarkerDir _rotation;
28+
_marker setMarkerDirLocal _rotation;
2929

3030
private _ctrlShape = _ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_SHAPE;
3131
private _shape = ["RECTANGLE", "ELLIPSE"] select lbCurSel _ctrlShape;
32-
_marker setMarkerShape _shape;
32+
_marker setMarkerShapeLocal _shape;
3333

3434
private _ctrlBrush = _ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_BRUSH;
3535
private _brush = _ctrlBrush lbData lbCurSel _ctrlBrush;
36-
_marker setMarkerBrush _brush;
36+
_marker setMarkerBrushLocal _brush;
3737

3838
private _ctrlColor = _ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_COLOR;
3939
private _color = _ctrlColor lbData lbCurSel _ctrlColor;
40-
_marker setMarkerColor _color;
40+
_marker setMarkerColorLocal _color;
4141

4242
private _ctrlAlphaSlider = _ctrlConfigure controlsGroupCtrl IDC_CONFIGURE_ALPHA_SLIDER;
4343
private _alpha = sliderPosition _ctrlAlphaSlider;

addons/area_markers/functions/fnc_createMarker.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
params ["_position", ["_shape", "RECTANGLE"]];
2222

2323
private _marker = createMarker [format [QGVAR(%1), GVAR(nextID)], _position];
24-
_marker setMarkerShape _shape;
24+
_marker setMarkerShapeLocal _shape;
2525
_marker setMarkerSize [50, 50];
2626

2727
GVAR(nextID) = GVAR(nextID) + 1;

addons/common/functions/fnc_displayCuratorLoad.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
params ["_display"];
1919

2020
// Remove "Gear" animation when entering Zeus
21-
if (GVAR(disableGearAnim) && {vehicle player == player}) then {
21+
if (GVAR(disableGearAnim) && {isNull objectParent player}) then {
2222
[{player switchMove _this}, animationState player] call CBA_fnc_execNextFrame;
2323
};
2424

addons/common/functions/fnc_serializeObjects.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ params [["_objects", [], [[]]], ["_centerPos", nil, [[]], [2, 3]], ["_includeWay
2323

2424
// Filter destroyed objects and any objects that are attached to or "part of" another
2525
// The data for these objects will be included in the parent object's data
26-
_objects = _objects select {alive _x && {vehicle _x == _x} && {isNull attachedTo _x} && {isNull ropeAttachedTo _x}};
26+
_objects = _objects select {alive _x && {isNull objectParent _x} && {isNull attachedTo _x} && {isNull ropeAttachedTo _x}};
2727
_objects = _objects arrayIntersect _objects;
2828

2929
// Find the center position of all objects if one is not given

addons/common/gui.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ class GVAR(RscCheckbox): RscCheckBox {
5353
y = 0;
5454
w = QUOTE(POS_W(1));
5555
h = QUOTE(POS_H(1));
56-
soundClick[] = {"\a3\ui_f\data\sound\rscbutton\soundclick", 0.09, 1};
57-
soundEnter[] = {"\a3\ui_f\data\sound\rscbutton\soundenter", 0.09, 1};
58-
soundEscape[] = {"\a3\ui_f\data\sound\rscbutton\soundescape", 0.09, 1};
59-
soundPush[] = {"\a3\ui_f\data\sound\rscbutton\soundpush", 0.09, 1};
56+
soundClick[] = {"\a3\ui_f\data\sound\rscbutton\soundclick.wss", 0.09, 1};
57+
soundEnter[] = {"\a3\ui_f\data\sound\rscbutton\soundenter.wss", 0.09, 1};
58+
soundEscape[] = {"\a3\ui_f\data\sound\rscbutton\soundescape.wss", 0.09, 1};
59+
soundPush[] = {"\a3\ui_f\data\sound\rscbutton\soundpush.wss", 0.09, 1};
6060
};
6161

6262
class GVAR(RscCombo): RscCombo {

addons/context_actions/functions/fnc_teleportZeus.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
if (_hoveredEntity isEqualType objNull && {_hoveredEntity isKindOf "AllVehicles"} && {!(_hoveredEntity isKindOf "CAManBase")}) then {
1919
[[player], _hoveredEntity] call EFUNC(common,teleportIntoVehicle);
2020
} else {
21-
if (vehicle player != player) then {
21+
if (!isNull objectParent player) then {
2222
moveOut player;
2323
};
2424

0 commit comments

Comments
 (0)