aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/hotspots.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/hotspots.cpp')
-rw-r--r--engines/mads/hotspots.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/mads/hotspots.cpp b/engines/mads/hotspots.cpp
index 526654d0ff..098313eca4 100644
--- a/engines/mads/hotspots.cpp
+++ b/engines/mads/hotspots.cpp
@@ -27,6 +27,7 @@ namespace MADS {
DynamicHotspot::DynamicHotspot() {
_seqIndex = 0;
+ _animIndex = -1;
_facing = FACING_NONE;
_descId = 0;
_verbId = 0;
@@ -74,6 +75,7 @@ int DynamicHotspots::add(int descId, int verbId, int seqIndex, const Common::Rec
_entries[idx]._verbId = verbId;
_entries[idx]._articleNumber = PREP_IN;
_entries[idx]._cursor = CURSOR_NONE;
+ _entries[idx]._animIndex = -1;
++_count;
_changed = true;
@@ -106,6 +108,8 @@ void DynamicHotspots::remove(int index) {
if (index >= 0 && _entries[index]._active) {
if (_entries[index]._seqIndex >= 0)
scene._sequences[_entries[index]._seqIndex]._dynamicHotspotIndex = -1;
+ if (_entries[index]._animIndex >= 0)
+ scene._animation[_entries[index]._animIndex]->_dynamicHotspotIndex = -1;
_entries[index]._active = false;
--_count;