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

[Client] Only play sounds from active cells when receiving ObjectSound

This commit is contained in:
David Cernat 2021-10-21 19:20:02 +02:00
parent 48de84ec32
commit dbae0bddc2

View file

@ -21,7 +21,13 @@ namespace mwmp
if (!ptrCellStore) return;
objectList.playObjectSounds(ptrCellStore);
MWBase::World* world = MWBase::Environment::get().getWorld();
// Only play sounds in active cells
if (world->isCellActive(*ptrCellStore->getCell()))
{
objectList.playObjectSounds(ptrCellStore);
}
}
};