diff --git a/addons/frag/functions/fnc_fired.sqf b/addons/frag/functions/fnc_fired.sqf index 8077e95b62..3c3f2f8911 100644 --- a/addons/frag/functions/fnc_fired.sqf +++ b/addons/frag/functions/fnc_fired.sqf @@ -38,7 +38,7 @@ if (GVAR(spallEnabled) && {_ammo call FUNC(shouldSpall)}) then { // only let a unit make a frag event once per second private _instigator = _shotParents#1; if (CBA_missionTime < (_instigator getVariable [QGVAR(nextSpallEvent), -1])) exitWith {}; - _instigator setVariable [QGVAR(nextSpallEvent), CBA_missionTime + 1]; + _instigator setVariable [QGVAR(nextSpallEvent), CBA_missionTime + ACE_FRAG_SPALL_EVENT_HOLDOFF]; /* * Wait a frame to see what happens to the round, may result in * multiple hits / slowdowns getting shunted to the first hit @@ -68,7 +68,7 @@ if (GVAR(reflectionsEnabled) || GVAR(enabled) && _ammo call FUNC(shouldFrag)) th // only let a unit make a frag event once per second private _instigator = _shotParents#1; if (CBA_missionTime < (_instigator getVariable [QGVAR(nextFragEvent), -1])) exitWith {}; - _instigator setVariable [QGVAR(nextFragEvent), CBA_missionTime + 1]; + _instigator setVariable [QGVAR(nextFragEvent), CBA_missionTime + ACE_FRAG_FRAG_EVENT_HOLDOFF]; // Wait a frame to make sure it doesn't target the dead [ diff --git a/addons/frag/script_component.hpp b/addons/frag/script_component.hpp index b751a22b78..9b8f2babe1 100644 --- a/addons/frag/script_component.hpp +++ b/addons/frag/script_component.hpp @@ -18,34 +18,12 @@ #include "\z\ace\addons\main\script_macros.hpp" -// Mimimum hold-off time between frag events globally or per vehicle -#define ACE_FRAG_HOLDOFF 0.25 -#define ACE_FRAG_HOLDOFF_VEHICLE 1 +// Mimimum hold-off time between frag events per unit +#define ACE_FRAG_FRAG_EVENT_HOLDOFF 0.5 +#define ACE_FRAG_SPALL_EVENT_HOLDOFF 0.5 // Scaling for the min/max # of fragments since last frag event #define ACE_FRAG_COUNT_MIN_TIME 0.1 #define ACE_FRAG_COUNT_MIN 5 #define ACE_FRAG_COUNT_MAX_TIME 1.5 #define ACE_FRAG_COUNT_MAX 50 -// half of gravity approx 9.81/2 -#define ACE_FRAG_HALF_GRAVITY_APPROX 4.905 #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 -#define ACE_FRAG_LOW_FRAG_COEFF 4 -#define ACE_FRAG_LOW_FRAG_HOLDOFF_REDUCTION 4 -// Max frag distance - correlates to a a fragCount of 20k & hit chance of 0.5% -#define ACE_FRAG_MAX_FRAG_RANGE 565 -// 4*pi/360 = 0.034906585 -#define ACE_FRAG_FRAGS_PER_ARC_CONSTANT 0.03491 - -// Spall values -#define ACE_FRAG_SPALL_HOLDOFF 0.25 -#define ACE_FRAG_SPALL_VELOCITY_INHERIT_COEFF 0.5 -// sqrt(2)/50 -#define ACE_FRAG_SPALL_CALIBER_COEF 0.02828427 -#define ACE_FRAG_SPALL_POWER_MIN 2 -#define ACE_FRAG_SPALL_POWER_TINY_MAX 5 -#define ACE_FRAG_SPALL_POWER_SMALL_MAX 8 -#define ACE_FRAG_SPALL_POWER_MEDIUM_MAX 11 -#define ACE_FRAG_SPALL_POWER_LARGE_MAX 15