removed excess square brackets

This commit is contained in:
lambdatiger 2024-03-28 19:59:49 -05:00
parent bd23b42863
commit a817e5e4d2
6 changed files with 16 additions and 16 deletions

View File

@ -39,13 +39,13 @@ if (_isTraceBlue) then {
params ["_projectile", "_handle"];
if (!alive _projectile) exitWith {
[_handle] call CBA_fnc_removePerFrameHandler;
_handle call CBA_fnc_removePerFrameHandler;
};
private _projectileArray = GVAR(dev_trackLines) get (getObjectID _projectile);
if (isNil "_projectileArray") exitWith {
[_handle] call CBA_fnc_removePerFrameHandler;
_handle call CBA_fnc_removePerFrameHandler;
};
(_projectileArray#0) pushBack getPosATL _projectile;

View File

@ -35,7 +35,7 @@ if (_csvFormat) then {
// Gather all configs, either those that could be created from firing or all classes
private _allAmmoConfigs = [];
if (_onlyShotAmmoTypes) then {
private _configSearchFunc = {
private _configSearchFunction = {
params [
["_ammo", "", [""]]
];
@ -47,13 +47,13 @@ if (_onlyShotAmmoTypes) then {
private _subMunition = getArray _submunitionConfig;
for "_i" from 0 to count _subMunition - 1 do {
if (_i mod 2 == 0) then {
[configName (_cfgAmmoRoot >> (_subMunition#_i))] call _configSearchFunc;
configName (_cfgAmmoRoot >> (_subMunition#_i)) call _configSearchFunction;
};
};
} else {
private _subMunition = getText _submunitionConfig;
if (_subMunition isNotEqualTo "") then {
[configName (_cfgAmmoRoot >> _subMunition)] call _configSearchFunc;
configName (_cfgAmmoRoot >> _subMunition) call _configSearchFunction;
};
};
};
@ -61,7 +61,7 @@ if (_onlyShotAmmoTypes) then {
private _cfgAmmoCfgPath = configFile >> "CfgAmmo";
{
private _magAmmo = getText (_x >> "ammo");
[configName (_cfgAmmoCfgPath >> _magAmmo)] call _configSearchFunc;
configName (_cfgAmmoCfgPath >> _magAmmo) call _configSearchFunction;
} forEach _allMagazineConfigs;
} else {
_allAmmoConfigs = configProperties [configFile >> "CfgAmmo", "isClass _x && !('ace_frag' in configName _x)", true] apply {configName _x};
@ -75,7 +75,7 @@ private _printCount = 0;
_processedCfgAmmos pushBack _ammo;
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
private _shouldFrag = [_ammo] call FUNC(shouldFrag);
private _shouldFrag = _ammo call FUNC(shouldFrag);
if (_shouldFrag || _logAll) then {

View File

@ -31,9 +31,9 @@ diag_log text "//****************** fragCalcDump Beg ******************//";
continue;
};
private _shouldFrag = [_ammo] call FUNC(shouldFrag);
private _shouldFrag = _ammo call FUNC(shouldFrag);
if (_shouldFrag || _logAll) then {
private _fragInfo = [_ammo] call FUNC(getFragInfo);
private _fragInfo = _ammo call FUNC(getFragInfo);
_fragInfo params ["_fragRange", "_fragMaxVelocity", "", "_modifiedFragCount"];
private _fragCount = 4 * pi * _modifiedFragCount;
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;

View File

@ -45,13 +45,13 @@ GVAR(dev_trackLines) set [getObjectID _object, [[getPosATL _object], _colorArray
params ["_object", "_handle"];
if (!alive _object) exitWith {
[_handle] call CBA_fnc_removePerFrameHandler;
_handle call CBA_fnc_removePerFrameHandler;
};
private _objectArray = GVAR(dev_trackLines) get (getObjectID _object);
if (isNil "_objectArray") exitWith {
[_handle] call CBA_fnc_removePerFrameHandler;
_handle call CBA_fnc_removePerFrameHandler;
};
(_objectArray#0) pushBack getPosATL _object;

View File

@ -38,7 +38,7 @@ TRACE_3("willFrag",_timeSinceLastFrag,CBA_missionTime,_maxFragCount);
_shotParentVehicle setVariable [QGVAR(obj_nextFragTime), CBA_missionTime + ACE_FRAG_HOLDOFF_VEHICLE];
private _maxFragCount = round linearConversion [ACE_FRAG_COUNT_MIN_TIME, ACE_FRAG_COUNT_MAX_TIME, _timeSinceLastFrag, ACE_FRAG_COUNT_MIN, ACE_FRAG_COUNT_MAX, true];
[_ammo] call FUNC(getFragInfo) params ["_fragRange", "_fragVel", "_fragTypes", "_modFragCount"];
_ammo call FUNC(getFragInfo) params ["_fragRange", "_fragVel", "_fragTypes", "_modFragCount"];
// For low frag rounds limit the # of frags created
if (_modFragCount < ACE_FRAG_LOW_FRAG_MOD_COUNT) then {
_maxFragCount = _modFragCount * ACE_FRAG_LOW_FRAG_COEFF;

View File

@ -29,7 +29,7 @@ if (_ammo == "" || {_objectHit isKindOf "CAManBase"}) exitWith {
TRACE_4("invalid round or hit",CBA_missionTime,GVAR(nextSpallAllowTime),_objectHit,_lastPosASL);
};
private _material = [_surfaceType] call FUNC(getMaterialInfo);
private _material = _surfaceType call FUNC(getMaterialInfo);
if (_material == "ground") exitWith {
#ifdef DEBUG_MODE_FULL
systemChat "ground spall";
@ -37,7 +37,7 @@ if (_material == "ground") exitWith {
};
// Find spall speed / fragment info
[_ammo] call FUNC(getSpallInfo) params ["_caliber", "_explosive", "_indirectHit"];
_ammo call FUNC(getSpallInfo) params ["_caliber", "_explosive", "_indirectHit"];
private _vel = if (alive _projectile) then {
_explosive = 0; // didn't explode since it's alive a frame later
velocity _projectile
@ -132,8 +132,8 @@ systemChat ("spd: " + str speed _spallSpawner + ", spawner: " + _fragSpawnType +
_spallSpawner addEventHandler [
"SubmunitionCreated",
{
params ["", "_subProj"];
[_subProj] call FUNC(dev_addRound);
params ["", "_submunitionProjectile"];
_submunitionProjectile call FUNC(dev_addRound);
}
];
#endif