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,9 +787,13 @@ 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
if (rendermode != render_none)
{
for (i = 0; i <= r_splitscreen; 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)
{
@ -798,6 +802,7 @@ void P_Ticker(boolean run)
R_SetupFrame(i);
}
}
}
P_MapEnd();