Hack to fix R_IsViewpointThirdPerson crashing due to invalid player ref
Basically to explain due to R_InterpolateView being called here it can possibly pass an invalid player ref to R_IsViewpointThirdPerson since the player mobj hasn't been created yet. Thanks to GenericHeroGuy for helping me figure this out.
This commit is contained in:
parent
259bc5dd97
commit
bbd22ad1af
1 changed files with 4 additions and 1 deletions
|
|
@ -918,7 +918,10 @@ void ST_Drawer(void)
|
|||
stplyr = &players[displayplayers[i]];
|
||||
stplyrnum = i;
|
||||
R_SetViewContext(VIEWCONTEXT_PLAYER1 + i);
|
||||
R_InterpolateView(rendertimefrac); // to assist with object tracking
|
||||
|
||||
// HACK: This can possibly crash the game in R_IsViewpointThirdPerson during first two tics if the player object doesn't exist.
|
||||
if (stplyr->mo)
|
||||
R_InterpolateView(rendertimefrac); // to assist with object tracking
|
||||
ST_overlayDrawer();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue