mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +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
@ -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…
x
Reference in New Issue
Block a user