Browse Source

ref_soft: fix crash on map restart again

pull/2/head
mittorn 6 years ago
parent
commit
a6572dd042
  1. 2
      r_main.c
  2. 2
      r_surf.c

2
r_main.c

@ -1840,8 +1840,6 @@ void GAME_EXPORT R_NewMap (void) @@ -1840,8 +1840,6 @@ void GAME_EXPORT R_NewMap (void)
R_ClearDecals(); // clear all level decals
R_StudioResetPlayerModels();
D_FlushCaches();
r_cnumsurfs = sw_maxsurfs->value;
if (r_cnumsurfs <= MINSURFACES)

2
r_surf.c

@ -1010,7 +1010,7 @@ void D_FlushCaches( void ) @@ -1010,7 +1010,7 @@ void D_FlushCaches( void )
qboolean newmap = !world || !Q_strcmp( tr.mapname, WORLDMODEL->name );
// if newmap, surfaces already freed
if( !newmap && !tr.map_unload )
if( !tr.map_unload )
{
for(c = sc_base ; c ; c = c->next )
{

Loading…
Cancel
Save