diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index a7643a164..735a20644 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -3049,7 +3049,7 @@ void handle_se17(DDukeActor* actor) ps[p].PlayerOldPosition -= ps[p].posGet(); ps[p].posXY() += act2->spr.pos.XY() - actor->spr.pos.XY(); 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(); diff --git a/source/games/duke/src/types.h b/source/games/duke/src/types.h index ae595b131..378b98e07 100644 --- a/source/games/duke/src/types.h +++ b/source/games/duke/src/types.h @@ -422,6 +422,11 @@ struct player_struct { return PlayerOldPosition.Z; } + + void posoldAdd(const DVector3& val) + { + PlayerOldPosition += val; + } }; struct Cycler