diff --git a/source/games/blood/src/aiboneel.cpp b/source/games/blood/src/aiboneel.cpp index fcf9c2c5b..eb5a3c777 100644 --- a/source/games/blood/src/aiboneel.cpp +++ b/source/games/blood/src/aiboneel.cpp @@ -310,7 +310,7 @@ static void eelMoveForward(DBloodActor* actor) auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng); auto nTurnRange = pDudeInfo->TurnRange(); actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange); - int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2; + double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2); if (abs(nAng) > DAngle60) return; if (actor->GetTarget() == nullptr) @@ -335,7 +335,7 @@ static void eelMoveSwoop(DBloodActor* actor) auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng); auto nTurnRange = pDudeInfo->TurnRange(); actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange); - int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2; + double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2); if (abs(nAng) > DAngle60) return; auto dvec = actor->xspr.TargetPos.XY() - actor->spr.pos.XY(); @@ -356,7 +356,7 @@ static void eelMoveAscend(DBloodActor* actor) auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng); auto nTurnRange = pDudeInfo->TurnRange(); actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange); - int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2; + double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2); if (abs(nAng) > DAngle60) return; auto dvec = actor->xspr.TargetPos.XY() - actor->spr.pos.XY(); diff --git a/source/games/blood/src/aigilbst.cpp b/source/games/blood/src/aigilbst.cpp index e8408e9c9..38c394fb3 100644 --- a/source/games/blood/src/aigilbst.cpp +++ b/source/games/blood/src/aigilbst.cpp @@ -268,7 +268,7 @@ static void sub_6CB00(DBloodActor* actor) auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng); auto nTurnRange = pDudeInfo->TurnRange(); actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange); - int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2; + double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2); if (abs(nAng) > DAngle60) return; if (actor->GetTarget() == nullptr) @@ -297,7 +297,7 @@ static void sub_6CD74(DBloodActor* actor) auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng); auto nTurnRange = pDudeInfo->TurnRange(); actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange); - int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2; + double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2); if (abs(nAng) > DAngle60) { actor->xspr.goalAng += DAngle90; @@ -326,7 +326,7 @@ static void sub_6D03C(DBloodActor* actor) auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng); auto nTurnRange = pDudeInfo->TurnRange(); actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange); - int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2; + double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2); if (abs(nAng) > DAngle60) { actor->spr.angle += DAngle90;