Skip to content

Commit

Permalink
KOTOR: Fix regression in interaction with placeables
Browse files Browse the repository at this point in the history
  • Loading branch information
vkremianskii committed Mar 5, 2019
1 parent 324ad3d commit f8b7895
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/engines/kotorbase/actionexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,19 @@ void ActionExecutor::executeUseObject(const Action &action, const ExecutionConte
return;
}

Placeable *placeable = ObjectContainer::toPlaceable(action.object);
if (placeable) {
if (placeable->hasInventory())
module->delayContainer(placeable);

return;
}

Situated *situated = ObjectContainer::toSituated(action.object);
if (situated) {
const Common::UString conversation = situated->getConversation();
if (!conversation.empty())
if (!conversation.empty()) {
module->delayConversation(conversation, situated);
return;
}

return;
Placeable *placeable = ObjectContainer::toPlaceable(action.object);
if (placeable && placeable->hasInventory()) {
module->delayContainer(placeable);
return;
}
}
}

Expand Down

0 comments on commit f8b7895

Please sign in to comment.