Obj_RingShooterInput: Fix several issues with the to-spot teleport

- Fix undesired fastfall bounce
- Fix reverse gravity
This commit is contained in:
toaster 2023-04-14 20:19:00 +01:00 committed by Sally Coolatta
parent 5b348ee195
commit e7896a7118

View file

@ -695,11 +695,24 @@ void Obj_RingShooterInput(player_t *player)
{
player->mo->momx = player->mo->momy = 0;
P_SetPlayerAngle(player, base->angle);
fixed_t setz;
if (base->eflags & MFE_VERTICALFLIP)
{
setz = base->z + base->height - player->mo->height;
setz = max(setz, player->mo->z);
}
else
{
setz = min(player->mo->z, base->z);
}
P_MoveOrigin(
player->mo,
base->x, base->y,
base->z // TODO: reverse gravity
setz
);
player->fastfall = 0;
if (base->fuse < RS_FUSE_TIME)
{