mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Don't add duplicate topic responses to the journal
This commit is contained in:
parent
37ef8ec908
commit
a988a0d6dc
@ -24,6 +24,13 @@ namespace MWDialogue
|
||||
if (entry.mTopic!=mTopic)
|
||||
throw std::runtime_error ("topic does not match: " + mTopic);
|
||||
|
||||
// bail out if we already have heard this
|
||||
for (Topic::TEntryIter it = mEntries.begin(); it != mEntries.end(); ++it)
|
||||
{
|
||||
if (it->mInfoId == entry.mInfoId)
|
||||
return;
|
||||
}
|
||||
|
||||
mEntries.push_back (entry); // we want slicing here
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user