Fix Battle Causing the game to crash in dedicated servers

Check that the displayplayer mo exists before trying to use it for scaling on Player Arrow
This commit is contained in:
Sryder 2018-11-16 23:07:27 +00:00
parent 24215074d0
commit c7f7434f96

View file

@ -6802,7 +6802,7 @@ void P_MobjThinker(mobj_t *mobj)
mobj->angle = R_PointToAngle(mobj->x, mobj->y) + ANGLE_90; // literally only happened because i wanted to ^L^R the SPR_ITEM's
if (!splitscreen)
if (!splitscreen && players[displayplayer].mo)
{
scale = mobj->target->scale + FixedMul(FixedDiv(abs(P_AproxDistance(players[displayplayer].mo->x-mobj->target->x,
players[displayplayer].mo->y-mobj->target->y)), RING_DIST), mobj->target->scale);