From 143ee387cc1b820a7c711a8900ff11d848c8604e Mon Sep 17 00:00:00 2001 From: Allofich Date: Fri, 21 Apr 2017 23:22:55 +0900 Subject: [PATCH] Add enabled check to animation script commands (Fixes #3793) --- apps/openmw/mwscript/animationextensions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/openmw/mwscript/animationextensions.cpp b/apps/openmw/mwscript/animationextensions.cpp index 347bbca56..e737d8ea1 100644 --- a/apps/openmw/mwscript/animationextensions.cpp +++ b/apps/openmw/mwscript/animationextensions.cpp @@ -42,6 +42,9 @@ namespace MWScript { MWWorld::Ptr ptr = R()(runtime); + if (!ptr.getRefData().isEnabled()) + return; + std::string group = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -69,6 +72,9 @@ namespace MWScript { MWWorld::Ptr ptr = R()(runtime); + if (!ptr.getRefData().isEnabled()) + return; + std::string group = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop();