mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
SW: Lock angle and horiz right after teleporting to sprite
This commit is contained in:
parent
8e9130c31a
commit
e2a789b8cc
2 changed files with 3 additions and 1 deletions
|
@ -3281,12 +3281,13 @@ getinput(SW_PACKET *loc, SWBOOL tied)
|
|||
q16angvel = fix16_clamp(q16angvel, -fix16_from_int(MAXANGVEL), fix16_from_int(MAXANGVEL));
|
||||
q16aimvel = fix16_clamp(q16aimvel, -fix16_from_int(MAXHORIZVEL), fix16_from_int(MAXHORIZVEL));
|
||||
|
||||
void DoPlayerTeleportPause(PLAYERp pp);
|
||||
if (PedanticMode)
|
||||
{
|
||||
q16angvel = fix16_floor(q16angvel);
|
||||
q16aimvel = fix16_floor(q16aimvel);
|
||||
}
|
||||
else if (!TEST(pp->Flags, PF_DEAD))
|
||||
else if (!TEST(pp->Flags, PF_DEAD) && (pp->DoPlayerAction != DoPlayerTeleportPause))
|
||||
{
|
||||
if (!TEST(pp->Flags, PF_CLIMBING) && !pp->sop_control)
|
||||
DoPlayerTurn(pp, &pp->camq16ang, q16angvel);
|
||||
|
|
|
@ -1333,6 +1333,7 @@ void
|
|||
DoPlayerTeleportToSprite(PLAYERp pp, SPRITEp sp)
|
||||
{
|
||||
pp->camq16ang = pp->q16ang = pp->oq16ang = fix16_from_int(sp->ang);
|
||||
pp->camq16horiz = pp->q16horiz; // Ensure horiz is initially locked
|
||||
pp->posx = pp->oposx = pp->oldposx = sp->x;
|
||||
pp->posy = pp->oposy = pp->oldposy = sp->y;
|
||||
|
||||
|
|
Loading…
Reference in a new issue