From cfdf29154f5ca69b2130e8ba54a77f4cfbc601b6 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Mon, 29 Jul 2024 22:09:21 -0500 Subject: [PATCH] added target point debug spheres --- addons/frag/functions/fnc_frago.sqf | 5 +++-- addons/frag/script_component.hpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index 9c8839d658..cf722b7244 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -37,10 +37,10 @@ GVAR(lastFragTime) = CBA_missionTime; _shellType call FUNC(getFragInfo) params ["_fragRange", "_fragVelocity", "_fragTypes", "_metalMassModifier"]; -private _fragPosAGL = ASLtoAGL _fragPosASL; +private _fragPosAGL = ASLToAGL _fragPosASL; TRACE_5("fragValues",_fragPosASL,_fragPosAGL,_fragRange,_fragVelocity,_metalMassModifier); // Post 2.18 change - uncomment line 43, modify lines 45, and remove lines 44, 51-57, 64-66 -// private _targets = [ASLtoAGL _fragPosAGL, _fragRange, _fragRange, 0, false, _fragRange] nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], false, true, true]; +// private _targets = [ASLToAGL _fragPosAGL, _fragRange, _fragRange, 0, false, _fragRange] nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], false, true, true]; private _objects = _fragPosAGL nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange]; if (_objects isEqualTo []) exitWith { TRACE_2("No nearby targets",_fragPosAGL,_fragRange); @@ -116,6 +116,7 @@ if (_targets isNotEqualTo []) then { _fragObj setShotParents _shotParents; #ifdef DEBUG_MODE_DRAW [_fragObj, "green", true] call FUNC(dev_trackObj); + [AGLToASL _fragPosAGL, "(0.88,0.36,0.92,0.5)"] call FUNC(dev_sphereDraw); #endif INC(_fragCount); INC(_currentCount); diff --git a/addons/frag/script_component.hpp b/addons/frag/script_component.hpp index c0148818a5..2bcaf5552c 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 DEBUG_MODE_DRAW +#define DEBUG_MODE_FULL +#define DEBUG_MODE_DRAW // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS