mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-13 08:38:59 +00:00
ref_gl: fix out-by-one when all lightstyles are used. Also fix broken in this case in vbo after previous fix
This commit is contained in:
parent
96f7f5457d
commit
b81f94518a
@ -1182,7 +1182,7 @@ dynamic:
|
|||||||
|
|
||||||
if( is_dynamic )
|
if( is_dynamic )
|
||||||
{
|
{
|
||||||
if(( fa->styles[maps] >= 32 || fa->styles[maps] == 0 || fa->styles[maps] == 20 ) && ( fa->dlightframe != tr.framecount ))
|
if(( maps < MAXLIGHTMAPS ) && ( fa->styles[maps] >= 32 || fa->styles[maps] == 0 || fa->styles[maps] == 20 ) && ( fa->dlightframe != tr.framecount ))
|
||||||
{
|
{
|
||||||
byte temp[132*132*4];
|
byte temp[132*132*4];
|
||||||
mextrasurf_t *info = fa->info;
|
mextrasurf_t *info = fa->info;
|
||||||
@ -2878,11 +2878,11 @@ static qboolean R_CheckLightMap( msurface_t *fa )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// already up to date
|
// already up to date
|
||||||
if( !is_dynamic && ( fa->dlightframe != tr.framecount || maps == MAXLIGHTMAPS ) )
|
if( !is_dynamic && ( fa->dlightframe != tr.framecount ))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// build lightmap
|
// build lightmap
|
||||||
if(( fa->styles[maps] >= 32 || fa->styles[maps] == 0 ) && ( fa->dlightframe != tr.framecount ))
|
if(( maps < MAXLIGHTMAPS ) && ( fa->styles[maps] >= 32 || fa->styles[maps] == 0 ) && ( fa->dlightframe != tr.framecount ))
|
||||||
{
|
{
|
||||||
byte temp[132*132*4];
|
byte temp[132*132*4];
|
||||||
int smax, tmax;
|
int smax, tmax;
|
||||||
|
Loading…
Reference in New Issue
Block a user