aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorPaul Gilbert2007-11-17 10:49:14 +0000
committerPaul Gilbert2007-11-17 10:49:14 +0000
commit813ca5cf39633851451b9aac779003f9ed5c4c45 (patch)
tree64b163886b134342dc5761700db31f9a58e6322a /engines/lure
parent14ac86abe0b00f6b8cbbaac38d41339f50427693 (diff)
downloadscummvm-rg350-813ca5cf39633851451b9aac779003f9ed5c4c45.tar.gz
scummvm-rg350-813ca5cf39633851451b9aac779003f9ed5c4c45.tar.bz2
scummvm-rg350-813ca5cf39633851451b9aac779003f9ed5c4c45.zip
Added missing code to deactivate animations that have finished
svn-id: r29536
Diffstat (limited to 'engines/lure')
-rw-r--r--engines/lure/hotspots.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index a885229ef6..bc0e424301 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -2321,10 +2321,18 @@ void HotspotTickHandlers::defaultHandler(Hotspot &h) {
}
void HotspotTickHandlers::standardAnimHandler(Hotspot &h) {
+ Resources &res = Resources::getReference();
+
if (h.frameCtr() > 0)
h.decrFrameCtr();
- else
- h.executeScript();
+ else {
+ if (h.executeScript()) {
+ // Script is finished - deactivate hotspot and move it to an out of range room
+ HotspotData *data = h.resource();
+ res.deactivateHotspot(&h);
+ data->roomNumber |= 0x8000;
+ }
+ }
}
void HotspotTickHandlers::standardAnimHandler2(Hotspot &h) {