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 e85e621d2c
commit 8845043d31
1 changed files with 1 additions and 1 deletions

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);