- Duke: Wrap calls that add to player_struct::PlayerOldPosition.

This commit is contained in:
Mitchell Richters 2022-11-15 18:43:26 +11:00 committed by Christoph Oelckers
parent e4dd69f5b0
commit fffc1915a9
2 changed files with 6 additions and 1 deletions

View file

@ -3049,7 +3049,7 @@ void handle_se17(DDukeActor* actor)
ps[p].PlayerOldPosition -= ps[p].posGet(); ps[p].PlayerOldPosition -= ps[p].posGet();
ps[p].posXY() += act2->spr.pos.XY() - actor->spr.pos.XY(); ps[p].posXY() += act2->spr.pos.XY() - actor->spr.pos.XY();
ps[p].posZadd(act2->sector()->floorz - sc->floorz); ps[p].posZadd(act2->sector()->floorz - sc->floorz);
ps[p].PlayerOldPosition += ps[p].posGet(); ps[p].posoldAdd(ps[p].posGet());
if (q > 0) ps[p].backupz(); if (q > 0) ps[p].backupz();

View file

@ -422,6 +422,11 @@ struct player_struct
{ {
return PlayerOldPosition.Z; return PlayerOldPosition.Z;
} }
void posoldAdd(const DVector3& val)
{
PlayerOldPosition += val;
}
}; };
struct Cycler struct Cycler