mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-23 08:21:23 +00:00
- SW: Add inertia correction to PlayerWarpUpdatePos()
.
* Warping between sectors such as the clouds in $volcano now maintains perfect velocity, etc.
This commit is contained in:
parent
2de707e7f8
commit
db8a53e7d4
1 changed files with 11 additions and 7 deletions
|
@ -166,7 +166,7 @@ void DoPlayerDeathExplode(PLAYER* pp);
|
|||
void DoPlayerDeathFall(PLAYER* pp);
|
||||
|
||||
void PlayerCheckValidMove(PLAYER* pp);
|
||||
void PlayerWarpUpdatePos(PLAYER* pp);
|
||||
void PlayerWarpUpdatePos(PLAYER* pp, const DVector3& oldpos);
|
||||
void DoPlayerBeginDiveNoWarp(PLAYER* pp);
|
||||
int PlayerCanDiveNoWarp(PLAYER* pp);
|
||||
void DoPlayerCurrent(PLAYER* pp);
|
||||
|
@ -2222,12 +2222,15 @@ void DoPlayerMove(PLAYER* pp)
|
|||
}
|
||||
|
||||
// check for warp - probably can remove from CeilingHit
|
||||
const auto oldpos = pp->pos;
|
||||
if (WarpPlane(pp->pos, &pp->cursector))
|
||||
{
|
||||
PlayerWarpUpdatePos(pp);
|
||||
PlayerWarpUpdatePos(pp, oldpos);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoPlayerZrange(pp);
|
||||
}
|
||||
|
||||
DoPlayerZrange(pp);
|
||||
|
||||
//PlayerSectorBound(pp, 1);
|
||||
|
||||
|
@ -3500,9 +3503,10 @@ void DoPlayerClimb(PLAYER* pp)
|
|||
LadderUpdate = true;
|
||||
}
|
||||
|
||||
const auto oldpos = pp->pos;
|
||||
if (WarpPlane(pp->pos, &pp->cursector))
|
||||
{
|
||||
PlayerWarpUpdatePos(pp);
|
||||
PlayerWarpUpdatePos(pp, oldpos);
|
||||
LadderUpdate = true;
|
||||
}
|
||||
|
||||
|
@ -3750,12 +3754,12 @@ void DoPlayerBeginFly(PLAYER* pp)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void PlayerWarpUpdatePos(PLAYER* pp)
|
||||
void PlayerWarpUpdatePos(PLAYER* pp, const DVector3& oldpos)
|
||||
{
|
||||
if (Prediction)
|
||||
return;
|
||||
|
||||
pp->opos = pp->pos;
|
||||
pp->opos += pp->pos - oldpos;
|
||||
DoPlayerZrange(pp);
|
||||
UpdatePlayerSprite(pp);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue