mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-12 16:43:06 +00:00
Ignore missing global variables when filtering dialogue
This commit is contained in:
parent
a645ec0910
commit
7d2dd3422d
1 changed files with 6 additions and 2 deletions
|
|
@ -301,9 +301,13 @@ bool MWDialogue::Filter::testSelectStructNumeric(const SelectWrapper& select) co
|
|||
switch (select.getFunction())
|
||||
{
|
||||
case ESM::DialogueCondition::Function_Global:
|
||||
|
||||
{
|
||||
const auto& world = MWBase::Environment::get().getWorld();
|
||||
if (world->getGlobalVariableType(select.getName()) == ' ')
|
||||
return true; // ignore this filter if the global doesn't exist
|
||||
// internally all globals are float :(
|
||||
return select.selectCompare(MWBase::Environment::get().getWorld()->getGlobalFloat(select.getName()));
|
||||
return select.selectCompare(world->getGlobalFloat(select.getName()));
|
||||
}
|
||||
|
||||
case ESM::DialogueCondition::Function_Local:
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue