mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- SW: Wrap calls that get PLAYER::PlayerPrevPosition
.
This commit is contained in:
parent
ad7a626b92
commit
f711355f2f
3 changed files with 7 additions and 3 deletions
|
@ -811,7 +811,7 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& viewpos, doub
|
|||
else // Otherwise just interpolate the player sprite
|
||||
{
|
||||
pp = tActor->user.PlayerP;
|
||||
tsp->pos = interpolatedvalue(pp->PlayerPrevPosition, pp->posGet(), interpfrac);
|
||||
tsp->pos = interpolatedvalue(pp->posprevGet(), pp->posGet(), interpfrac);
|
||||
tsp->angle = pp->angle.interpolatedang(interpfrac);
|
||||
}
|
||||
}
|
||||
|
@ -1240,7 +1240,7 @@ void drawscreen(PLAYER* pp, double interpfrac, bool sceneonly)
|
|||
}
|
||||
|
||||
// Get initial player position, interpolating if required.
|
||||
DVector3 tpos = interpolatedvalue(camerapp->PlayerPrevPosition, camerapp->posGet(), interpfrac);
|
||||
DVector3 tpos = interpolatedvalue(camerapp->posprevGet(), camerapp->posGet(), interpfrac);
|
||||
if (SyncInput() || pp != Player+myconnectindex)
|
||||
{
|
||||
tang = camerapp->angle.interpolatedsum(interpfrac);
|
||||
|
|
|
@ -760,6 +760,10 @@ struct PLAYER
|
|||
{
|
||||
PlayerPrevPosition = val;
|
||||
}
|
||||
DVector3 posprevGet()
|
||||
{
|
||||
return PlayerPrevPosition;
|
||||
}
|
||||
};
|
||||
|
||||
extern PLAYER Player[MAX_SW_PLAYERS_REG+1];
|
||||
|
|
|
@ -598,7 +598,7 @@ void JS_DrawCameras(PLAYER* pp, const DVector3& campos, double smoothratio)
|
|||
|
||||
// If player is dead still then update at MoveSkip4
|
||||
// rate.
|
||||
if (pp->posGet() == pp->PlayerPrevPosition)
|
||||
if (pp->posGet() == pp->posprevGet())
|
||||
DoCam = true;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue