diff --git a/source/games/exhumed/src/fish.cpp b/source/games/exhumed/src/fish.cpp index 3f96ab482..263cdd0e3 100644 --- a/source/games/exhumed/src/fish.cpp +++ b/source/games/exhumed/src/fish.cpp @@ -98,13 +98,13 @@ void AIFishLimb::Tick(RunListEvent* ev) } } - int FloorZ = pActor->sector()->int_floorz(); + double FloorZ = pActor->sector()->floorz; - if (FloorZ <= pActor->int_pos().Z) + if (FloorZ <= pActor->spr.pos.Z) { pActor->spr.pos.Z++; - if ((pActor->int_pos().Z - FloorZ) > 25600) + if ((pActor->spr.pos.Z - FloorZ) > 100) { pActor->spr.zvel = 0; runlist_DoSubRunRec(pActor->spr.intowner); @@ -112,7 +112,7 @@ void AIFishLimb::Tick(RunListEvent* ev) runlist_SubRunRec(pActor->spr.hitag); DeleteActor(pActor); } - else if ((pActor->int_pos().Z - FloorZ) > 0) + else if ((pActor->spr.pos.Z - FloorZ) > 0) { pActor->spr.zvel = 1024; } @@ -382,7 +382,7 @@ void AIFish::Tick(RunListEvent* ev) pActor->spr.yvel = 0; } - pActor->spr.zvel = (pTargetActor->int_pos().Z - pActor->int_pos().Z) >> 3; + pActor->spr.zvel = int((pTargetActor->spr.pos.Z - pActor->spr.pos.Z) * zworldtoint / 8); } break; } diff --git a/source/games/exhumed/src/grenade.cpp b/source/games/exhumed/src/grenade.cpp index d4477a4ae..1dad355ad 100644 --- a/source/games/exhumed/src/grenade.cpp +++ b/source/games/exhumed/src/grenade.cpp @@ -152,7 +152,7 @@ void ExplodeGrenade(DExhumedActor* pActor) } else { - if (pActor->int_pos().Z < pGrenadeSect->int_floorz()) + if (pActor->spr.pos.Z < pGrenadeSect->floorz) { var_20 = 200; var_28 = 36; @@ -171,9 +171,10 @@ void ExplodeGrenade(DExhumedActor* pActor) if (pActor->nTurn < 0) { auto pPlayerActor = PlayerList[nPlayer].pActor; - int nAngle = pPlayerActor->int_ang(); - - pActor->set_int_pos({ bcos(nAngle, -5) + pPlayerActor->int_pos().X, bsin(nAngle, -5) + pPlayerActor->int_pos().Y, pPlayerActor->int_pos().Z }); + auto nAngle = pPlayerActor->spr.angle; + + DVector2 vect = nAngle.ToVector() * 32; + pActor->spr.pos = pPlayerActor->spr.pos + vect; ChangeActorSect(pActor, pPlayerActor->sector());