Correct pobby spawning for starting in reverse gravity but ending in normal gravity

This commit is contained in:
toaster 2024-04-09 16:25:51 +01:00
parent f274d24560
commit 6e9f53eab9

View file

@ -709,10 +709,14 @@ static void CreatePohbee(player_t *owner, waypoint_t *start, waypoint_t *end, UI
pohbee_owner(pohbee) = owner - players; pohbee_owner(pohbee) = owner - players;
// Flip the Poh-Bee if its target waypoint is flipped. // Flip the Poh-Bee if its target waypoint is flipped.
if (P_IsObjectFlipped(end->mobj)) const boolean waypointflipped = P_IsObjectFlipped(end->mobj);
if (waypointflipped != P_IsObjectFlipped(pohbee))
{
pohbee->flags2 ^= MF2_OBJECTFLIP;
pohbee->eflags ^= MFE_VERTICALFLIP;
}
if (waypointflipped) // now equivalent to P_IsObjectFlipped(pohbee)
{ {
pohbee->flags2 |= MF2_OBJECTFLIP;
pohbee->eflags |= MFE_VERTICALFLIP;
size += pohbee->height - end->mobj->height; size += pohbee->height - end->mobj->height;
} }