aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-04-30 21:43:16 -0400
committerPaul Gilbert2014-04-30 21:43:16 -0400
commit7a34dcf83d8dc80520e28cf6f698512d129af3bb (patch)
tree53321db8f95c87c32de60bb8f4ba2d9fa24dfe8c /engines
parentb7776bdbddba57a5503dcbf3fcb63cf44dfdb5cb (diff)
downloadscummvm-rg350-7a34dcf83d8dc80520e28cf6f698512d129af3bb.tar.gz
scummvm-rg350-7a34dcf83d8dc80520e28cf6f698512d129af3bb.tar.bz2
scummvm-rg350-7a34dcf83d8dc80520e28cf6f698512d129af3bb.zip
MADS: Further fix for using items on objects
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/action.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp
index 0a0e79c660..cfd84bf762 100644
--- a/engines/mads/action.cpp
+++ b/engines/mads/action.cpp
@@ -200,12 +200,12 @@ void MADSAction::set() {
if (_secondObject >= 0) {
if (_secondObjectSource == CAT_INV_LIST || _secondObjectSource == CAT_INV_ANIM) {
- InventoryObject &invObject = _vm->_game->_objects.getItem(_hotspotId);
+ InventoryObject &invObject = _vm->_game->_objects.getItem(_secondObject);
_action._indirectObjectId = invObject._descId;
} else if (_secondObject < (int)scene._hotspots.size()) {
- _action._indirectObjectId = scene._hotspots[_hotspotId]._vocabId;
+ _action._indirectObjectId = scene._hotspots[_secondObject]._vocabId;
} else {
- _action._indirectObjectId = scene._hotspots[_hotspotId - scene._hotspots.size()]._vocabId;
+ _action._indirectObjectId = scene._hotspots[_secondObject - scene._hotspots.size()]._vocabId;
}
}