- WHaven: Fix sprite interpolation issues.

This commit is contained in:
Mitchell Richters 2020-11-08 19:57:32 +11:00
parent aa4470a237
commit ed942ab1b7
2 changed files with 16 additions and 1 deletions

View file

@ -301,6 +301,19 @@ bool playrunning()
return (paused == 0 || multiplayer/* || demoplay/record*/);
}
static void recordoldspritepos()
{
for (int i = 0; i < MAXSPRITES; i++)
{
SPRITE* spr = &sprite[i];
Loc* oldLoc = &oldLocs[i];
oldLoc->x = spr->x;
oldLoc->y = spr->y;
oldLoc->z = spr->z;
oldLoc->ang = spr->ang;
}
}
void GameInterface::Ticker()
{
// Make copies so that the originals do not have to be modified.
@ -323,6 +336,8 @@ void GameInterface::Ticker()
PLAYER &plr = player[pyrn];
viewBackupPlayerLoc(pyrn);
recordoldspritepos();
processinput(pyrn);
updateviewmap(plr);
updatepaletteshifts();

View file

@ -389,7 +389,7 @@ struct Loc
{
int x, y, z, ang;
};
extern Loc oldLoc[MAXSPRITES];
extern Loc oldLocs[MAXSPRITES];
struct ANIMATION
{