From a226337185b67f18d3e1b1a95b492f8ab92d7467 Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Sun, 22 Jan 2017 07:50:18 +0200 Subject: [PATCH] More portal fixing in software renderer --- src/r_main.cpp | 6 +++--- src/r_plane.cpp | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/r_main.cpp b/src/r_main.cpp index 25e3021f0..1ae22ba3f 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -618,9 +618,6 @@ void R_HighlightPortal (PortalDrawseg* pds) void R_EnterPortal (PortalDrawseg* pds, int depth) { - // [ZZ] portal hook - E_RenderCamera(); - // [ZZ] check depth. fill portal with black if it's exceeding the visual recursion limit, and continue like nothing happened. if (depth >= r_portal_recursions) { @@ -723,6 +720,9 @@ void R_EnterPortal (PortalDrawseg* pds, int depth) R_CopyStackedViewParameters(); + // [ZZ] portal hook + E_RenderCamera(); + validcount++; PortalDrawseg* prevpds = CurrentPortal; CurrentPortal = pds; diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 29f852ece..b452d97a0 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -59,6 +59,7 @@ #include "v_palette.h" #include "r_data/colormaps.h" #include "g_levellocals.h" +#include "events.h" #ifdef _MSC_VER #pragma warning(disable:4244) @@ -1178,6 +1179,8 @@ void R_DrawPortals () R_SetViewAngle (); validcount++; // Make sure we see all sprites + E_RenderCamera(); + R_ClearPlanes (false); R_ClearClipSegs (pl->left, pl->right); WindowLeft = pl->left;