1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-01 22:36:39 +00:00

Merge remote branch 'gus/DialogueSystem'

This commit is contained in:
Marc Zinnschlag 2012-04-03 18:27:36 +02:00
commit e403c7158a

View file

@ -528,6 +528,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)
@ -563,13 +570,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);
@ -582,6 +583,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;