forked from mirror/openmw-tes3mp
prevent duplicate journal entries from being recorded
This commit is contained in:
parent
528c3da6da
commit
4c7ae3d1ff
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue