Skip to content

Commit 9a9a5c2

Browse files
committed
Fix r_showEntityTransforms drawing garbage for sprites
For RT_SPRITE entities the bounds are not valid and it would draw something using garbage data from a previous entity. Skip anything that is not RT_MODEL.
1 parent 03499db commit 9a9a5c2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/engine/renderer/tr_backend.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,11 @@ static void RB_RenderDebugUtils()
15951595

15961596
for ( i = 0; i < backEnd.refdef.numEntities; i++, ent++ )
15971597
{
1598+
if ( ent->e.reType != refEntityType_t::RT_MODEL )
1599+
{
1600+
continue;
1601+
}
1602+
15981603
if ( ( ent->e.renderfx & RF_THIRD_PERSON ) &&
15991604
backEnd.viewParms.portalLevel == 0 )
16001605
{

0 commit comments

Comments
 (0)