Merge branch 'fix-polyobject-rotation-crash' into 'next'

Fix crash when a polyobject rotates a non-player mobj

See merge request STJr/SRB2!1026
This commit is contained in:
James R 2020-07-01 19:40:36 -04:00
commit b34db0a38a
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);
}
}
}