1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 03:45:32 +00:00

Merge pull request #1283 from Allofich/water

Don't make NPCs or player speak while underwater
This commit is contained in:
scrawl 2017-05-09 08:16:06 +02:00 committed by GitHub
commit 5e03e75549

View file

@ -633,6 +633,12 @@ namespace MWDialogue
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 ESM::Dialogue *dial = store.get<ESM::Dialogue>().find(topic);