diff --git a/src/d_clisrv.c b/src/d_clisrv.c index b25ec5a2d..e49f9ec20 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -7089,7 +7089,17 @@ void NetUpdate(void) realtics = nowtime - gametime; if (realtics <= 0) // nothing new to update + { + // dont do shit! + if (!resynch_local_inprogress) + { + //Local_Maketic(realtics); // make local tic, and call menu? + GetPackets(); // get packet from client or from server + CL_SendClientCmd(); // Send tic cmd + } + return; + } if (realtics > 5) { diff --git a/src/d_main.c b/src/d_main.c index aa773b76a..1501eec1b 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -593,6 +593,8 @@ static boolean D_Display(void) // if (wipe) { + // note: moved up here because NetUpdate does input changes + // and input during wipe tends to mess things up wipedefindex += WIPEFINALSHIFT; if (rendermode != render_none) @@ -603,6 +605,8 @@ static boolean D_Display(void) } } + NetUpdate(); // send out any new accumulation + // It's safe to end the game now. if (G_GetExitGameFlag()) { diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 0e195c8b1..481c7af8b 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -5680,6 +5680,9 @@ static void HWR_RenderViewpoint(gl_portal_t *rootportal, int stencil_level, bool if (LIKELY(cv_glbatching.value)) HWR_RenderBatches(true); + // Check for new console commands. + NetUpdate(); + if constexpr (Type == RenderViewpointType::kPortal) { if (skyWallVertexArraySize) // if there are skywalls to draw using the alternate method @@ -5760,11 +5763,17 @@ static void HWR_RenderFrame(boolean skybox, boolean drawsky) current_bsp_culling_distance = bsp_culling_distances[renderdist- 1]; } + // Check for new console commands. + NetUpdate(); + portalclipline = NULL; if (UNLIKELY(HWR_UsePortals())) HWR_RenderViewpoint(NULL, 0, !skybox); else HWR_RenderViewpoint(NULL, 0, !skybox); + + // Check for new console commands. + NetUpdate(); } // ========================================================================== diff --git a/src/r_main.cpp b/src/r_main.cpp index b92b88378..e470e5b5d 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -1378,6 +1378,12 @@ static void R_RenderViewpoint(maskcount_t* mask, boolean drawprecip) Mask_Post(mask); } +// FAB NOTE FOR WIN32 PORT !! I'm not finished already, +// but I suspect network may have problems with the video buffer being locked +// for all duration of rendering, and being released only once at the end.. +// I mean, there is a win16lock() or something that lasts all the rendering, +// so maybe we should release screen lock before each netupdate below..? + static fixed_t viewfov[MAXSPLITSCREENPLAYERS]; void R_RenderPlayerView(player_t *player) @@ -1444,11 +1450,13 @@ void R_RenderPlayerView(player_t *player) portalclipend = viewwidth; R_ClearClipSegs(); } - R_ClearDrawSegs(); R_ClearSegTables(); R_ClearSprites(); + // check for new console commands. + NetUpdate(); + R_SetColumnContext(COLUMNCONTEXT_FLUSH); ps_numbspcalls.value.i = ps_numpolyobjects.value.i = ps_numdrawnodes.value.i = 0; PS_START_TIMING(ps_bsptime); @@ -1514,6 +1522,9 @@ void R_RenderPlayerView(player_t *player) PS_STOP_TIMING(ps_sw_maskedtime); free(masks); + // Check for new console commands. + NetUpdate(); + // save value to skyVisiblePerPlayer // this is so that P1 can't affect whether P2 can see a skybox or not, or vice versa skyVisiblePerPlayer[viewssnum] = skyVisible;