From 1c8a0006f03567e144b520a397ed20fb70df1dad Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 28 Apr 2025 11:19:47 +0200 Subject: [PATCH] skip rechecking for horizonlines when reloading gamestate map remains the same during desynch, so safe some time --- src/hardware/hw_main.c | 5 +++-- src/p_setup.c | 3 +-- src/p_setup.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 12a949fd0..6dd264618 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5742,7 +5742,7 @@ static void HWR_CheckForHorizonLines(void) } } -void HWR_LoadLevel(void) +void HWR_LoadLevel(boolean reloadinggamestate) { HWR_CreatePlanePolygons((INT32)numnodes - 1); @@ -5750,7 +5750,8 @@ void HWR_LoadLevel(void) HWR_ClearSkyDome(); HWR_BuildSkyDome(); - HWR_CheckForHorizonLines(); + if (!reloadinggamestate) + HWR_CheckForHorizonLines(); if (HWR_ShouldUsePaletteRendering()) HWR_SetMapPalette(); diff --git a/src/p_setup.c b/src/p_setup.c index 755dcc885..5fba5dc48 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3081,9 +3081,8 @@ boolean P_SetupLevel(boolean fromnetsave, boolean reloadinggamestate) if (rendermode == render_opengl) { HWR_FreeExtraSubsectors(); - // Create plane polygons. - HWR_LoadLevel(); + HWR_LoadLevel(reloadinggamestate); } #endif diff --git a/src/p_setup.h b/src/p_setup.h index 47a9ea85b..97209e154 100644 --- a/src/p_setup.h +++ b/src/p_setup.h @@ -63,7 +63,7 @@ void P_SetupLevelSky(INT32 skynum, boolean global); boolean P_SetupLevel(boolean fromnetsave, boolean reloadinggamestate); #ifdef HWRENDER -void HWR_LoadLevel(void); +void HWR_LoadLevel(boolean reloadinggamestate); #endif boolean P_AddWadFile(const char *wadfilename, boolean local);