mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
ref_soft: invalidata all caches on dlight rebuild
This commit is contained in:
parent
6879c1f097
commit
d315a838bd
10
r_surf.c
10
r_surf.c
@ -1161,6 +1161,16 @@ surfcache_t *D_CacheSurface (msurface_t *surface, int miplevel)
|
|||||||
&& cache->lightadj[3] == r_drawsurf.lightadj[3] )
|
&& cache->lightadj[3] == r_drawsurf.lightadj[3] )
|
||||||
return cache;
|
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
|
// determine shape of surface
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user