From d8b2b8394a783e257a0d2e71c2ce79f27a3e5a28 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 11 Nov 2025 14:18:21 +0100 Subject: [PATCH] only call netkeepalive between calls during gl precache this caused some crashes in blankart, hopefully this is fine though --- src/hardware/hw_cache.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 5c3ca7683..cd1b7b01a 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -615,9 +615,6 @@ 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 @@ -649,9 +646,6 @@ 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; @@ -688,9 +682,6 @@ 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); @@ -783,9 +774,6 @@ static void HWR_PrecacheLevelTextures(void) for (i = 0; i < numsprites; i++) { - // prevent timeouts - NetKeepAlive(); - if (!spritepresent[i]) continue; @@ -829,11 +817,20 @@ void HWR_PrecacheLevel(void) // Precache flats. HWR_PrecacheLevelFlats(); + // prevent timeouts + NetKeepAlive(); + // Precache textures. HWR_PrecacheLevelTextures(); + // prevent timeouts + NetKeepAlive(); + // Precache sprites. //HWR_PrecacheLevelSprites(); + + // prevent timeouts + //NetKeepAlive(); } void HWR_LoadMapTextures(size_t pnumtextures)