aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2007-11-17 06:52:35 +0000
committerPaul Gilbert2007-11-17 06:52:35 +0000
commit1002a58f011db47fc74fe23dd5dc5b802f4960de (patch)
treeb30ffebf45f3980260e0bbdbd9647c4fe64c09ef /engines
parentd5dc2e075a1e19ecdb9b7f0791704c1c7d2cafd3 (diff)
downloadscummvm-rg350-1002a58f011db47fc74fe23dd5dc5b802f4960de.tar.gz
scummvm-rg350-1002a58f011db47fc74fe23dd5dc5b802f4960de.tar.bz2
scummvm-rg350-1002a58f011db47fc74fe23dd5dc5b802f4960de.zip
Cleaned up the logic of the activateHotspot method
svn-id: r29525
Diffstat (limited to 'engines')
-rw-r--r--engines/lure/res.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index d5e71591db..7d0d925c36 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -511,12 +511,9 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
res->roomNumber &= 0x7fff; // clear any suppression bit in room #
// Make sure that the hotspot isn't already active
- HotspotList::iterator i = _activeHotspots.begin();
- for (; i != _activeHotspots.end(); ++i) {
- Hotspot *h = *i;
- if (h->hotspotId() == res->hotspotId)
- return h;
- }
+ Hotspot *h = getActiveHotspot(hotspotId);
+ if (h != NULL)
+ return h;
// Check the script load flag
if (res->scriptLoadFlag) {