mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-28 08:37:12 +00:00
prevent duplicate journal entries from being recorded
This commit is contained in:
parent
528c3da6da
commit
4c7ae3d1ff
@ -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…
x
Reference in New Issue
Block a user