- Duke: Maintain x/y/z velocity when falling through a portal, such as E1L1's air duct.

This commit is contained in:
Mitchell Richters 2022-10-08 11:41:08 +11:00 committed by Christoph Oelckers
parent 7e7c1b1179
commit b3943a0c04

View file

@ -1816,14 +1816,10 @@ void movetransports_d(void)
if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP))) ||
(ps[p].jetpack_on && PlayerInput(p, SB_CROUCH)))
{
ps[p].pos.X += Owner->spr.pos.X - act->spr.pos.X;
ps[p].pos.Y += Owner->spr.pos.Y - act->spr.pos.Y;
ps[p].backupxy();
if (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP) || ps[p].jetpack_on < 11))
ps[p].pos.Z = Owner->spr.pos.Z - 24;
else ps[p].pos.Z = Owner->spr.pos.Z + 24;
ps[p].backupz();
ps[p].opos -= ps[p].pos;
ps[p].pos.XY() += Owner->spr.pos.XY() - act->spr.pos.XY();
ps[p].pos.Z = Owner->spr.pos.Z - (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP) || ps[p].jetpack_on < 11) ? 24 : -24);
ps[p].opos += ps[p].pos;
auto pa = ps[p].GetActor();
pa->opos = ps[p].pos;