diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 5373b5086..6674765e6 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -2075,6 +2075,7 @@ void polymost_drawrooms() GLInterface.EnableDepthTest(true); GLInterface.SetDepthFunc(DF_LEqual); GLInterface.SetRenderStyle(LegacyRenderStyles[STYLE_Translucent]); + renderSetViewpoint(0, 0, 0); gvrcorrection = viewingrange*(1.f/65536.f); //if (glprojectionhacks == 2) diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 47e35d1d3..4730e3835 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -921,7 +921,7 @@ void HWWall::DoMidTexture(HWDrawInfo* di, walltype* wal, //========================================================================== void HWWall::Process(HWDrawInfo *di, walltype *wal, sectortype* frontsector, sectortype* backsector) { - auto backwall = wall->nextwall >= 0 && wall->nextwall < numwalls? &wall[wal->nextwall] : nullptr; + auto backwall = wal->nextwall >= 0 && wal->nextwall < numwalls? &wall[wal->nextwall] : nullptr; auto p2wall = &wall[wal->point2]; float fch1; diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index bf3667eee..f967a8923 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -189,6 +189,7 @@ bool PolymostRenderState::Apply(FRenderState& state, GLState& oldState) else { state.EnableFog(0); + state.SetFog(0, 0); state.SetSoftLightLevel(ShadeDiv >= 1 / 1000.f ? 255 - Scale(Shade, 255, numshades) : 255); state.SetLightParms(VisFactor, ShadeDiv / (numshades - 2)); } @@ -391,7 +392,7 @@ void renderSetVisibility(float vis) void renderSetViewpoint(float x, float y, float z) { - vp.mCameraPos = {x, y, z, 0}; + vp.mCameraPos = {x, z, y, 0}; } void renderBeginScene()