forked from teamnwah/openmw-tes3coop
Don't allow talking to creatures that are in combat
This commit is contained in:
parent
a9847c9453
commit
c54ab2e846
1 changed files with 2 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue