@@ -120,22 +120,24 @@ private _fnc_debug_drawRect = {
120
120
};
121
121
122
122
private _sideUnknownColor = GVAR(debug_sideColorLUT) get sideUnknown ;
123
- private _viewDistance = viewDistance ;
123
+ private _viewDistance = viewDistance min 250 ;
124
124
private _posCam = positionCameraToWorld [0 , 0 , 0 ];
125
125
{
126
126
private _unit = _x ;
127
127
private _renderPos = getPosATLVisual _unit ;
128
- if ((_posCam distance _renderPos ) <= _viewDistance ) then {
128
+ private _isLeader = _unit isEqualTo (leader _unit );
129
+ private _sideColor = [side (group _unit ), false ] call BIS_fnc_sideColor ;
130
+ if ((_posCam distance _renderPos ) <= _viewDistance && {((units _unit - [_unit ]) findIf {_x distanceSqr _unit < 1 }) isEqualTo - 1 }) then {
129
131
if (! GVAR(debug_drawAllUnitsInVehicles) && {_unit isNotEqualTo (effectiveCommander (vehicle _unit ))}) exitWith {};
130
132
private _textData = [" <t align='bottom' size='%1'>" ];
131
133
132
- if (_unit == leader _unit ) then {
134
+ if (_isLeader ) then {
133
135
{
134
136
private _pos2 = getPosATLVisual _x ;
135
- drawLine3D [_renderPos , _pos2 , [1 , 1 , 1 , 0.5 ]];
136
- } forEach (units _unit );
137
+ drawLine3D [_renderPos , _pos2 , [1 , 1 , 1 , 0.5 ], 10 ];
138
+ } forEach (( units _unit ) select { alive _x } );
137
139
private _color = GVAR(debug_sideColorLUT) getOrDefault [(side _unit ), _sideUnknownColor ]; // TODO: replace with new Syntax for setting default for hashMap!
138
- _textData pushBack " <t size='%2' color='" + _color + " '>Group Leader </t><br/>" ;
140
+ _textData pushBack " <t shadow='0' size='%2' font='PuristaBold' color='" + _color + " '>" + groupId ( group _unit ) + " </t><br/>" ;
139
141
};
140
142
_unit getVariable [QGVAR(FSMDangerCauseData), [- 1 , [0 , 0 , 0 ], - 1 ]] params [[" _dangerType" , - 1 ], [" _pos" , [0 , 0 , 0 ]], [" _time" , - 1 ], [" _currentTarget" , objNull ]];
141
143
@@ -146,56 +148,77 @@ private _posCam = positionCameraToWorld [0, 0, 0];
146
148
private _knowledge = _unit targetKnowledge _currentTarget ;
147
149
private _knowledgePosition = ASLToAGL (_knowledge select 6 );
148
150
private _knowledgeAge = _knowledge select 2 ;
149
- if (_knowledgeAge == time && _unitIsLocal ) then {
151
+ if (_knowledgeAge isEqualTo time && _unitIsLocal ) then {
150
152
_unit setVariable [QGVAR(debug_LastSeenPos), _knowledgePosition , GVAR(debug_functions)];
151
153
};
152
154
private _lastSeen = _unit getVariable [QGVAR(debug_LastSeenPos), _knowledgePosition ];
155
+
156
+ // fix when particularly engaging suppressTargets
157
+ if (_knowledgePosition distanceSqr [0 , 0 , 0 ] < 1 ) then {
158
+ _knowledgePosition = getPosATL _currentTarget ;
159
+ _lastSeen = getPosATL _currentTarget ;
160
+ };
153
161
_targetKnowledge append [
154
162
" <t color='#C7CCC1'>Target Knowledge: <br/>" ,
155
163
" Last Seen: " , _lastSeen , " (" , _knowledgeAge toFixed 2 , " )<br/>" ,
156
164
" Position Error: " , (_knowledge select 5 ) toFixed 2 , " </t><br/>"
157
165
];
158
166
159
- drawLine3D [_renderPos , _knowledgePosition , [0 , 1 , 0 , 0.5 ]];
160
- drawIcon3D [" a3\ui_f\data\Map\Markers\System\dummy_ca.paa" , [1 , 1 , 1 , 1 ], _knowledgePosition , 1 , 1 , 0 , " Estimated Target Position" ];
167
+ if ((side _unit ) isNotEqualTo (side _currentTarget )) then {
168
+ drawLine3D [ASLToATL (aimPos _unit ), _knowledgePosition , _sideColor , 6 * (1 - needReload _unit )];
169
+ drawIcon3D [" \a3\ui_f\data\igui\cfg\targeting\impactpoint_ca.paa" , _sideColor , _knowledgePosition , 1 , 1 , 0 , [" Estimated Target Position" , " " ] select (_knowledgePosition distanceSqr _lastSeen < 1 )];
161
170
162
- if ! (_lastSeen isEqualType " " ) then {
163
- drawLine3D [_renderPos , _lastSeen , [0 , 0 , 1 , 0.5 ]];
164
- drawIcon3D [" a3\ui_f\data\Map\Markers\System\dummy_ca.paa" , [1 , 1 , 1 , 1 ], _lastSeen , 1 , 1 , 0 , " Last Seen Position" ];
171
+ if ! (_lastSeen isEqualType " " ) then {
172
+ private _suppressionFactor = (1 + getSuppression _unit ) min 2 ;
173
+ drawLine3D [_knowledgePosition , _lastSeen , _sideColor ];
174
+ drawIcon3D [" \a3\ui_f\data\igui\cfg\targeting\hitprediction_ca.paa" , _sideColor , _lastSeen , _suppressionFactor , _suppressionFactor , 0 , [" Last Seen Position" , " " ] select (_knowledgePosition distanceSqr _lastSeen < 1 )];
175
+ };
165
176
};
177
+
166
178
} else {
167
179
_targetKnowledge pushBack [
168
180
" <t color'#FFAA00'>RemoteSensors Disabled<br/>" ,
169
181
" <t color'#FFAA00'>and Unit Not Local<br/>"
170
182
];
171
183
};
172
- drawLine3D [_renderPos , getPosATLVisual _currentTarget , [1 , 0 , 0 , 1 ]];
184
+ // drawLine3D [_renderPos, getPosATLVisual _currentTarget, [1, 0, 0, 1]]; hide direct target lines to reduce clutter ~ nkenny
173
185
[name _currentTarget , " None" ] select (isNull _currentTarget );
174
186
} else {
175
187
if (_currentTarget isEqualType []) then {
176
- drawLine3D [_renderPos , _currentTarget call CBA_fnc_getPos , [1 , 0 , 0 , 1 ]];
188
+ drawLine3D [_renderPos , _currentTarget call CBA_fnc_getPos , _sideColor , 6 ];
189
+ drawIcon3D [" \a3\ui_f\data\igui\cfg\targeting\impactpoint_ca.paa" , _sideColor , _currentTarget call CBA_fnc_getPos , 1 , 1 , 0 ];
177
190
format [" POS %1" , _currentTarget ];
178
191
} else {
179
192
format [" N/A" ];
180
- }
193
+ };
181
194
};
182
195
_textData append [
183
196
" Behaviour: " , behaviour _unit , " <br/>" ,
184
197
" Current Task: " , _unit getVariable [QGVAR(currentTask ), " None" ], " <br/>"
185
198
];
186
- if (_unit == leader _unit ) then {
199
+ if (_isLeader ) then {
187
200
private _targetCount = count ((_unit targetsQuery [objNull , sideUnknown , " " , [], 0 ]) select {((side _unit ) isNotEqualTo (side (_x select 1 ))) || ((side (_x select 1 )) isEqualTo civilian )});
188
201
_textData append [
189
202
" Current Tactic: " , group _unit getVariable [QGVAR(currentTactic), " None" ], " <br/>" ,
190
203
" Known Enemies: " , _targetCount , " <br/>" ,
191
204
" Group Memory: " , count (group _unit getVariable [QGVAR(groupMemory), []]), " <br/>"
192
205
];
206
+
207
+ {
208
+ drawIcon3D [
209
+ " \a3\ui_f\data\igui\cfg\simpletasks\types\move_ca.paa" ,
210
+ _sideColor ,
211
+ _x ,
212
+ 0.7 ,
213
+ 0.7 ,
214
+ 0 ,
215
+ str (_forEachIndex + 1 )
216
+ ];
217
+ } forEach (group _unit getVariable [QGVAR(groupMemory), []]);
193
218
};
194
- private _currentCommand = currentCommand _unit ;
195
- if (_currentCommand == " " ) then {_currentCommand = " None" ;};
219
+
196
220
197
221
_textData append [
198
- " Current Command: " , _currentCommand , " <br/>" ,
199
222
" <t color='#C7CCC1'>Danger Cause: " , _dangerType call FUNC(debugDangerType), " <br/>"
200
223
];
201
224
@@ -207,14 +230,19 @@ private _posCam = positionCameraToWorld [0, 0, 0];
207
230
208
231
_textData append [
209
232
" Danger Timeout: " , format [" %1s" , [(_time - time ) toFixed 2 , 0 ] select ((_time - time ) < 0 )], " </t><br/>" ,
210
- " Current Target: " , format [" %1 (%2 visiblity )" , _name , ([objNull , " VIEW" , objNull ] checkVisibility [eyePos _unit , _currentTarget call _fnc_getEyePos ]) toFixed 1 ], " <br/>"
233
+ " Current Target: " , format [" %1 (%2 visibility )" , _name , ([objNull , " VIEW" , objNull ] checkVisibility [eyePos _unit , _currentTarget call _fnc_getEyePos ]) toFixed 1 ], " <br/>"
211
234
];
212
235
213
- _textData append _targetKnowledge ;
236
+ // _textData append _targetKnowledge; ~ Hidden to reduce information overload ~ nkenny
237
+
238
+ private _currentCommand = currentCommand _unit ;
239
+ if (_currentCommand == " " ) then {_currentCommand = " None" ;};
214
240
215
241
_textData append [
216
242
" Supression: " , getSuppression _unit , " <br/>" ,
217
- " Morale: " , morale _unit , " <br/>"
243
+ " Morale: " , morale _unit , " <br/>" ,
244
+ " Current Command: " , _currentCommand , " <br/>" ,
245
+ " UnitState: " , getUnitState _unit , " <br/>"
218
246
];
219
247
if ! (_unit checkAIFeature " PATH" ) then {
220
248
_textData append [" <t color='#FFAA00'>PATH disabled</t>" , " <br/>" ];
@@ -229,7 +257,10 @@ private _posCam = positionCameraToWorld [0, 0, 0];
229
257
_textData append [" <t color='#FFC0CB'>Fleeing</t>" , " <br/>" ];
230
258
};
231
259
if (isHidden _unit ) then {
232
- _textData append [" <t color='#1e18d9'>Hidden</t>" , " <br/>" ];
260
+ _textData append [" <t color='#3631de'>Hidden</t>" , " <br/>" ];
261
+ };
262
+ if (insideBuilding _unit isEqualTo 1 ) then {
263
+ _textData append [" <t color='#cc18bc'>Inside</t>" , " <br/>" ];
233
264
};
234
265
if ! (unitReady _unit ) then {
235
266
_textData append [" <t color='#FFA500'>Busy</t>" , " <br/>" ];
@@ -239,8 +270,17 @@ private _posCam = positionCameraToWorld [0, 0, 0];
239
270
if (GVAR(debug_RenderExpectedDestination)) then {
240
271
(expectedDestination _unit ) params [" _pos" , " _planingMode" , " _forceReplan" ];
241
272
if (_unit distance _pos > _viewDistance ) exitWith {};
242
- drawLine3D [_renderPos , _pos , [0 , 0 , 1 , 0.5 ]];
243
- drawIcon3D [" a3\ui_f\data\Map\Markers\System\dummy_ca.paa" , [1 , 1 , 1 , 1 ], _pos , 1 , 1 , 0 , format [" %1m: %2%3" , floor (_unit distance _pos ), _planingMode , [" " , " (ForceReplan)" ] select _forceReplan ]];
273
+ drawLine3D [_renderPos , _pos , [1 , 1 , 1 , 1 ]];
274
+ private _iconSize = linearConversion [0 , 30 , speed _unit , 0.4 , 1.2 , true ];
275
+ drawIcon3D [
276
+ [" \a3\ui_f\data\igui\cfg\simpletasks\types\walk_ca.paa" , " \a3\ui_f\data\igui\cfg\simpletasks\types\car_ca.paa" ] select (speed _unit > 24 ),
277
+ [1 , 1 , 1 , 1 ],
278
+ _pos ,
279
+ _iconSize ,
280
+ _iconSize ,
281
+ 0 ,
282
+ format [" %1m: %2%3" , floor (_unit distance _pos ), _planingMode , [" " , " (ForceReplan)" ] select _forceReplan ]
283
+ ];
244
284
};
245
285
};
246
286
} forEach (allUnits select {! (isPlayer _x )});
0 commit comments