From 7a34dcf83d8dc80520e28cf6f698512d129af3bb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 30 Apr 2014 21:43:16 -0400 Subject: MADS: Further fix for using items on objects --- engines/mads/action.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') 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; } } -- cgit v1.2.3