This repository has been archived on 2022-06-27. You can view files and clone it, but cannot push or open issues or pull requests.
Xash3DArchive/engine/client/gl_rmisc.c
2022-06-27 01:15:14 +03:00

38 lines
1.0 KiB
C

//=======================================================================
// Copyright XashXT Group 2010 ©
// gl_rmisc.c - renderer misceallaneous
//=======================================================================
#include "common.h"
#include "client.h"
#include "gl_local.h"
#include "cm_local.h"
void R_NewMap( void )
{
int i;
R_ClearDecals(); // clear all level decals
GL_BuildLightmaps ();
R_SetupSky( cl.refdef.movevars->skyName );
// clear out efrags in case the level hasn't been reloaded
for( i = 0; i < cl.worldmodel->numleafs; i++ )
cl.worldmodel->leafs[i].efrags = NULL;
tr.skytexturenum = -1;
r_viewleaf = r_oldviewleaf = NULL;
// clearing texture chains
for( i = 0; i < cl.worldmodel->numtextures; i++ )
{
if( !cl.worldmodel->textures[i] )
continue;
if( world.version == Q1BSP_VERSION && !com.strncmp( cl.worldmodel->textures[i]->name, "sky", 3 ))
tr.skytexturenum = i;
cl.worldmodel->textures[i]->texturechain = NULL;
}
}