don't draw bounding boxes for freed edicts

This commit is contained in:
entryway 2022-11-19 17:52:02 +02:00 committed by Ozkan Sezer
parent 9eaeb75fb2
commit a449780bb8

View file

@ -733,8 +733,8 @@ void R_ShowBoundingBoxes (void)
for (i=1, ed=NEXT_EDICT(sv.edicts) ; i<sv.num_edicts ; i++, ed=NEXT_EDICT(ed)) for (i=1, ed=NEXT_EDICT(sv.edicts) ; i<sv.num_edicts ; i++, ed=NEXT_EDICT(ed))
{ {
if (ed == sv_player) if (ed == sv_player || ed->free)
continue; //don't draw player's own bbox continue; //don't draw player's own bbox or freed edicts
// if (r_showbboxes.value != 2) // if (r_showbboxes.value != 2)
// if (!SV_VisibleToClient (sv_player, ed, sv.worldmodel)) // if (!SV_VisibleToClient (sv_player, ed, sv.worldmodel))