1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 21:42:13 +00:00

Ignore wrong reference class for SetHello

This commit is contained in:
Evil Eye 2021-02-13 20:54:31 +01:00
parent f2ab1913e3
commit 382d458f9c

View File

@ -275,9 +275,11 @@ namespace MWScript
MWWorld::Ptr ptr = R()(runtime);
Interpreter::Type_Integer value = runtime[0].mInteger;
runtime.pop();
ptr.getClass().getCreatureStats(ptr).setAiSetting(mIndex, value);
ptr.getClass().setBaseAISetting(ptr.getCellRef().getRefId(), mIndex, value);
if(ptr.getClass().isActor())
{
ptr.getClass().getCreatureStats(ptr).setAiSetting(mIndex, value);
ptr.getClass().setBaseAISetting(ptr.getCellRef().getRefId(), mIndex, value);
}
}
};