From ed6face4aa8cf6f1ae4ffc5aa18f0932199ff373 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 12 Dec 2014 22:21:57 +0100 Subject: [PATCH] Disable activation scripts for actors in combat --- apps/openmw/engine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index d7b23c096..15d63eb4b 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -505,6 +505,9 @@ void OMW::Engine::activate() if (ptr.getClass().getName(ptr) == "") // objects without name presented to user can never be activated return; + if (ptr.getClass().isActor() && ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat()) + return; + MWBase::Environment::get().getWorld()->activate(ptr, MWBase::Environment::get().getWorld()->getPlayerPtr()); }