aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/moonbase/ai_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/he/moonbase/ai_main.cpp')
-rw-r--r--engines/scumm/he/moonbase/ai_main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/scumm/he/moonbase/ai_main.cpp b/engines/scumm/he/moonbase/ai_main.cpp
index fa13b33d3d..98a577bdba 100644
--- a/engines/scumm/he/moonbase/ai_main.cpp
+++ b/engines/scumm/he/moonbase/ai_main.cpp
@@ -2110,7 +2110,7 @@ int *AI::energizeTarget(int &targetX, int &targetY, int index) {
break;
}
- testDist = ((((n - attempt) / n) * .5) + .5) * (getDistance(getHubX(nextUnit), getHubY(nextUnit), targetX, targetY) / .8);
+ testDist = (((((double)n - (double)attempt) / n) * .5) + .5) * (getDistance(getHubX(nextUnit), getHubY(nextUnit), targetX, targetY) / .8);
xPos = getHubX(nextUnit) + testDist * cos(degToRad(testAngle));
yPos = getHubY(nextUnit) + testDist * sin(degToRad(testAngle));
}