ref_soft: invalidata all caches on dlight rebuild

This commit is contained in:
mittorn 2019-03-31 03:44:57 +07:00
parent 6879c1f097
commit d315a838bd
1 changed files with 10 additions and 0 deletions

View File

@ -1161,6 +1161,16 @@ surfcache_t *D_CacheSurface (msurface_t *surface, int miplevel)
&& cache->lightadj[3] == r_drawsurf.lightadj[3] )
return cache;
if( surface->dlightframe == r_framecount )
{
int i;
// invalidate dlight cache
for( i = 0; i < 4; i++)
{
if( CACHESPOT(surface)[i] )
CACHESPOT(surface)[i]->image = NULL;
}
}
//
// determine shape of surface
//