aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/script/police_maze.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/bladerunner/script/police_maze.cpp b/engines/bladerunner/script/police_maze.cpp
index aaed223a57..a85fa07451 100644
--- a/engines/bladerunner/script/police_maze.cpp
+++ b/engines/bladerunner/script/police_maze.cpp
@@ -186,15 +186,15 @@ void PoliceMazeTargetTrack::add(int trackId, float startX, float startY, float s
double coefY = (endY - startY) * coef;
double coefZ = (endZ - startZ) * coef;
- for (int i = 0; i < steps; i++) {
+ for (int i = 0; i < steps - 1; i++) {
_points[i].x = i * coefX + startX;
_points[i].y = i * coefY + startY;
_points[i].z = i * coefZ + startZ;
}
- _points[steps].x = endX;
- _points[steps].y = endY;
- _points[steps].z = endZ;
+ _points[steps - 1].x = endX;
+ _points[steps - 1].y = endY;
+ _points[steps - 1].z = endZ;
_isPaused = !isActive;
}