mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 10:53:53 +00:00
Allow invoking Journal instruction with non-existing index
This is used by the MG_EscortScholar1 quest.
This commit is contained in:
parent
2f6d400c62
commit
3a7e2f8bb5
1 changed files with 9 additions and 1 deletions
|
@ -34,7 +34,15 @@ namespace MWScript
|
|||
Interpreter::Type_Integer index = runtime[0].mInteger;
|
||||
runtime.pop();
|
||||
|
||||
MWBase::Environment::get().getJournal()->addEntry (quest, index);
|
||||
// Invoking Journal with a non-existing index is allowed, and triggers no errors. Seriously? :(
|
||||
try
|
||||
{
|
||||
MWBase::Environment::get().getJournal()->addEntry (quest, index);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
MWBase::Environment::get().getJournal()->setJournalIndex(quest, index);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue