mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Don't add duplicate topic responses to the journal
This commit is contained in:
parent
37ef8ec908
commit
a988a0d6dc
1 changed files with 7 additions and 0 deletions
|
@ -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 a new issue