aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/neighborhood/norad/delta/globegame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pegasus/neighborhood/norad/delta/globegame.cpp')
-rw-r--r--engines/pegasus/neighborhood/norad/delta/globegame.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/pegasus/neighborhood/norad/delta/globegame.cpp b/engines/pegasus/neighborhood/norad/delta/globegame.cpp
index 35ec9b813d..1416c51c8d 100644
--- a/engines/pegasus/neighborhood/norad/delta/globegame.cpp
+++ b/engines/pegasus/neighborhood/norad/delta/globegame.cpp
@@ -64,6 +64,10 @@ void GlobeTracker::setTrackParameters(const Hotspot *trackSpot, GlobeTrackDirect
_globeMovie->setSegment(start, start + kDurationPerRow);
+ // Clip new time so we don't go past the end of the segment
+ if (newTime >= start + kDurationPerRow)
+ newTime = start + kDurationPerRow - 1;
+
if (newTime != time) {
_globeMovie->setTime(newTime);
_globeMovie->redrawMovieWorld();
@@ -84,6 +88,10 @@ void GlobeTracker::setTrackParameters(const Hotspot *trackSpot, GlobeTrackDirect
_globeMovie->setSegment(start, start + kDurationPerRow);
+ // Clip new time so we don't go past the end of the segment
+ if (newTime >= start + kDurationPerRow)
+ newTime = start + kDurationPerRow - 1;
+
if (newTime != time) {
_globeMovie->setTime(newTime);
_globeMovie->redrawMovieWorld();