readded seperate debug draw define

This commit is contained in:
lambdatiger 2024-01-09 23:17:08 -06:00
parent fc7d68e129
commit d25d6a61b3
9 changed files with 14 additions and 10 deletions

View File

@ -16,7 +16,7 @@
["ace_firedNonPlayerVehicle", LINKFUNC(fired)] call CBA_fnc_addEventHandler;*/
// Debug info
#ifdef DEBUG_MODE_FULL
#ifdef DEBUG_MODE_DRAW
if (hasInterface && GVAR(debugOptions)) then {
private _h = [LINKFUNC(dev_drawTrace), 0] call CBA_fnc_addPerFrameHandler;
missionNamespace setVariable [QGVAR(dev_drawPFEH), _h];

View File

@ -19,6 +19,7 @@
*
* Public: No
*/
TRACE_1("",_this);
params ["_args", ["_isSubMunit", false, [false]]];
_args params [
["_proj", objNull, [objNull]],
@ -27,7 +28,6 @@ _args params [
["_ammo", "", [""]],
["_shotParents", [objNull, objNull], [[]]]
];
TRACE_3("",_proj,_posASL,_vel);
private _shotParentVic = _shotParents#0;
if (_shotParentVic getVariable [QGVAR(nextFragTime), -1] > CBA_missionTime) exitWith {

View File

@ -59,6 +59,8 @@ _fragSpawner setShotParents _shotParents;
#ifdef DEBUG_MODE_FULL
systemChat ("fragging, id: " + getObjectID _proj);
#endif
#ifdef DEBUG_MODE_DRAW
_fragSpawner addEventHandler [
"SubmunitionCreated",
{

View File

@ -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_FULL
#ifdef DEBUG_MODE_DRAW
[_fragObj, "purple", true] call FUNC(dev_trackObj);
[_targetPos, "orange"] call FUNC(dev_sphereDraw);
#endif
@ -169,7 +169,6 @@ private _fragCount = 0; // limit of # of fragments to _maxFrags
} forEach _objects;
#ifdef DEBUG_MODE_FULL
systemChat ("fragCount cnt: " + str _fragCount);
TRACE_1("fragCount",_fragCount);
#endif
TRACE_1("fragCount",_fragCount);
_fragCount

View File

@ -50,7 +50,7 @@ for "_i" from 1 to 20 do
if (!lineIntersects [_spallPos, _nPos]) then {break};
_spallPos = +_nPos;
};
#ifdef DEBUG_MODE_FULL
#ifdef DEBUG_MODE_DRAW
[_spallPos, "orange"] call FUNC(dev_sphereDraw);
[_lPosASL, "orange"] call FUNC(dev_sphereDraw);
#endif
@ -85,7 +85,7 @@ _fragSpawner setVectorDirandUp [vectorDir _projectile, vectorUp _projectile];
_fragSpawner setVelocity (_lVelUnit vectorMultiply _velScalar);
#ifdef DEBUG_MODE_FULL
#ifdef DEBUG_MODE_DRAW
_fragSpawner addEventHandler [
"SubmunitionCreated",
{

View File

@ -87,7 +87,7 @@ for "_i" from 1 to 20 do
_spallPos = _nPos;
};
#ifdef DEBUG_MODE_FULL
#ifdef DEBUG_MODE_DRAW
if GVAR(dbgSphere) then {
[_spallPos, "green"] call FUNC(dev_sphereDraw);
[_lPosASL vectorAdd _lVelUnit, "orange"] call FUNC(dev_sphereDraw);
@ -126,6 +126,8 @@ if (_material isEqualTo "ground") then {
systemChat "ground spall"; // really shouldn't happen
};
systemChat ("bSpd: " + str speed _spallSpawner + ", frag: " + _fragSpawnType + ", dm: " + str _deltaMomentum);
#endif
#ifdef DEBUG_MODE_DRAW
_spallSpawner addEventHandler [
"SubmunitionCreated",
{

View File

@ -37,7 +37,7 @@ if (_doFrag) then {
if (isServer) then {
[
FUNC(doFrag),
_this + [_ammo, _shotParents]
[_this + [_ammo, _shotParents]]
] call CBA_fnc_execNextFrame;
} else {
[

View File

@ -35,6 +35,6 @@ if (_doSubmunit) then {
_submunitionProjectile addEventHandler ["SubmunitionCreated", {_this call FUNC(submunition)}];
};
#ifdef DEBUG_MODE_FULL
#ifdef DEBUG_MODE_DRAW
[_submunitionProjectile] call FUNC(dev_addRound);
#endif

View File

@ -4,6 +4,7 @@
// #define LOG_FRAG_INFO
#define DEBUG_MODE_FULL
// #define DEBUG_MODE_DRAW
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS