Signs: always use map thing's angle if it exists, else face direction player is moving from

If no map thing exists, should face toward the camera, not
away from it.
This commit is contained in:
James R 2023-03-20 21:01:42 -07:00
parent 15edab5e85
commit 4b993a3de0

View file

@ -4621,6 +4621,8 @@ void P_SetupSignExit(player_t *player, boolean tie)
thinker_t *think;
INT32 numfound = 0;
angle_t bestAngle = K_MomentumAngle(player->mo) + ANGLE_180;
if (player->position != 1)
return;
@ -4630,6 +4632,8 @@ void P_SetupSignExit(player_t *player, boolean tie)
if (thing->type != MT_SIGN)
continue;
bestAngle = thing->angle;
if (tie)
{
break;
@ -4656,6 +4660,8 @@ void P_SetupSignExit(player_t *player, boolean tie)
if (thing->type != MT_SIGN)
continue;
bestAngle = thing->angle;
if (tie)
{
break;
@ -4675,7 +4681,7 @@ void P_SetupSignExit(player_t *player, boolean tie)
if (player->mo && !P_MobjWasRemoved(player->mo))
{
thing = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->floorz, MT_SIGN);
thing->angle = player->mo->angle;
thing->angle = bestAngle;
P_SetupSignObject(thing, player->mo, (tie == false)); // Use :youfuckedup: sign face, except during ties
}
}