1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:53:52 +00:00

Don't make NPCs or player speak while underwater

(Fixes #3851)
This commit is contained in:
Allofich 2017-05-08 19:55:54 +09:00
parent 2f866fadcf
commit 315ad54b29

View file

@ -633,6 +633,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);