From ea0bf216c59e7b18740ff9851f29d5f7784a7e4c Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 3 Nov 2022 14:50:29 +0000 Subject: [PATCH] Newview hack crash fixes - Renderer should exist - Player mo should exist --- src/p_tick.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/p_tick.c b/src/p_tick.c index a7f53b003..f2aab3aef 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -787,15 +787,20 @@ 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 <= r_splitscreen; i++) + if (rendermode != render_none) { - player_t *player = &players[displayplayers[i]]; - const boolean skybox = (player->skybox.viewpoint && cv_skybox.value); // True if there's a skybox object and skyboxes are on - if (skybox) + for (i = 0; i <= r_splitscreen; i++) { - R_SkyboxFrame(i); + player_t *player = &players[displayplayers[i]]; + if (!player->mo) + continue; + const boolean skybox = (player->skybox.viewpoint && cv_skybox.value); // True if there's a skybox object and skyboxes are on + if (skybox) + { + R_SkyboxFrame(i); + } + R_SetupFrame(i); } - R_SetupFrame(i); } }