From 571210fe56b25c999c1e37b45ba7113dd158424c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 29 Apr 2011 03:50:33 +0000 Subject: [PATCH] - Apply 3dfix2 and 3dfix3 (by hand, again). SVN r3191 (trunk) --- src/d_main.cpp | 10 ++++++++++ src/r_segs.cpp | 10 ++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 10e3e1c199..c781e285dc 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -106,6 +106,7 @@ #include "sc_man.h" #include "po_man.h" #include "resourcefiles/resourcefile.h" +#include "r_3dfloors.h" EXTERN_CVAR(Bool, hud_althud) void DrawHUD(); @@ -913,6 +914,15 @@ void D_ErrorCleanup () menuactive = MENU_Off; } insave = false; + fakeActive = 0; + fake3D = 0; + while (CurrentSkybox) + { + R_3D_DeleteHeights(); + R_3D_LeaveSkybox(); + } + R_3D_ResetClip(); + R_3D_DeleteHeights(); } //========================================================================== diff --git a/src/r_segs.cpp b/src/r_segs.cpp index e2b0aaafce..605487f12a 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -621,6 +621,10 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2) if (!(fake3D & FAKE3D_CLIPBOTTOM)) sclipBottom = floorheight; if (!(fake3D & FAKE3D_CLIPTOP)) sclipTop = ceilingheight; + // maybe not visible + if (sclipBottom >= frontsector->CenterCeiling()) return; + if (sclipTop <= frontsector->CenterFloor()) return; + if (fake3D & FAKE3D_DOWN2UP) { // bottom to viewz last = 0; @@ -635,7 +639,8 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2) rover->top.plane->a || rover->top.plane->b || rover->bottom.plane->a || rover->bottom.plane->b || rover->top.plane->Zat0() <= sclipBottom || - rover->bottom.plane->Zat0() >= ceilingheight) + rover->bottom.plane->Zat0() >= ceilingheight || + rover->top.plane->Zat0() <= floorheight) { if (!i) { @@ -816,7 +821,8 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2) rover->top.plane->a || rover->top.plane->b || rover->bottom.plane->a || rover->bottom.plane->b || rover->bottom.plane->Zat0() >= sclipTop || - rover->top.plane->Zat0() <= floorheight) + rover->top.plane->Zat0() <= floorheight || + rover->bottom.plane->Zat0() >= ceilingheight) { if ((unsigned)i == backsector->e->XFloor.ffloors.Size() - 1) {