From 9bcf2b76502c506c7da1d151f0f3525e22f8cc43 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Wed, 17 Jan 2024 20:51:59 -0600 Subject: [PATCH] white space and define placement changes --- addons/frag/functions/fnc_dev_debugAmmo.sqf | 29 ++++++++++--------- addons/frag/functions/fnc_dev_drawTrace.sqf | 5 ++-- addons/frag/functions/fnc_dev_fired.sqf | 2 ++ .../functions/fnc_dev_switchUnitHandle.sqf | 1 + addons/frag/functions/fnc_dev_trackObj.sqf | 1 + 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/addons/frag/functions/fnc_dev_debugAmmo.sqf b/addons/frag/functions/fnc_dev_debugAmmo.sqf index f178bb0052..7bfb4fed12 100644 --- a/addons/frag/functions/fnc_dev_debugAmmo.sqf +++ b/addons/frag/functions/fnc_dev_debugAmmo.sqf @@ -3,13 +3,13 @@ /* * Author: ACE-Team, Lambda.Tiger * This function will dump every ammo config that would generate ace_frag - * fragments that could be fired from a weapon + * fragments that could be fired from a weapon. * * Arguments: - * 0: Log ammo types that wouldn't normally frag - * 1: Only export ammo classes of classes referenced in cfgMagazines - * and their submunitions. - * 2: Force a CSV format on debug print + * 0: Log ammo types that wouldn't normally frag. (Default: false) + * 1: Only export ammo classes of classes referenced in CfgMagazines and their + * submunitions. (Default: false) + * 2: Force a CSV format on debug print. (Default: false) * * Return Value: * None @@ -19,6 +19,7 @@ * * Public: No */ + params [ ["_logAll", false, [false]], ["_onlyShotAmmoTypes", false, [false]], @@ -39,20 +40,20 @@ if (_onlyShotAmmoTypes) then { ]; if (_ammo isEqualTo "" || {_ammo in _allAmmoConfigs}) exitWith {}; _allAmmoConfigs pushBack _ammo; - private _ammoConfig = configFile >> "cfgAmmo" >> _ammo; - private _subMunit = toLowerANSI getText (_ammoConfig >> "submunitionAmmo"); - if (_subMunit isNotEqualTo "") then { - _subMunit = getArray (_ammoConfig >> "submunitionAmmo"); - for "_i" from 0 to count _subMunit - 1 do { + private _ammoConfig = configFile >> "CfgAmmo" >> _ammo; + private _subMunition = toLowerANSI getText (_ammoConfig >> "submunitionAmmo"); + if (_subMunition isNotEqualTo "") then { + _subMunition = getArray (_ammoConfig >> "submunitionAmmo"); + for "_i" from 0 to count _subMunition - 1 do { if (_i mod 2 == 0) then { - [toLowerANSI (_subMunit#_i)] call _configSearchFunc; + [toLowerANSI (_subMunition#_i)] call _configSearchFunc; }; }; } else { - [toLowerANSI _subMunit] call _configSearchFunc; + [toLowerANSI _subMunition] call _configSearchFunc; }; }; - private _allMagazineConfigs = configProperties [configFile >> "cfgMagazines", "isClass _x", true]; + private _allMagazineConfigs = configProperties [configFile >> "CfgMagazines", "isClass _x", true]; { [toLowerANSI getText (_x >> "ammo")] call _configSearchFunc; @@ -68,7 +69,7 @@ private _printCount = 0; if (_ammo isNotEqualTo "" && {!(_ammo in _processedCfgAmmos)}) then { _processedCfgAmmos pushBack _ammo; - private _ammoConfig = (configFile >> "CfgAmmo" >> _ammo); + private _ammoConfig = configFile >> "CfgAmmo" >> _ammo; private _shoulFrag = [_ammo] call FUNC(shouldFrag); if (_shoulFrag || _logAll) then { diff --git a/addons/frag/functions/fnc_dev_drawTrace.sqf b/addons/frag/functions/fnc_dev_drawTrace.sqf index f39a6cdd0e..7c4cb40189 100644 --- a/addons/frag/functions/fnc_dev_drawTrace.sqf +++ b/addons/frag/functions/fnc_dev_drawTrace.sqf @@ -1,8 +1,7 @@ #include "..\script_component.hpp" -#define HITBOX_DRAW_PATH [[3, 2, 1, 5, 6, 7, 3, 0, 4, 5], [0, 1], [2, 6], [7, 4]] /* * Author: Lambda.Tiger - * Per frame function to draw all dev traces + * Per frame function to draw all dev traces. * * Arguments: * none @@ -14,6 +13,8 @@ * * Public: No */ + +#define HITBOX_DRAW_PATH [[3, 2, 1, 5, 6, 7, 3, 0, 4, 5], [0, 1], [2, 6], [7, 4]] if (!GVAR(debugOptions)) exitWith {}; { diff --git a/addons/frag/functions/fnc_dev_fired.sqf b/addons/frag/functions/fnc_dev_fired.sqf index 9002471599..4ed25573fe 100644 --- a/addons/frag/functions/fnc_dev_fired.sqf +++ b/addons/frag/functions/fnc_dev_fired.sqf @@ -14,6 +14,8 @@ * * Public: No */ + //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); + [_projectile, true, [side group _unit, side group ACE_player] call BIS_fnc_sideIsFriendly] call FUNC(dev_addRound); diff --git a/addons/frag/functions/fnc_dev_switchUnitHandle.sqf b/addons/frag/functions/fnc_dev_switchUnitHandle.sqf index c290c762c4..16f7ab5530 100644 --- a/addons/frag/functions/fnc_dev_switchUnitHandle.sqf +++ b/addons/frag/functions/fnc_dev_switchUnitHandle.sqf @@ -15,6 +15,7 @@ * * Public: No */ + TRACE_1("switchUnit",_this); params ["_currentUnit", "_lastUnit"]; diff --git a/addons/frag/functions/fnc_dev_trackObj.sqf b/addons/frag/functions/fnc_dev_trackObj.sqf index d33fbb2796..3e820c8125 100644 --- a/addons/frag/functions/fnc_dev_trackObj.sqf +++ b/addons/frag/functions/fnc_dev_trackObj.sqf @@ -16,6 +16,7 @@ * * Public: No */ + params [ "_object", ["_color", "blue", ["blue"]],