Restore MF2_OBJECTFLIP/MFE_VERTICALFLIP on rollout rock disconnect

This commit is contained in:
SSNTails 2024-03-15 14:28:44 -04:00
parent 34cf7c1a01
commit a58d9036bc
2 changed files with 26 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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);
}