From 95b01c9b4383bfdcc9403f4a1074459fe140ef59 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 7 Nov 2025 21:28:28 +0100 Subject: [PATCH] call NetKeepAlive during ogl precache should prevent timeouts on slower systems (*cough* *cough* windoze *cough*) hopefully thx neppy for the idea! --- src/hardware/hw_cache.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 300f29818..5c3ca7683 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -615,6 +615,9 @@ static void HWR_PrecacheLevelFlats(void) // go through all sectors to determine if it should be remapped for encore for (i = 0; i < numsectors; i++) { + // prevent timeouts + NetKeepAlive(); + sector_t *sec = §ors[i]; // gotta check sector floor and ceiling @@ -646,6 +649,9 @@ static void HWR_PrecacheLevelFlats(void) // just load every flat in the level for (i = 0; i < numlevelflats; i++) { + // prevent timeouts + NetKeepAlive(); + const levelflat_t *levelflat = &levelflats[i]; lump = levelflat->lumpnum; @@ -682,6 +688,9 @@ static void HWR_PrecacheLevelTextures(void) for (i = 0; i < numlines; i++) { + // prevent timeouts + NetKeepAlive(); + const line_t *line = &lines[i]; #ifdef GLENCORE const int noencoremap = ((encoremap && (line->flags & ML_TFERLINE)) ? 2 : 1); @@ -774,6 +783,9 @@ static void HWR_PrecacheLevelTextures(void) for (i = 0; i < numsprites; i++) { + // prevent timeouts + NetKeepAlive(); + if (!spritepresent[i]) continue;