diff --git a/src/gl/scene/gl_portal.cpp b/src/gl/scene/gl_portal.cpp index 2e5df1da9..ed3812766 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -1180,6 +1180,7 @@ void GLHorizonPortal::DrawContents() gl_RenderState.SetMaterial(gltexture, CLAMP_NONE, 0, -1, false); + gl_RenderState.SetObjectColor(origin->specialcolor); gl_SetPlaneTextureRotation(sp, gltexture); gl_RenderState.AlphaFunc(GL_GEQUAL, 0.f); @@ -1237,6 +1238,7 @@ void GLEEHorizonPortal::DrawContents() horz.plane.GetFromSector(sector, sector_t::ceiling); horz.lightlevel = gl_ClampLight(sector->GetCeilingLight()); horz.colormap = sector->Colormap; + horz.specialcolor = 0xffffffff; if (portal->mType == PORTS_PLANE) { horz.plane.Texheight = r_viewpoint.Pos.Z + fabs(horz.plane.Texheight); @@ -1250,6 +1252,7 @@ void GLEEHorizonPortal::DrawContents() horz.plane.GetFromSector(sector, sector_t::floor); horz.lightlevel = gl_ClampLight(sector->GetFloorLight()); horz.colormap = sector->Colormap; + horz.specialcolor = 0xffffffff; if (portal->mType == PORTS_PLANE) { horz.plane.Texheight = r_viewpoint.Pos.Z - fabs(horz.plane.Texheight); diff --git a/src/gl/scene/gl_portal.h b/src/gl/scene/gl_portal.h index 9ef8cf5f7..010472c97 100644 --- a/src/gl/scene/gl_portal.h +++ b/src/gl/scene/gl_portal.h @@ -48,6 +48,7 @@ struct GLHorizonInfo GLSectorPlane plane; int lightlevel; FColormap colormap; + PalEntry specialcolor; }; struct GLSkyInfo diff --git a/src/gl/scene/gl_walls.cpp b/src/gl/scene/gl_walls.cpp index 018f8ab67..529d46bb5 100644 --- a/src/gl/scene/gl_walls.cpp +++ b/src/gl/scene/gl_walls.cpp @@ -441,6 +441,7 @@ bool GLWall::DoHorizon(seg_t * seg,sector_t * fs, vertex_t * v1,vertex_t * v2) hi.plane.GetFromSector(fs, sector_t::ceiling); hi.lightlevel = gl_ClampLight(fs->GetCeilingLight()); hi.colormap = fs->Colormap; + hi.specialcolor = fs->SpecialColors[sector_t::ceiling]; if (fs->e->XFloor.ffloors.Size()) { @@ -469,6 +470,7 @@ bool GLWall::DoHorizon(seg_t * seg,sector_t * fs, vertex_t * v1,vertex_t * v2) hi.plane.GetFromSector(fs, sector_t::floor); hi.lightlevel = gl_ClampLight(fs->GetFloorLight()); hi.colormap = fs->Colormap; + hi.specialcolor = fs->SpecialColors[sector_t::floor]; if (fs->e->XFloor.ffloors.Size()) {