- fixed: When looking through a plane mirror the portal plane exclusion logic needs to be flipped, because the mirror inverts the vertical view direction.

This commit is contained in:
Christoph Oelckers 2016-12-29 19:54:38 +01:00
parent 125a30307a
commit f52744e8a4

View file

@ -777,6 +777,8 @@ void GLPlaneMirrorPortal::DrawContents()
ClearScreen(); ClearScreen();
return; return;
} }
// A plane mirror needs to flip the portal exclusion logic because inside the mirror, up is down and down is up.
std::swap(instack[sector_t::floor], instack[sector_t::ceiling]);
int old_pm=PlaneMirrorMode; int old_pm=PlaneMirrorMode;
@ -794,6 +796,7 @@ void GLPlaneMirrorPortal::DrawContents()
gl_RenderState.SetClipHeight(0.f, 0.f); gl_RenderState.SetClipHeight(0.f, 0.f);
PlaneMirrorFlag--; PlaneMirrorFlag--;
PlaneMirrorMode=old_pm; PlaneMirrorMode=old_pm;
std::swap(instack[sector_t::floor], instack[sector_t::ceiling]);
} }
void GLPlaneMirrorPortal::PushState() void GLPlaneMirrorPortal::PushState()