From ca8785fdbf8dd458ac27ca1865b871c0618ebf79 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 20 Aug 2017 17:09:56 +0300 Subject: SAGA: Filter scene verbs on objects properly for IHNM. Fixes bug #9712 The original check was incorrectly disabled for IHNM in commit ab6fb8e9c3. The check has been enabled again, with an added condition for actors that can be used, like the jukebox in Gorrister's --- engines/saga/script.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp index 3cc6586432..7a84944b17 100644 --- a/engines/saga/script.cpp +++ b/engines/saga/script.cpp @@ -1709,15 +1709,16 @@ void Script::whichObject(const Point& mousePoint) { if (_vm->getGameId() == GID_IHNM && objectId == 8199) newRightButtonVerb = getVerbType(kVerbLookAt); - if ((_currentVerb == getVerbType(kVerbPickUp)) || - (_currentVerb == getVerbType(kVerbOpen)) || - (_currentVerb == getVerbType(kVerbClose)) || - ((_currentVerb == getVerbType(kVerbGive)) && !_firstObjectSet) || - ((_currentVerb == getVerbType(kVerbUse)) && !(actor->_flags & kFollower))) { - if (_vm->getGameId() == GID_ITE) { - objectId = ID_NOTHING; - newObjectId = ID_NOTHING; - } + bool actorIsFollower = (actor->_flags & kFollower); + bool actorCanBeUsed = (actor->_flags & kUsable); + + if ( _currentVerb == getVerbType(kVerbPickUp) || + _currentVerb == getVerbType(kVerbOpen) || + _currentVerb == getVerbType(kVerbClose) || + (_currentVerb == getVerbType(kVerbGive) && !_firstObjectSet) || + (_currentVerb == getVerbType(kVerbUse) && !_firstObjectSet && !(actorIsFollower || actorCanBeUsed))) { + objectId = ID_NOTHING; + newObjectId = ID_NOTHING; } } } -- cgit v1.2.3