From 4c7ae3d1ff296b4c7cc96fcd2c533de3ace00443 Mon Sep 17 00:00:00 2001 From: Nathan Jeffords Date: Sat, 19 Jan 2013 16:21:15 -0800 Subject: [PATCH] prevent duplicate journal entries from being recorded --- apps/openmw/mwdialogue/journalimp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/openmw/mwdialogue/journalimp.cpp b/apps/openmw/mwdialogue/journalimp.cpp index 2b2c60381..c623ddc85 100644 --- a/apps/openmw/mwdialogue/journalimp.cpp +++ b/apps/openmw/mwdialogue/journalimp.cpp @@ -31,6 +31,12 @@ namespace MWDialogue void Journal::addEntry (const std::string& id, int index) { + // bail out of we already have heard this... + auto infoId = JournalEntry::idFromIndex (id, index); + for (auto i = mJournal.begin (); i != mJournal.end (); ++i) + if (i->mTopic == id && i->mInfoId == infoId) + return; + StampedJournalEntry entry = StampedJournalEntry::makeFromQuest (id, index); mJournal.push_back (entry);