From 43156f63ddf69fc57f008f128f18b2707e0dd4b6 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Mon, 20 Mar 2023 19:38:09 -0400 Subject: [PATCH] Only call NetUpdate once This doesn't need to be in a bunch of rendering code, simply only run it in TryRunTics. Worst case scenario: if this sucks then it means dedicated servers have also sucked the whole time and we should come up with a new solution to fix both of them. More likely scenario: nothing changes and we now aren't doing networking inside of the renderer. --- src/d_main.c | 2 -- src/hardware/hw_main.c | 18 ------------------ src/r_main.c | 3 --- 3 files changed, 23 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 7b75ff8d0..d24870f7a 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -724,8 +724,6 @@ static void D_Display(void) else wipetypepost = -1; - NetUpdate(); // send out any new accumulation - // It's safe to end the game now. if (G_GetExitGameFlag()) { diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index d729439cc..ee99501f4 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -6226,9 +6226,6 @@ void HWR_RenderSkyboxView(player_t *player) // set window position HWR_ShiftViewPort(); - // check for new console commands. - NetUpdate(); - gl_viewx = FIXED_TO_FLOAT(dup_viewx); gl_viewy = FIXED_TO_FLOAT(dup_viewy); gl_viewz = FIXED_TO_FLOAT(dup_viewz); @@ -6338,9 +6335,6 @@ void HWR_RenderSkyboxView(player_t *player) if (cv_glbatching.value) HWR_RenderBatches(); - // Check for new console commands. - NetUpdate(); - #ifdef ALAM_LIGHTING //14/11/99: Hurdler: moved here because it doesn't work with // subsector, see other comments; @@ -6364,9 +6358,6 @@ void HWR_RenderSkyboxView(player_t *player) HWD.pfnSetTransform(NULL); HWD.pfnUnSetShader(); - // Check for new console commands. - NetUpdate(); - // added by Hurdler for correct splitscreen // moved here by hurdler so it works with the new near clipping plane HWD.pfnGClipRect(0, 0, vid.width, vid.height, NZCLIP_PLANE); @@ -6438,9 +6429,6 @@ void HWR_RenderPlayerView(void) // set window position HWR_ShiftViewPort(); - // check for new console commands. - NetUpdate(); - gl_viewx = FIXED_TO_FLOAT(dup_viewx); gl_viewy = FIXED_TO_FLOAT(dup_viewy); gl_viewz = FIXED_TO_FLOAT(dup_viewz); @@ -6556,9 +6544,6 @@ void HWR_RenderPlayerView(void) if (cv_glbatching.value) HWR_RenderBatches(); - // Check for new console commands. - NetUpdate(); - #ifdef ALAM_LIGHTING //14/11/99: Hurdler: moved here because it doesn't work with // subsector, see other comments; @@ -6592,9 +6577,6 @@ void HWR_RenderPlayerView(void) HWR_DoPostProcessor(player); - // Check for new console commands. - NetUpdate(); - // added by Hurdler for correct splitscreen // moved here by hurdler so it works with the new near clipping plane HWD.pfnGClipRect(0, 0, vid.width, vid.height, NZCLIP_PLANE); diff --git a/src/r_main.c b/src/r_main.c index 9d001fc88..d4651a407 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1533,9 +1533,6 @@ void R_RenderPlayerView(void) R_ClearSprites(); Portal_InitList(); - // check for new console commands. - NetUpdate(); - // The head node is the last node output. Mask_Pre(&masks[nummasks - 1]);