Newview hack crash fixes

- Renderer should exist
- Player mo should exist
This commit is contained in:
toaster 2022-11-03 14:50:29 +00:00
parent 0230b57aa8
commit ea0bf216c5

View file

@ -787,15 +787,20 @@ void P_Ticker(boolean run)
// Hack: ensure newview is assigned every tic. // Hack: ensure newview is assigned every tic.
// Ensures view interpolation is T-1 to T in poor network conditions // 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 // 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]]; for (i = 0; i <= r_splitscreen; i++)
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); 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);
} }
} }