diff --git a/src/p_map.c b/src/p_map.c index b84fc7e27..088d55208 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1057,6 +1057,10 @@ static unsigned PIT_DoCheckThing(mobj_t *thing) P_SetTarget(&tmthing->tracer, thing); if (!P_IsObjectOnGround(thing)) thing->momz += tmthing->momz; + + thing->extravalue1 = thing->flags2; + thing->extravalue2 = thing->eflags; + return CHECKTHING_COLLIDE; } } diff --git a/src/p_user.c b/src/p_user.c index 9de234273..417154b19 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1089,6 +1089,17 @@ void P_ResetPlayer(player_t *player) else player->mo->tracer->momz += 1; + // Restore MF2_OBJECTFLIP / MFE_VERTICALFLIP + if (player->mo->tracer->extravalue1 & MF2_OBJECTFLIP) + player->mo->tracer->flags2 |= MF2_OBJECTFLIP; + else + player->mo->tracer->flags2 &= ~MF2_OBJECTFLIP; + + if (player->mo->tracer->extravalue2 & MFE_VERTICALFLIP) + player->mo->tracer->eflags |= MFE_VERTICALFLIP; + else + player->mo->tracer->eflags &= ~MFE_VERTICALFLIP; + P_SetTarget(&player->mo->tracer->tracer, NULL); } P_SetTarget(&player->mo->tracer, NULL); @@ -4574,6 +4585,17 @@ void P_DoJump(player_t *player, boolean soundandstate, boolean allowflip) else player->mo->tracer->momz += 1; + // Restore MF2_OBJECTFLIP / MFE_VERTICALFLIP + if (player->mo->tracer->extravalue1 & MF2_OBJECTFLIP) + player->mo->tracer->flags2 |= MF2_OBJECTFLIP; + else + player->mo->tracer->flags2 &= ~MF2_OBJECTFLIP; + + if (player->mo->tracer->extravalue2 & MFE_VERTICALFLIP) + player->mo->tracer->eflags |= MFE_VERTICALFLIP; + else + player->mo->tracer->eflags &= ~MFE_VERTICALFLIP; + player->mo->tracer->flags |= MF_PUSHABLE; P_SetTarget(&player->mo->tracer->tracer, NULL); }