From 786ce92274b03aa895d54bc3583a096bf01e9d31 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Sun, 17 Mar 2024 17:23:16 -0500 Subject: [PATCH] Updated default fallback frag distance to be less extreme and changed fixed a magic number --- addons/frag/functions/fnc_getFragInfo.sqf | 6 +++--- addons/frag/script_component.hpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/frag/functions/fnc_getFragInfo.sqf b/addons/frag/functions/fnc_getFragInfo.sqf index c8bbdd5d86..2ffc1289d1 100644 --- a/addons/frag/functions/fnc_getFragInfo.sqf +++ b/addons/frag/functions/fnc_getFragInfo.sqf @@ -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 ]; diff --git a/addons/frag/script_component.hpp b/addons/frag/script_component.hpp index f394ad35a6..ae3f36cc5e 100644 --- a/addons/frag/script_component.hpp +++ b/addons/frag/script_component.hpp @@ -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