Don't stop playing sounds attached to removed objects (bug #6896)

check_span
Alexei Kotov 2 years ago
parent 9a4df75f3c
commit f9d41fcfe8

@ -141,6 +141,7 @@
Bug #6849: ImageButton texture is not scaled properly
Bug #6869: Hits queue stagger during swing animation
Bug #6895: Removing a negative number of items from a script, makes the script terminate with an error
Bug #6896: Sounds played using PlaySound3D are cut off as the emitter leaves the cell
Bug #6898: Accessing the Quick Inventory menu does not work while in menu mode
Bug #6901: Morrowind.exe soul gem usage discrepancy
Bug #6909: Using enchanted items has no animation

@ -926,7 +926,11 @@ namespace MWWorld
void Scene::removeObjectFromScene (const Ptr& ptr, bool keepActive)
{
MWBase::Environment::get().getMechanicsManager()->remove (ptr, keepActive);
MWBase::Environment::get().getSoundManager()->stopSound3D (ptr);
// You'd expect the sounds attached to the object to be stopped here
// because the object is nowhere to be heard, but in Morrowind, they're not.
// They're still stopped when the cell is unloaded
// or if the player moves away far from the object's position.
// Todd Howard, Who art in Bethesda, hallowed be Thy name.
MWBase::Environment::get().getLuaManager()->objectRemovedFromScene(ptr);
if (const auto object = mPhysics->getObject(ptr))
{

Loading…
Cancel
Save