2016-05-30 16:37:03 +00:00
|
|
|
#define COMPONENT frag
|
2016-06-20 09:41:17 +00:00
|
|
|
#define COMPONENT_BEAUTIFIED Frag
|
2016-05-30 16:37:03 +00:00
|
|
|
#include "\z\ace\addons\main\script_mod.hpp"
|
|
|
|
|
2024-01-08 21:21:32 +00:00
|
|
|
// #define LOG_FRAG_INFO
|
2024-02-14 22:50:09 +00:00
|
|
|
// #define DEBUG_MODE_FULL
|
2024-01-15 07:33:25 +00:00
|
|
|
// #define DEBUG_MODE_DRAW
|
2024-01-09 06:27:13 +00:00
|
|
|
// #define DISABLE_COMPILE_CACHE
|
2016-05-30 16:37:03 +00:00
|
|
|
// #define ENABLE_PERFORMANCE_COUNTERS
|
|
|
|
|
|
|
|
#ifdef DEBUG_ENABLED_FRAG
|
|
|
|
#define DEBUG_MODE_FULL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEBUG_SETTINGS_FRAG
|
|
|
|
#define DEBUG_SETTINGS DEBUG_SETTINGS_FRAG
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "\z\ace\addons\main\script_macros.hpp"
|
|
|
|
|
2024-02-08 23:11:36 +00:00
|
|
|
// Mimimum hold-off time between frag events globally or per vehicle
|
2024-01-11 00:34:54 +00:00
|
|
|
#define ACE_FRAG_HOLDOFF 0.25
|
2024-01-09 23:25:09 +00:00
|
|
|
#define ACE_FRAG_HOLDOFF_VEHICLE 1
|
2024-02-08 23:11:36 +00:00
|
|
|
// Scaling for the min/max # of fragments since last frag event
|
|
|
|
#define ACE_FRAG_COUNT_MIN_TIME 0.1
|
2024-01-09 03:40:12 +00:00
|
|
|
#define ACE_FRAG_COUNT_MIN 5
|
2024-02-08 23:11:36 +00:00
|
|
|
#define ACE_FRAG_COUNT_MAX_TIME 1
|
2024-01-09 03:40:12 +00:00
|
|
|
#define ACE_FRAG_COUNT_MAX 50
|
2024-02-08 23:11:36 +00:00
|
|
|
// Default hitpoint targets
|
2024-01-21 23:08:48 +00:00
|
|
|
#define ACE_FRAG_HITPOINTS ["spine1", "spine1", "spine1", "spine2", "spine2", "spine2", "spine3", "spine3", "spine3", "pelvis", "pelvis", "pelvis", "head", "leftarm", "leftarmroll", "leftforearm", "rightarm", "rightarmroll", "rightforearm", "leftupleg", "leftuplegroll", "leftlegroll", "leftfoot", "rightupleg", "rightuplegroll", "rightleg", "rightlegroll", "rightfoot", "neck"]
|
2024-01-15 22:10:01 +00:00
|
|
|
// half of gravity approx 9.81/2
|
2024-01-15 19:42:45 +00:00
|
|
|
#define ACE_FRAG_HALF_GRAVITY_APPROX 4.905
|
2024-01-16 21:38:47 +00:00
|
|
|
// Lowest chance to hit of 0.5%
|
2024-01-15 19:42:45 +00:00
|
|
|
#define ACE_FRAG_MIN_FRAG_HIT_CHANCE 0.005
|
2024-03-17 22:23:16 +00:00
|
|
|
#define ACE_FRAG_IMPERIC_VELOCITY_CONSTANT 0.8
|
2024-02-08 23:11:36 +00:00
|
|
|
// 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
|
2024-01-15 21:18:42 +00:00
|
|
|
#define ACE_FRAG_LOW_FRAG_COEFF 4
|
|
|
|
#define ACE_FRAG_LOW_FRAG_HOLDOFF_REDUCTION 4
|
2024-02-08 23:11:36 +00:00
|
|
|
// Max frag distance - correlates to a a fragCount of 20k & hit chance of 0.5%
|
|
|
|
#define ACE_FRAG_MAX_FRAG_RANGE 565
|
2024-03-03 04:33:40 +00:00
|
|
|
// 4*pi/360 = 0.034906585
|
|
|
|
#define ACE_FRAG_FRAGS_PER_ARC_CONSTANT 0.03491
|
2024-02-08 23:11:36 +00:00
|
|
|
|
|
|
|
// Spall values
|
|
|
|
#define ACE_FRAG_SPALL_HOLDOFF 0.25
|
|
|
|
#define ACE_FRAG_SPALL_VELOCITY_INHERIT_COEFF 0.5
|
|
|
|
// sqrt(2)/50
|
2024-03-03 04:33:40 +00:00
|
|
|
#define ACE_FRAG_SPALL_CALIBER_COEF 0.02828427
|
2024-03-29 00:13:21 +00:00
|
|
|
#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
|
2024-03-29 11:14:50 +00:00
|
|
|
#define ACE_FRAG_SPALL_POWER_LARGE_MAX 15
|