Fix crash when a polyobject rotates a non-player mobj

This commit is contained in:
Louis-Antoine 2020-06-30 18:37:21 +02:00
parent 696f9707fc
commit 40e98e5712
1 changed files with 2 additions and 1 deletions

View File

@ -1159,7 +1159,8 @@ static void Polyobj_rotateThings(polyobj_t *po, vector2_t origin, angle_t delta,
if (turnthings == 2 || (turnthings == 1 && !mo->player)) {
mo->angle += delta;
P_SetPlayerAngle(mo->player, (angle_t)(mo->player->angleturn << 16) + delta);
if (mo->player)
P_SetPlayerAngle(mo->player, (angle_t)(mo->player->angleturn << 16) + delta);
}
}
}