diff --git a/.hemtt/lints.toml b/.hemtt/lints.toml index 09ce4a735..307aa7f4b 100644 --- a/.hemtt/lints.toml +++ b/.hemtt/lints.toml @@ -2,3 +2,8 @@ options.ignore = [ "addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax ] + +[sqf.var_all_caps] +options.ignore = [ + "SLX_*" +] diff --git a/addons/common/fnc_canUseWeapon.sqf b/addons/common/fnc_canUseWeapon.sqf index 49653b41e..1c8b4a2de 100644 --- a/addons/common/fnc_canUseWeapon.sqf +++ b/addons/common/fnc_canUseWeapon.sqf @@ -23,7 +23,7 @@ SCRIPT(canUseWeapon); params [["_unit", objNull, [objNull]]]; -if (_unit == vehicle _unit) exitWith {true}; +if (isNull objectParent _unit) exitWith {true}; private _config = configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _unit; diff --git a/addons/common/fnc_deleteEntity.sqf b/addons/common/fnc_deleteEntity.sqf index 69e18d6a8..ffb70f440 100644 --- a/addons/common/fnc_deleteEntity.sqf +++ b/addons/common/fnc_deleteEntity.sqf @@ -30,7 +30,7 @@ switch (typeName _entity) do { } forEach _entity; }; case "OBJECT" : { - if (vehicle _entity != _entity) then { + if (!isNull objectParent _entity) then { unassignVehicle _entity; _entity setPosASL [0,0,0]; } else { diff --git a/addons/common/fnc_getUnitAnim.sqf b/addons/common/fnc_getUnitAnim.sqf index d8ee8ee07..d0ca51366 100644 --- a/addons/common/fnc_getUnitAnim.sqf +++ b/addons/common/fnc_getUnitAnim.sqf @@ -32,7 +32,7 @@ private _anim = toArray(toLower(animationState _unit)); private _upos = "unknown"; private _umov = "stop"; -if (vehicle _unit!= _unit) then { +if (!isNull objectParent _unit) then { _upos = "vehicle"; } else { if (count _anim < 12) exitWith {}; diff --git a/addons/common/fnc_getUnitDeathAnim.sqf b/addons/common/fnc_getUnitDeathAnim.sqf index a66438848..69c315ccf 100644 --- a/addons/common/fnc_getUnitDeathAnim.sqf +++ b/addons/common/fnc_getUnitDeathAnim.sqf @@ -27,7 +27,7 @@ private _deathAnim = ""; private _curAnim = (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _unit)); if (isText (_curAnim >> "actions")) then { - if (vehicle _unit == _unit) then { + if (isNull objectParent _unit) then { private _deathAnimCfg = (configFile >> "CfgMovesBasic" >> "Actions" >> (getText (_curAnim >> "actions")) >> "die"); if (isText _deathAnimCfg) then { _deathAnim = getText _deathAnimCfg;