From c54ab2e846920f57c3614a8dd582dc3e9d4a6897 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 9 Sep 2014 00:39:38 +0200 Subject: [PATCH] Don't allow talking to creatures that are in combat --- apps/openmw/mwclass/creature.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index 6aa4d58ed0..d5de39c9d7 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -463,6 +463,8 @@ namespace MWClass if(getCreatureStats(ptr).isDead()) return boost::shared_ptr(new MWWorld::ActionOpen(ptr, true)); + if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat()) + return boost::shared_ptr(new MWWorld::FailedAction("")); return boost::shared_ptr(new MWWorld::ActionTalk(ptr)); }