From 9f9858d8f4738507a1342b0c639c394dab152e7e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 1 Sep 2022 01:10:51 +0200 Subject: [PATCH] - handle remaining zvel comparisons. --- source/games/duke/src/actors_r.cpp | 6 +++--- source/games/exhumed/src/object.cpp | 2 +- source/games/exhumed/src/player.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index a174b99d5..323386d45 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -955,7 +955,7 @@ static void chickenarrow(DDukeActor* actor) actor->set_int_ang(ang); if (actor->spr.hitag > 180) - if (actor->int_zvel() <= 0) + if (actor->float_zvel() <= 0) actor->add_int_zvel( 200); } } @@ -1579,10 +1579,10 @@ void movetransports_r(void) case STAT_MISC: case STAT_DUMMYPLAYER: - ll = abs(act2->int_zvel()) * zinttoworld; + ll = abs(act2->float_zvel()); if (isRRRA()) { - if (act2->int_zvel() >= 0) + if (act2->float_zvel() >= 0) warpdir = 2; else warpdir = 1; diff --git a/source/games/exhumed/src/object.cpp b/source/games/exhumed/src/object.cpp index f8915e5a4..0975a0b72 100644 --- a/source/games/exhumed/src/object.cpp +++ b/source/games/exhumed/src/object.cpp @@ -1441,7 +1441,7 @@ void AISpark::Tick(RunListEvent* ev) return; } - if (pActor->int_zvel() <= 0) { + if (pActor->float_zvel() <= 0) { return; } } diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index bfd5fc3bd..6f4b10bea 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -834,7 +834,7 @@ void AIPlayer::Tick(RunListEvent* ev) Gravity(pPlayerActor); - if (pPlayerActor->int_zvel() >= 6500 && zVel < 6500) + if (pPlayerActor->float_zvel() >= 6500/256. && zVel < 6500) { D3PlayFX(StaticSound[kSound17], pPlayerActor); }