Fixed array of double spaced format errors

This commit is contained in:
lambdatiger 2024-01-15 16:10:01 -06:00
parent 29d3d4c19f
commit 8683e0aa56
13 changed files with 21 additions and 21 deletions

View File

@ -78,7 +78,7 @@ class CfgAmmo {
}; };
class GVAR(large_HD): GVAR(large) { class GVAR(large_HD): GVAR(large) {
hit = 28; hit = 28;
indirectHit = 2; indirectHit = 2;
indirectHitRange = 0.25; indirectHitRange = 0.25;
airFriction = QUOTE(BASE_DRAG_HD*0.65); airFriction = QUOTE(BASE_DRAG_HD*0.65);

View File

@ -193,7 +193,7 @@ class GVAR(def_small_10_top): GVAR(def_small_10) {
triggerSpeedCoef[] = {-1.10, -0.710}; triggerSpeedCoef[] = {-1.10, -0.710};
}; };
/* /*
* Default frag, spawning small fragments only * Default frag, spawning small fragments only
*/ */
class GVAR(def_small_5): GVAR(spawnbase) { class GVAR(def_small_5): GVAR(spawnbase) {
submunitionConeType[] = {"random", 5}; submunitionConeType[] = {"random", 5};

View File

@ -89,7 +89,7 @@ private _printCount = 0;
if (_warn) then { if (_warn) then {
INC(_printCount); INC(_printCount);
if (_csvFormat) then { if (_csvFormat) then {
diag_log text format ["%7,%1,%2,%3,%4,%5,%6,%8", _c, _m, _k, _gC, _fragTypes, _fragCount, _ammo, [_ammoConfig, true] call BIS_fnc_returnParents]; diag_log text format ["%7,%1,%2,%3,%4,%5,%6,%8", _c, _m, _k, _gC, _fragTypes, _fragCount, _ammo, [_ammoConfig, true] call BIS_fnc_returnParents];
} else { } else {
diag_log text format ["Ammo [%1] MISSING frag configs:", _ammo]; diag_log text format ["Ammo [%1] MISSING frag configs:", _ammo];
diag_log text format [" _c=%1,_m=%2,_k=%3,_gC=%4,_fragTypes=%5,_fragCount=%6", _c, _m, _k, _gC, _fragTypes, _fragCount]; diag_log text format [" _c=%1,_m=%2,_k=%3,_gC=%4,_fragTypes=%5,_fragCount=%6", _c, _m, _k, _gC, _fragTypes, _fragCount];

View File

@ -57,5 +57,5 @@ diag_log text "//****************** fragCalcDump Beg ******************//";
_processedCfgAmmos pushBack _ammo; _processedCfgAmmos pushBack _ammo;
} forEach _allAmmoConfigs; } forEach _allAmmoConfigs;
diag_log text "//****************** fragCalcDump End ******************//"; diag_log text "//****************** fragCalcDump End ******************//";
diag_log text format ["//********************** printed %1 *********************//", _nPrinted]; diag_log text format ["//********************** printed %1 *********************//", _nPrinted];

View File

@ -36,12 +36,12 @@ if (_color select [0,1] != "(") then {
case "green": { _color = "(0,0.8,0,0.5)"; }; case "green": { _color = "(0,0.8,0,0.5)"; };
case "yellow": { _color = "(0.8,0.8,0,0.5)"; }; case "yellow": { _color = "(0.8,0.8,0,0.5)"; };
case "orange": { _color = "(0.8,0.518,0,0.5)"; }; case "orange": { _color = "(0.8,0.518,0,0.5)"; };
default { _color = "(0.8,0.8,0,0.5)";}; default { _color = "(0.8,0.8,0,0.5)";};
}; };
}; };
private _colorString = "#(argb,8,8,3)color" + _color; private _colorString = "#(argb,8,8,3)color" + _color;
private _sphere = createVehicle ["Sign_Sphere25cm_F", ASLtoATL _posASL, [], 0, "CAN_COLLIDE"]; private _sphere = createVehicle ["Sign_Sphere25cm_F", ASLtoATL _posASL, [], 0, "CAN_COLLIDE"];
_sphere setObjectTextureGlobal [0, _colorString]; _sphere setObjectTextureGlobal [0, _colorString];
GVAR(dev_eventSpheres) pushBack _sphere; GVAR(dev_eventSpheres) pushBack _sphere;

View File

@ -24,14 +24,14 @@ if (isNull _object) exitWith {};
// Grab the right hitBox // Grab the right hitBox
private _box = []; private _box = [];
if (_object isKindOf "CAManBase") then { if (_object isKindOf "CAManBase") then {
if (isNull objectParent _object) then { if (isNull objectParent _object) then {
_box = 0 boundingBox _object; _box = 0 boundingBox _object;
} else { } else {
_box = boundingBoxReal [_object, "Geometry"]; _box = boundingBoxReal [_object, "Geometry"];
}; };
} else { } else {
_box = boundingBoxReal [_object, "FireGeometry"]; _box = boundingBoxReal [_object, "FireGeometry"];
}; };
_box params ["_lowP","_upP"]; _box params ["_lowP","_upP"];

View File

@ -26,7 +26,7 @@ params [
"_posASL", "_posASL",
["_fragVelocity", 800, [123]], ["_fragVelocity", 800, [123]],
["_fragRange", 50, [123]], ["_fragRange", 50, [123]],
["_maxFrags", 20, [123]], ["_maxFrags", 20, [123]],
["_fragTypes", [], [[]]], ["_fragTypes", [], [[]]],
["_modFragCount", 1, [123]], ["_modFragCount", 1, [123]],
["_shotParents", [objNull, objNull], [[]], [2]] ["_shotParents", [objNull, objNull], [[]], [2]]
@ -87,7 +87,7 @@ private _totalFragCount = 0;
default {_crossSectionArea = 0.75;}; default {_crossSectionArea = 0.75;};
}; };
} else { } else {
private _boxParams = boundingBoxReal [_target, "FireGeometry"]; private _boxParams = boundingBoxReal [_target, "FireGeometry"];
_boxParams params ["_pointA", "_pointB"]; _boxParams params ["_pointA", "_pointB"];
private _dims = _pointB vectorDiff _pointA; private _dims = _pointB vectorDiff _pointA;
if (_dims#0 * _dims#1 * _dims#2 <= 0.5) then {continue}; if (_dims#0 * _dims#1 * _dims#2 <= 0.5) then {continue};

View File

@ -37,9 +37,9 @@ if (CBA_missionTime - GVAR(lastSpallTime) < ACE_FRAG_SPALL_HOLDOFF ||
private _material = [_surfaceType] call FUNC(getMaterialInfo); private _material = [_surfaceType] call FUNC(getMaterialInfo);
if (_material isEqualTo "ground") then { if (_material isEqualTo "ground") then {
#ifdef DEBUG_MODE_FULL #ifdef DEBUG_MODE_FULL
systemChat "ground spall"; systemChat "ground spall";
#endif #endif
}; };
// Find spall speed / fragment info // Find spall speed / fragment info
@ -58,7 +58,7 @@ private _velocityChange = vectorMagnitude _lastVelocity - vectorMagnitude _vel;
* of sqrt(2)/50 * round caliber * srqt(change in speed). The second term is * of sqrt(2)/50 * round caliber * srqt(change in speed). The second term is
* explosive * indirect hit, for any explosive contribution * explosive * indirect hit, for any explosive contribution
*/ */
private _spallPower = (ACE_FRAG_ROUND_COEF * _caliber * sqrt _velocityChange + _explosive * _indirectHit) * GVAR(spallIntensity); private _spallPower = (ACE_FRAG_ROUND_COEF * _caliber * sqrt _velocityChange + _explosive * _indirectHit) * GVAR(spallIntensity);
TRACE_3("found speed",_velocityChange,_caliber,_spallPower); TRACE_3("found speed",_velocityChange,_caliber,_spallPower);

View File

@ -30,7 +30,7 @@ if (!isNil "_ammoInfo") exitWith {_ammoInfo};
private _fragTypes = []; private _fragTypes = [];
private _warn = false; private _warn = false;
if (isArray (configFile >> "cfgAmmo" >> _ammo >> QGVAR(CLASSES))) then { if (isArray (configFile >> "cfgAmmo" >> _ammo >> QGVAR(CLASSES))) then {
_fragTypes = getArray (configFile >> "cfgAmmo" >> _ammo >> QGVAR(CLASSES)); _fragTypes = getArray (configFile >> "cfgAmmo" >> _ammo >> QGVAR(CLASSES));
} else { } else {
_warn = true; _warn = true;
}; };

View File

@ -36,7 +36,7 @@ if (isClass (configFile >> "CfgSurfaces" >> _surfType)) then {
} else { // Messy way when a surface isn't added to cfgSurfaces } else { // Messy way when a surface isn't added to cfgSurfaces
private _surfFileText = toLowerANSI preprocessFile _surfType; private _surfFileText = toLowerANSI preprocessFile _surfType;
_surfFileText = _surfFileText regexReplace ["[^a-z0-9]", ""]; _surfFileText = _surfFileText regexReplace ["[^a-z0-9]", ""];
private _idx = ACE_FRAG_SOUNDENVIRON_STR_LEN + (_surfFileText find "soundenviron"); private _idx = ACE_FRAG_SOUNDENVIRON_STR_LEN + (_surfFileText find "soundenviron");
if (_surfFileText select [_idx, 5] isEqualTo "empty") then { if (_surfFileText select [_idx, 5] isEqualTo "empty") then {
_idx = ACE_FRAG_SOUNDGIT_STR_LEN + (_surfFileText find "soundhit"); _idx = ACE_FRAG_SOUNDGIT_STR_LEN + (_surfFileText find "soundhit");
}; };

View File

@ -30,7 +30,7 @@ private _explosive = getNumber (configFile >> "cfgAmmo" >> _ammo >> "explosive")
private _indirectHit = getNumber (configFile >> "cfgAmmo" >> _ammo >> "indirectHit"); private _indirectHit = getNumber (configFile >> "cfgAmmo" >> _ammo >> "indirectHit");
private _indirectRange = getNumber (configFile >> "cfgAmmo" >> _ammo >> "indirectHitRange"); private _indirectRange = getNumber (configFile >> "cfgAmmo" >> _ammo >> "indirectHitRange");
if (_skip == 1 || (_force == 0 && {_explosive < 0.5 || {_indirectHit < 3 if (_skip == 1 || (_force == 0 && {_explosive < 0.5 || {_indirectHit < 3
|| {_indirectRange < 5 && _indirectHit < _indirectRange}}})) then { || {_indirectRange < 5 && _indirectHit < _indirectRange}}})) then {
TRACE_5("No frag",_ammo,_skip, _explosive, _indirectRange, _indirectHit); TRACE_5("No frag",_ammo,_skip, _explosive, _indirectRange, _indirectHit);
_shouldFrag = false; _shouldFrag = false;

View File

@ -23,11 +23,11 @@
#define ACE_FRAG_SPALL_HOLDOFF 0.25 #define ACE_FRAG_SPALL_HOLDOFF 0.25
#define ACE_FRAG_COUNT_MIN 5 #define ACE_FRAG_COUNT_MIN 5
#define ACE_FRAG_COUNT_MAX 50 #define ACE_FRAG_COUNT_MAX 50
#define ACE_FRAG_HITPOINTS ["spine1","spine2","spine3","head","leftarm","leftarmroll","leftforearm","rightarm","rightarmroll","rightforearm","pelvis","leftupleg","leftuplegroll","leftlegroll","leftfoot","rightupleg","rightuplegroll","rightleg","rightlegroll","rightfoot"] #define ACE_FRAG_HITPOINTS ["spine1","spine2","spine3","head","leftarm","leftarmroll","leftforearm","rightarm","rightarmroll","rightforearm","pelvis","leftupleg","leftuplegroll","leftlegroll","leftfoot","rightupleg","rightuplegroll","rightleg","rightlegroll","rightfoot"]
#define ACE_FRAG_HITPOINTS_WEIGHTS #define ACE_FRAG_HITPOINTS_WEIGHTS
// sqrt(2)/50 // sqrt(2)/50
#define ACE_FRAG_ROUND_COEF 0.02828427 #define ACE_FRAG_ROUND_COEF 0.02828427
// half of gravity approx 9.81/2 // half of gravity approx 9.81/2
#define ACE_FRAG_HALF_GRAVITY_APPROX 4.905 #define ACE_FRAG_HALF_GRAVITY_APPROX 4.905
// stop searching at 0.5% chance to hit // stop searching at 0.5% chance to hit
#define ACE_FRAG_MIN_FRAG_HIT_CHANCE 0.005 #define ACE_FRAG_MIN_FRAG_HIT_CHANCE 0.005