Merge pull request #215 from OpenMW/master

Add OpenMW commits up to 9 May 2017
This commit is contained in:
David Cernat 2017-05-09 14:31:26 +03:00 committed by GitHub
commit 2eb5221472

View file

@ -645,6 +645,12 @@ namespace MWDialogue
return; return;
} }
if (actor.getClass().isNpc() && MWBase::Environment::get().getWorld()->isSwimming(actor))
{
// NPCs don't talk while submerged
return;
}
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
const ESM::Dialogue *dial = store.get<ESM::Dialogue>().find(topic); const ESM::Dialogue *dial = store.get<ESM::Dialogue>().find(topic);