diff --git a/source/games/exhumed/src/map.cpp b/source/games/exhumed/src/map.cpp index cd4e519dd..adb2a737e 100644 --- a/source/games/exhumed/src/map.cpp +++ b/source/games/exhumed/src/map.cpp @@ -54,18 +54,6 @@ void DrawMap(double const interpfrac) } } -void GetActorExtents(DExhumedActor* actor, int* top, int* bottom) -{ - *top = *bottom = actor->int_pos().Z; - if ((actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_FLOOR) - { - int height = tileHeight(actor->spr.picnum); - int center = height / 2 + tileTopOffset(actor->spr.picnum); - *top -= (actor->spr.yrepeat << 2) * center; - *bottom += (actor->spr.yrepeat << 2) * (height - center); - } -} - bool GameInterface::DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) { auto cangvect = cang.ToVector(); diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index d15801110..d69eb0d52 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -148,17 +148,17 @@ void clipwall() int BelowNear(DExhumedActor* pActor, double walldist) { auto pSector = pActor->sector(); - int z = pActor->int_pos().Z; + double z = pActor->spr.pos.Z; - int z2; + double z2; if (loHit.type == kHitSprite) { - z2 = loHit.actor()->int_pos().Z; + z2 = loHit.actor()->spr.pos.Z; } else { - z2 = pSector->int_floorz() + pSector->Depth; + z2 = pSector->floorz + pSector->Depth; BFSSectorSearch search(pSector); @@ -187,21 +187,21 @@ int BelowNear(DExhumedActor* pActor, double walldist) pSect2 = pSect2->pBelow; } - int ecx = pTempSect->int_floorz() + pTempSect->Depth; - int eax = ecx - z; + double lowestZ = pTempSect->floorz + pTempSect->Depth; + double lowestDiff = lowestZ - z; - if (eax < 0 && eax >= -5120) + if (lowestDiff < 0 && lowestDiff >= -20) { - z2 = ecx; + z2 = lowestZ; pSector = pTempSect; } } } - if (z2 < pActor->int_pos().Z) + if (z2 < pActor->spr.pos.Z) { - pActor->set_int_z(z2); + pActor->spr.pos.Z = z2; overridesect = pSector; pActor->vel.Z = 0;