diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index ae88ea9c6..98ffd4526 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -3160,7 +3160,7 @@ void handle_se18(DDukeActor *actor, bool morecheck) { if (a2->isPlayer() && a2->GetOwner()) { - if (ps[a2->PlayerIndex()].on_ground == 1) ps[a2->PlayerIndex()].PlayerNowPosition.Z -= extra; + if (ps[a2->PlayerIndex()].on_ground == 1) ps[a2->PlayerIndex()].posZadd(-extra); } if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE) { @@ -3957,7 +3957,7 @@ void handle_se31(DDukeActor* actor, bool choosedir) { if (a2->isPlayer() && a2->GetOwner()) if (ps[a2->PlayerIndex()].on_ground == 1) - ps[a2->PlayerIndex()].PlayerNowPosition.Z -= l; + ps[a2->PlayerIndex()].posZadd(-l); if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE)) { a2->spr.pos.Z -= l; diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index 5d53ce36b..743bcf969 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -560,7 +560,7 @@ void playerisdead(int snum, int psectlotag, double floorz, double ceilingz) if (actor->spr.pal != 1) { SetPlayerPal(p, PalEntry(63, 63, 0, 0)); - p->PlayerNowPosition.Z -= 16; + p->posZadd(-16); actor->spr.pos.Z -= 16; } #if 0 diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 634149974..80f155d42 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -1689,7 +1689,7 @@ static void operateJetpack(int snum, ESyncBits actions, int psectlotag, double f if (p->jetpack_on < 11) { p->jetpack_on++; - p->PlayerNowPosition.Z -= (p->jetpack_on * 0.5); //Goin up + p->posZadd(-(p->jetpack_on * 0.5)); //Goin up } else if (p->jetpack_on == 11 && !S_CheckActorSoundPlaying(pact, DUKE_JETPACK_IDLE)) S_PlayActorSound(DUKE_JETPACK_IDLE, pact); @@ -1705,7 +1705,7 @@ static void operateJetpack(int snum, ESyncBits actions, int psectlotag, double f OnEvent(EVENT_SOARUP, snum, p->GetActor(), -1); if (GetGameVarID(g_iReturnVarID, p->GetActor(), snum).value() == 0) { - p->PlayerNowPosition.Z -= dist; + p->posZadd(-dist); p->crack_time = CRACK_TIME; } }