aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kasak2009-07-22 05:03:34 +0000
committerDenis Kasak2009-07-22 05:03:34 +0000
commit5a77f089e1c6ea851851c55084a12023380656f1 (patch)
tree158a71dd41563018a5e5da5131ec05a17343aa23
parent42e8e1e126ad71fd39e3afdd2031b4f7ac7f9b6a (diff)
downloadscummvm-rg350-5a77f089e1c6ea851851c55084a12023380656f1.tar.gz
scummvm-rg350-5a77f089e1c6ea851851c55084a12023380656f1.tar.bz2
scummvm-rg350-5a77f089e1c6ea851851c55084a12023380656f1.zip
Check whether the walking map overlay is already in the desired state so we don't start/stop it over and over.
svn-id: r42651
-rw-r--r--engines/draci/draci.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 7e892a7e1e..88fe731b40 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -196,9 +196,11 @@ int DraciEngine::go() {
}
// Show walking map overlay
- if (showWalkingMap) {
+ // If the walking map overlay is already in the wanted state don't
+ // start / stop it constantly
+ if (showWalkingMap && !_anims->getAnimation(kWalkingMapOverlay)->isPlaying()) {
_anims->play(kWalkingMapOverlay);
- } else {
+ } else if (!showWalkingMap && _anims->getAnimation(kWalkingMapOverlay)->isPlaying()) {
_anims->stop(kWalkingMapOverlay);
}