mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-10-05 11:26:31 +00:00
[Client] Only play sounds from active cells when receiving ObjectSound
This commit is contained in:
parent
48de84ec32
commit
dbae0bddc2
1 changed files with 7 additions and 1 deletions
|
@ -21,8 +21,14 @@ namespace mwmp
|
||||||
|
|
||||||
if (!ptrCellStore) return;
|
if (!ptrCellStore) return;
|
||||||
|
|
||||||
|
MWBase::World* world = MWBase::Environment::get().getWorld();
|
||||||
|
|
||||||
|
// Only play sounds in active cells
|
||||||
|
if (world->isCellActive(*ptrCellStore->getCell()))
|
||||||
|
{
|
||||||
objectList.playObjectSounds(ptrCellStore);
|
objectList.playObjectSounds(ptrCellStore);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue