From 461a80d357ce6bd8d654ce77b993ef16303d319e Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 29 Oct 2022 13:06:25 +0100 Subject: [PATCH 1/2] Only do view interpolation hack if renderer exists --- src/p_tick.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/p_tick.c b/src/p_tick.c index 57a7df129..5d36d4106 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -25,6 +25,7 @@ #include "k_kart.h" #include "r_main.h" #include "r_fps.h" +#include "i_video.h" // rendermode // Object place #include "m_cheat.h" @@ -816,15 +817,18 @@ void P_Ticker(boolean run) // Hack: ensure newview is assigned every tic. // Ensures view interpolation is T-1 to T in poor network conditions // We need a better way to assign view state decoupled from game logic - for (i = 0; i <= splitscreen; i++) + if (rendermode != render_none) { - player_t *player = &players[displayplayers[i]]; - boolean isSkyVisibleForPlayer = skyVisiblePerPlayer[i]; - if (isSkyVisibleForPlayer && player->mo && skyboxmo[0] && cv_skybox.value) + for (i = 0; i <= splitscreen; i++) { - R_SkyboxFrame(player); + player_t *player = &players[displayplayers[i]]; + boolean isSkyVisibleForPlayer = skyVisiblePerPlayer[i]; + if (isSkyVisibleForPlayer && player->mo && skyboxmo[0] && cv_skybox.value) + { + R_SkyboxFrame(player); + } + R_SetupFrame(player, (skyboxmo[0] && cv_skybox.value)); } - R_SetupFrame(player, (skyboxmo[0] && cv_skybox.value)); } } From 65737cd4bde4cc1806825d073fc9fa737732566a Mon Sep 17 00:00:00 2001 From: Eidolon Date: Sun, 30 Oct 2022 21:03:00 -0500 Subject: [PATCH 2/2] Only call SetupFrame in T-1 hack with player->mo --- src/p_tick.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/p_tick.c b/src/p_tick.c index 5d36d4106..87624d2a0 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -827,7 +827,10 @@ void P_Ticker(boolean run) { R_SkyboxFrame(player); } - R_SetupFrame(player, (skyboxmo[0] && cv_skybox.value)); + if (player->mo) + { + R_SetupFrame(player, (skyboxmo[0] && cv_skybox.value)); + } } } }