mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-22 19:23:52 +00:00
speed up dialogue start-up.
This commit is contained in:
parent
7a1ff61541
commit
319022d962
1 changed files with 8 additions and 6 deletions
|
@ -531,6 +531,13 @@ namespace MWDialogue
|
||||||
mChoice = -1;
|
mChoice = -1;
|
||||||
mIsInChoice = false;
|
mIsInChoice = false;
|
||||||
mCompilerContext.setExtensions (&extensions);
|
mCompilerContext.setExtensions (&extensions);
|
||||||
|
mDialogueMap.clear();
|
||||||
|
actorKnownTopics.clear();
|
||||||
|
ESMS::RecListT<ESM::Dialogue>::MapType dialogueList = mEnvironment.mWorld->getStore().dialogs.list;
|
||||||
|
for(ESMS::RecListT<ESM::Dialogue>::MapType::iterator it = dialogueList.begin(); it!=dialogueList.end();it++)
|
||||||
|
{
|
||||||
|
mDialogueMap[it->first] = it->second;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogueManager::addTopic(std::string topic)
|
void DialogueManager::addTopic(std::string topic)
|
||||||
|
@ -566,13 +573,7 @@ namespace MWDialogue
|
||||||
|
|
||||||
mActor = actor;
|
mActor = actor;
|
||||||
|
|
||||||
mDialogueMap.clear();
|
|
||||||
actorKnownTopics.clear();
|
actorKnownTopics.clear();
|
||||||
ESMS::RecListT<ESM::Dialogue>::MapType dialogueList = mEnvironment.mWorld->getStore().dialogs.list;
|
|
||||||
for(ESMS::RecListT<ESM::Dialogue>::MapType::iterator it = dialogueList.begin(); it!=dialogueList.end();it++)
|
|
||||||
{
|
|
||||||
mDialogueMap[it->first] = it->second;
|
|
||||||
}
|
|
||||||
|
|
||||||
//initialise the GUI
|
//initialise the GUI
|
||||||
mEnvironment.mInputManager->setGuiMode(MWGui::GM_Dialogue);
|
mEnvironment.mInputManager->setGuiMode(MWGui::GM_Dialogue);
|
||||||
|
@ -585,6 +586,7 @@ namespace MWDialogue
|
||||||
//greeting
|
//greeting
|
||||||
bool greetingFound = false;
|
bool greetingFound = false;
|
||||||
//ESMS::RecListT<ESM::Dialogue>::MapType dialogueList = mEnvironment.mWorld->getStore().dialogs.list;
|
//ESMS::RecListT<ESM::Dialogue>::MapType dialogueList = mEnvironment.mWorld->getStore().dialogs.list;
|
||||||
|
ESMS::RecListT<ESM::Dialogue>::MapType dialogueList = mEnvironment.mWorld->getStore().dialogs.list;
|
||||||
for(ESMS::RecListT<ESM::Dialogue>::MapType::iterator it = dialogueList.begin(); it!=dialogueList.end();it++)
|
for(ESMS::RecListT<ESM::Dialogue>::MapType::iterator it = dialogueList.begin(); it!=dialogueList.end();it++)
|
||||||
{
|
{
|
||||||
ESM::Dialogue ndialogue = it->second;
|
ESM::Dialogue ndialogue = it->second;
|
||||||
|
|
Loading…
Reference in a new issue