mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
Fix not copying the shade variable first
This commit is contained in:
parent
8e72e094ce
commit
cc0c0f0236
1 changed files with 5 additions and 4 deletions
|
@ -873,24 +873,25 @@ namespace swrenderer
|
||||||
if (GetThingSprite(thing, sprite))
|
if (GetThingSprite(thing, sprite))
|
||||||
{
|
{
|
||||||
FDynamicColormap *thingColormap = basecolormap;
|
FDynamicColormap *thingColormap = basecolormap;
|
||||||
|
int thingShade = spriteshade;
|
||||||
if (sec->sectornum != thing->Sector->sectornum) // compare sectornums to account for R_FakeFlat copies.
|
if (sec->sectornum != thing->Sector->sectornum) // compare sectornums to account for R_FakeFlat copies.
|
||||||
{
|
{
|
||||||
int lightlevel = thing->Sector->GetTexture(sector_t::ceiling) == skyflatnum ? thing->Sector->GetCeilingLight() : thing->Sector->GetFloorLight();
|
int lightlevel = thing->Sector->GetTexture(sector_t::ceiling) == skyflatnum ? thing->Sector->GetCeilingLight() : thing->Sector->GetFloorLight();
|
||||||
spriteshade = LIGHT2SHADE(lightlevel + R_ActualExtraLight(foggy));
|
thingShade = LIGHT2SHADE(lightlevel + R_ActualExtraLight(foggy));
|
||||||
thingColormap = thing->Sector->ColorMap;
|
thingColormap = thing->Sector->ColorMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sprite.renderflags & RF_SPRITETYPEMASK) == RF_WALLSPRITE)
|
if ((sprite.renderflags & RF_SPRITETYPEMASK) == RF_WALLSPRITE)
|
||||||
{
|
{
|
||||||
RenderWallSprite::Project(thing, sprite.pos, sprite.picnum, sprite.spriteScale, sprite.renderflags, spriteshade, foggy, thingColormap);
|
RenderWallSprite::Project(thing, sprite.pos, sprite.picnum, sprite.spriteScale, sprite.renderflags, thingShade, foggy, thingColormap);
|
||||||
}
|
}
|
||||||
else if (sprite.voxel)
|
else if (sprite.voxel)
|
||||||
{
|
{
|
||||||
RenderVoxel::Project(thing, sprite.pos, sprite.voxel, sprite.spriteScale, sprite.renderflags, fakeside, fakefloor, fakeceiling, sec, spriteshade, foggy, thingColormap);
|
RenderVoxel::Project(thing, sprite.pos, sprite.voxel, sprite.spriteScale, sprite.renderflags, fakeside, fakefloor, fakeceiling, sec, thingShade, foggy, thingColormap);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RenderSprite::Project(thing, sprite.pos, sprite.tex, sprite.spriteScale, sprite.renderflags, fakeside, fakefloor, fakeceiling, sec, spriteshade, foggy, thingColormap);
|
RenderSprite::Project(thing, sprite.pos, sprite.tex, sprite.spriteScale, sprite.renderflags, fakeside, fakefloor, fakeceiling, sec, thingShade, foggy, thingColormap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue