made default frag info (when not defined) perform more middle of the road for munitions

This commit is contained in:
lambdatiger 2024-01-12 20:27:07 -06:00
parent 21c72313f4
commit fb8f010332
2 changed files with 13 additions and 5 deletions

View File

@ -1,10 +1,10 @@
#include "..\script_component.hpp"
/*
* Author: Jaynus, NouberNou, Lambda.Tiger
* Adds a round to the blacklist (will be ignored).
* Adds a round type to the blacklist (will be ignored).
*
* Arguments:
* 0: Projectile <OBJECT>
* 0: Projectile <OBJECT> or classname <STRING>
*
* Return Value:
* None
@ -18,4 +18,12 @@
params ["_proj"];
TRACE_1("addBlackList",_round);
GVAR(shouldFragCache) set [typeOf _ammo, false];
switch (typeName _proj) do {
case "OBJECT": {
GVAR(shouldFragCache) set [typeOf _proj, false];
};
case "STRING": {
GVAR(shouldFragCache) set [_proj, false];
};
default { };
};

View File

@ -64,7 +64,7 @@ if (_k == 0) then {_k = 0.8; _warn = true;};
private _gC = getNumber (configFile >> "cfgAmmo" >> _ammo >> QGVAR(GURNEY_C));
if (_gC == 0) then {_gC = 2440; _warn = true;};
private _fragCount = getNumber (configFile >> "cfgAmmo" >> _ammo >> QGVAR(fragCount));
if (_fragCount == 0) then {_fragCount = 200; _warn = true;};
if (_fragCount == 0) then {_fragCount = 400; _warn = true;};
if (_warn) then {
INFO_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_ammo);
@ -79,7 +79,7 @@ if (_warn) then {
* of spherical fragmentation
*/
_ammoInfo = [
sqrt (_fragCount / (4 * pi * 0.01)),
sqrt (_fragCount / (4 * pi * 0.005)),
0.8 * _gC * sqrt (_c / (_m + _c * _k)),
_fragTypes,
_fragCount / 4 / pi