Don't add duplicate topic responses to the journal

actorid
scrawl 11 years ago
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…
Cancel
Save