From 382d458f9ce395e3f5f0358ad3a0caea5db4ca2f Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sat, 13 Feb 2021 20:54:31 +0100 Subject: [PATCH] Ignore wrong reference class for SetHello --- apps/openmw/mwscript/aiextensions.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwscript/aiextensions.cpp b/apps/openmw/mwscript/aiextensions.cpp index 223ae3a152..d4de8ded5d 100644 --- a/apps/openmw/mwscript/aiextensions.cpp +++ b/apps/openmw/mwscript/aiextensions.cpp @@ -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); + } } };