diff --git a/addons/frag/README.md b/addons/frag/README.md index a658e5a9d2..1b2378aed9 100644 --- a/addons/frag/README.md +++ b/addons/frag/README.md @@ -8,7 +8,7 @@ TODO: - move from FIRED to init EH's - rework spalling position finding - Look at spalling per material type -- performance optimization - Finish stringtable expansion with additional normal & debug settings +- performance optimization - cDLC, RHS, CUP compats - look at / try to understand explosion reflections \ No newline at end of file diff --git a/addons/frag/XEH_PREP.hpp b/addons/frag/XEH_PREP.hpp index 855cfdd8d9..e7d3597d02 100644 --- a/addons/frag/XEH_PREP.hpp +++ b/addons/frag/XEH_PREP.hpp @@ -1,4 +1,5 @@ // dev +PREP(dev_fired); PREP(dev_fragCalcDump); PREP(dev_debugAmmo); PREP(dev_trackHitBox); diff --git a/addons/frag/functions/fnc_doFragTargeted.sqf b/addons/frag/functions/fnc_doFragTargeted.sqf index f810eb9fb6..8d8de1c48d 100644 --- a/addons/frag/functions/fnc_doFragTargeted.sqf +++ b/addons/frag/functions/fnc_doFragTargeted.sqf @@ -127,7 +127,7 @@ private _fragCount = 0; // limit of # of fragments to _maxFrags // actual target pos for fragment to hit if _isPerson then { - private _hitPoint = selectRandom _FRAG_HITPOINTS; + private _hitPoint = selectRandom ACE_FRAG_HITPOINTS; private _hitPointPos = _target selectionPosition [_hitPoint, "HitPoints", "AveragePoint"]; _targetPos = _target modelToWorldWorld _hitPointPos; } else { @@ -156,7 +156,7 @@ private _fragCount = 0; // limit of # of fragments to _maxFrags _fragObj setVectorDir _vecDir; _fragObj setVelocity (_vecDir vectorMultiply _locFragVel); _fragObj setShotParents _shotPrnt; - #ifdef DEBUG_MODE_DRAWFRAG + #ifdef DEBUG_MODE_FULL [_fragObj, "purple", true] call FUNC(dev_trackObj); [_targetPos, "orange"] call FUNC(dev_sphereDraw); #endif diff --git a/addons/frag/functions/fnc_submunition.sqf b/addons/frag/functions/fnc_submunition.sqf index 90c31ef6d2..70fc19655c 100644 --- a/addons/frag/functions/fnc_submunition.sqf +++ b/addons/frag/functions/fnc_submunition.sqf @@ -36,5 +36,5 @@ if (_doSubmunit) then { }; #ifdef DEBUG_MODE_FULL - [_submunitionProjectile] call UNC(dev_addRound); + [_submunitionProjectile] call FUNC(dev_addRound); #endif \ No newline at end of file diff --git a/addons/frag/script_component.hpp b/addons/frag/script_component.hpp index a070ea952e..95d69d37fb 100644 --- a/addons/frag/script_component.hpp +++ b/addons/frag/script_component.hpp @@ -3,8 +3,8 @@ #include "\z\ace\addons\main\script_mod.hpp" // #define LOG_FRAG_INFO -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE +#define DEBUG_MODE_FULL +#define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_FRAG @@ -17,4 +17,17 @@ #include "\z\ace\addons\main\script_macros.hpp" +#define ACE_FRAG_HOLDOFF 1 #define ACE_FRAG_SPALL_HOLDOFF 0.1 +#define ACE_FRAG_COUNT_MIN 5 +#define ACE_FRAG_COUNT_MAX 50 +#define ACE_FRAG_HITPOINTS ["spine1","spine2","spine3","head","leftarm","leftarmroll","leftforearm","rightarm","rightarmroll","rightforearm","pelvis","leftupleg","leftuplegroll","leftlegroll","leftfoot","rightupleg","rightuplegroll","rightleg","rightlegroll","rightfoot"] +#define ACE_FRAG_HITPOINTS_WEIGHTS + +#ifdef DEBUG_MODE_FULL +#define __FADE_TIME 1 +#define __FADE_START 0.5 +#define __FADE_INTERVAL 0.1 +#define __FADE_RATE __FADE_INTERVAL/__FADE_TIME/2 +#define __FADE_INIT (__FADE_TIME+__FADE_START)/__FADE_TIME/2 +#endif \ No newline at end of file