diff --git a/src/gl/data/gl_portaldata.cpp b/src/gl/data/gl_portaldata.cpp index d4af49ad5..97c236b92 100644 --- a/src/gl/data/gl_portaldata.cpp +++ b/src/gl/data/gl_portaldata.cpp @@ -107,6 +107,7 @@ struct FCoverageBuilder //========================================================================== // // + // //========================================================================== FCoverageBuilder(subsector_t *sub) @@ -477,7 +478,6 @@ static void GroupLinePortals() { level.linePortals[i].mGroup = &level.linePortalSpans[tempindex[i]]; } - } void InitPortalGroups() diff --git a/src/gl/gl_functions.h b/src/gl/gl_functions.h deleted file mode 100644 index fe47af98a..000000000 --- a/src/gl/gl_functions.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __GL_FUNCT -#define __GL_FUNCT - -#include "v_palette.h" - -class AActor; - - -#endif diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index e7810d03e..c78c9190c 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -42,6 +42,7 @@ #include "po_man.h" #include "r_utility.h" #include "p_local.h" +#include "gl/gl_functions.h" #include "serializer.h" #include "g_levellocals.h" #include "events.h" @@ -1037,10 +1038,6 @@ void FGLInterface::StartSerialize(FSerializer &arc) void FGLInterface::EndSerialize(FSerializer &arc) { - if (arc.isReading()) - { - // The portal data needs to be recreated after reading a savegame. - } } //=========================================================================== @@ -1150,7 +1147,6 @@ void FGLInterface::RenderTextureView (FCanvasTexture *tex, AActor *Viewpoint, do // // //=========================================================================== -void gl_PreprocessLevel(); void FGLInterface::PreprocessLevel() { diff --git a/src/gl/scene/gl_sky.cpp b/src/gl/scene/gl_sky.cpp index f9defd1f9..d3fddfa9d 100644 --- a/src/gl/scene/gl_sky.cpp +++ b/src/gl/scene/gl_sky.cpp @@ -134,7 +134,7 @@ void GLWall::SkyPlane(sector_t *sector, int plane, bool allowreflect) case PORTS_PORTAL: case PORTS_LINKEDPORTAL: { - FSectorPortalGroup *glport = sector->GetPortalGroup(plane); + auto glport = sector->GetPortalGroup(plane); if (glport != NULL) { if (sector->PortalBlocksView(plane)) return; diff --git a/src/p_setup.cpp b/src/p_setup.cpp index fe8400a88..59b93b97a 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -4122,6 +4122,7 @@ void P_SetupLevel (const char *lumpname, int position) // This must be done BEFORE the PolyObj Spawn!!! Renderer->PreprocessLevel(); + InitPortalGroups(); times[16].Clock(); if (reloop) P_LoopSidedefs (false);