Updated default fallback frag distance to be less extreme and changed fixed a magic number

This commit is contained in:
lambdatiger 2024-03-17 17:23:16 -05:00
parent 04a3ba8bb4
commit 786ce92274
2 changed files with 4 additions and 3 deletions

View File

@ -68,7 +68,7 @@ if (_metalMass == 0) then {
private _geometryCoefficient = getNumber (_ammoConfig >> QGVAR(gurney_k));
if (_geometryCoefficient == 0) then {
_geometryCoefficient = 0.8;
_geometryCoefficient = 0.5;
_notifyMissingEntries = true;
};
@ -80,7 +80,7 @@ if (_gurneyConstant == 0) then {
private _fragCount = getNumber (_ammoConfig >> QGVAR(fragCount));
if (_fragCount == 0) then {
_fragCount = 400;
_fragCount = 250;
_notifyMissingEntries = true;
};
@ -96,7 +96,7 @@ if (_notifyMissingEntries) then {
*/
_ammoInfo = [
ACE_FRAG_MAX_FRAG_RANGE max sqrt (_fragCount / (4 * pi * ACE_FRAG_MIN_FRAG_HIT_CHANCE)),
0.8 * _gurneyConstant * sqrt (_chargeMass / (_metalMass + _chargeMass * _geometryCoefficient)),
ACE_FRAG_IMPERIC_VELOCITY_CONSTANT * _gurneyConstant * sqrt (_chargeMass / (_metalMass + _chargeMass * _geometryCoefficient)),
_fragTypes,
_fragCount / 4 / pi
];

View File

@ -32,6 +32,7 @@
#define ACE_FRAG_HALF_GRAVITY_APPROX 4.905
// Lowest chance to hit of 0.5%
#define ACE_FRAG_MIN_FRAG_HIT_CHANCE 0.005
#define ACE_FRAG_IMPERIC_VELOCITY_CONSTANT 0.8
// Make frag hold-off time shortger for low frag
// value of 150/4/pi ~= 11.93662
#define ACE_FRAG_LOW_FRAG_MOD_COUNT 11.93662