Don't allow talking to creatures that are in combat

This commit is contained in:
scrawl 2014-09-09 00:39:38 +02:00
parent a9847c9453
commit c54ab2e846

View file

@ -463,6 +463,8 @@ namespace MWClass
if(getCreatureStats(ptr).isDead())
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr, true));
if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat())
return boost::shared_ptr<MWWorld::Action>(new MWWorld::FailedAction(""));
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr));
}