mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 09:23:51 +00:00
Attempt to open companion window if no greetings are found (Bug #1507)
This commit is contained in:
parent
3b7119ba0d
commit
0aba1088a1
1 changed files with 11 additions and 1 deletions
|
@ -182,10 +182,20 @@ namespace MWDialogue
|
|||
win->addResponse (Interpreter::fixDefinesDialog(info->mResponse, interpreterContext));
|
||||
executeScript (info->mResultScript);
|
||||
mLastTopic = Misc::StringUtils::lowerCase(it->mId);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No greetings found. The dialogue window should not be shown.
|
||||
// If this is a companion, we must show the companion window directly (used by BM_bear_be_unique).
|
||||
bool isCompanion = !mActor.getClass().getScript(mActor).empty()
|
||||
&& mActor.getRefData().getLocals().getIntVar(mActor.getClass().getScript(mActor), "companion");
|
||||
if (isCompanion)
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Companion);
|
||||
MWBase::Environment::get().getWindowManager()->showCompanionWindow(mActor);
|
||||
}
|
||||
}
|
||||
|
||||
bool DialogueManager::compile (const std::string& cmd,std::vector<Interpreter::Type_Code>& code)
|
||||
|
|
Loading…
Reference in a new issue