mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-13 06:13:18 +00:00
Fix segfault when setting up view frame for a removed mobj
This commit is contained in:
parent
3176abe2e4
commit
820a70b854
2 changed files with 2 additions and 2 deletions
|
@ -1198,7 +1198,7 @@ void R_SetupFrame(player_t *player)
|
||||||
newview->x += quake.x;
|
newview->x += quake.x;
|
||||||
newview->y += quake.y;
|
newview->y += quake.y;
|
||||||
|
|
||||||
if (r_viewmobj->subsector)
|
if (!P_MobjWasRemoved(r_viewmobj) && r_viewmobj->subsector)
|
||||||
newview->sector = r_viewmobj->subsector->sector;
|
newview->sector = r_viewmobj->subsector->sector;
|
||||||
else
|
else
|
||||||
newview->sector = R_PointInSubsector(newview->x, newview->y)->sector;
|
newview->sector = R_PointInSubsector(newview->x, newview->y)->sector;
|
||||||
|
|
|
@ -3495,7 +3495,7 @@ boolean R_ThingVisible (mobj_t *thing)
|
||||||
(thing->sprite == SPR_NULL) || // Don't draw null-sprites
|
(thing->sprite == SPR_NULL) || // Don't draw null-sprites
|
||||||
(thing->flags2 & MF2_DONTDRAW) || // Don't draw MF2_LINKDRAW objects
|
(thing->flags2 & MF2_DONTDRAW) || // Don't draw MF2_LINKDRAW objects
|
||||||
(thing->drawonlyforplayer && thing->drawonlyforplayer != viewplayer) || // Don't draw other players' personal objects
|
(thing->drawonlyforplayer && thing->drawonlyforplayer != viewplayer) || // Don't draw other players' personal objects
|
||||||
(r_viewmobj && (
|
(!P_MobjWasRemoved(r_viewmobj) && (
|
||||||
(r_viewmobj == thing) || // Don't draw first-person players or awayviewmobj objects
|
(r_viewmobj == thing) || // Don't draw first-person players or awayviewmobj objects
|
||||||
(r_viewmobj->player && r_viewmobj->player->followmobj == thing) || // Don't draw first-person players' followmobj
|
(r_viewmobj->player && r_viewmobj->player->followmobj == thing) || // Don't draw first-person players' followmobj
|
||||||
(r_viewmobj == thing->dontdrawforviewmobj) // Don't draw objects that are hidden for the current view
|
(r_viewmobj == thing->dontdrawforviewmobj) // Don't draw objects that are hidden for the current view
|
||||||
|
|
Loading…
Reference in a new issue