Converetd all stray tabs to spaces

This commit is contained in:
lambdatiger 2024-01-10 18:51:38 -06:00
parent db195f4b26
commit eef48da6bc
19 changed files with 110 additions and 112 deletions

View File

@ -93,7 +93,7 @@ _obj addEventHandler [
];
// Add deflected eventHandler
_proj addEventHandler [
_obj addEventHandler [
"Deflected",
{
params ["_proj", "_posASL"];

View File

@ -52,7 +52,6 @@ if (_heightAGL < 0.25) then {
_posASL = _posASL vectorAdd [0, 0, 0.25];
};
// !*! make holdoff a gvar?
TRACE_3("fnc_doFragTargeted IF", _fragRange, _timeSince, GVAR(fragSimComplexity));
if (_fragRange > 3 && _timeSince > ACE_FRAG_HOLDOFF*1.5 && GVAR(fragSimComplexity) != 1) then {
_maxFrags = _maxFrags - ([_posASL, _fragVel, _fragRange, _maxFrags, _fragTypes, _modFragCount, _shotParents] call FUNC(doFragTargeted));

View File

@ -53,7 +53,7 @@ private _vel = if (alive _projectile) then {
// Find spall speed / fragment
private _dV = vectorMagnitude _lVel - vectorMagnitude _vel;
private _caliber = getNumber (configFile >> "cfgAmmo" >> _ammo >> "caliber"); // !*! optimize this later?
private _caliber = getNumber (configFile >> "cfgAmmo" >> _ammo >> "caliber");
// scaled momentum change made on caliber-mass assumption ~sqrt(2)/20 * caliber ~= mass
private _deltaMomentum = 0.0707 * _caliber * sqrt( _dV ) * GVAR(SpallIntensity);
TRACE_3("found speed",_dV,_caliber,_deltaMomentum);
@ -63,20 +63,19 @@ if (_deltaMomentum < 2) exitWith {
};
//** start calculating where the spalling should come !*! could be better **//
private _lVelUnit = vectorNormalized _lVel;
private _unitStep = _lVelUnit vectorMultiply 0.05;
private _spallPos = +_lPosASL;
if (terrainIntersectASL [_lPosASL vectorAdd _unitStep, _lPosASL]) exitWith {
TRACE_3("terrainIntersect",_lPosASL,_unitStep,_lPosASL);
};
if (120 > acos ((vectorNormalized _lVelUnit) vectorDotProduct _sNorm)) then {
_spallPos = _spallPos vectorAdd (_unitStep vectorMultiply 5);
};
if (terrainIntersectASL [_lPosASL vectorAdd _unitStep, _lPosASL]) exitWith {
TRACE_3("terrainIntersect",_lPosASL,_unitStep,_lPosASL);
};
//***** Passed all exit withs *****//
GVAR(lastSpallTime) = CBA_missionTime;

View File

@ -33,7 +33,8 @@ _shouldFrag params ["_doFrag", "_doSubmunit"];
if (_doFrag) then {
// wait for frag damage to kill units before spawning fragments
_projectile addEventHandler ["Explode", {
_projectile addEventHandler ["Explode",
{
if (isServer) then {
[FUNC(doFrag), [_this]] call CBA_fnc_execNextFrame;
} else {

View File

@ -25,7 +25,6 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)];
1
] call CBA_fnc_addSetting;
/// !*! TODO: add stringtable entries
[
QGVAR(fragSimComplexity), "LIST",
[LSTRING(FragMode), LSTRING(FragMode_Desc)],