From 93fd94ecbbcf33cd896adebe91701f3c5464009d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 29 Aug 2022 22:30:11 +0200 Subject: [PATCH] - partial floatification of movesprite --- source/games/exhumed/src/move.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index 8240e6ffb..140c39f33 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -490,9 +490,7 @@ Collision movesprite(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist { bTouchFloor = false; - int x = pActor->int_pos().X; - int y = pActor->int_pos().Y; - int z = pActor->int_pos().Z; + auto spos = pActor->spr.pos; int nSpriteHeight = GetActorHeight(pActor); @@ -501,9 +499,9 @@ Collision movesprite(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist auto pSector = pActor->sector(); assert(pSector); - int floorZ = pSector->int_floorz(); + double floorZ = pSector->floorz; - if ((pSector->Flag & kSectUnderwater) || (floorZ < z)) + if ((pSector->Flag & kSectUnderwater) || (floorZ < spos.Z)) { dx >>= 1; dy >>= 1; @@ -552,9 +550,9 @@ Collision movesprite(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist dz = 0; } - if ((pSector->int_floorz() - z) < (dz + flordist)) + if ((pSector->floorz - spos.Z) < (dz + flordist) * zinttoworld) { - pActor->set_int_xy( x, y); + pActor->spr.pos.XY() = spos.XY(); } else {