From 34da3e0ccdef383db0eec63d548101125e87f77a Mon Sep 17 00:00:00 2001 From: mittorn Date: Mon, 18 Mar 2019 00:56:23 +0700 Subject: [PATCH] ref: clear draw entities when clearing edicts --- ref_gl/gl_context.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ref_gl/gl_context.c b/ref_gl/gl_context.c index 71e978c8..cc2a1164 100644 --- a/ref_gl/gl_context.c +++ b/ref_gl/gl_context.c @@ -377,6 +377,13 @@ void Mod_UnloadTextures( model_t *mod ) void R_ProcessEntData( qboolean allocate ) { + if( !allocate ) + { + tr.draw_list->num_solid_entities = 0; + tr.draw_list->num_trans_entities = 0; + tr.draw_list->num_beam_entities = 0; + } + if( gEngfuncs.drawFuncs->R_ProcessEntData ) gEngfuncs.drawFuncs->R_ProcessEntData( allocate ); }