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;