mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-16 01:45:36 +02:00
Remove attached sounds when the active object is removed (#14341)
This commit is contained in:
@@ -2123,3 +2123,11 @@ const std::string &Client::getFormspecPrepend() const
|
||||
{
|
||||
return m_env.getLocalPlayer()->formspec_prepend;
|
||||
}
|
||||
|
||||
void Client::removeActiveObjectSounds(u16 id)
|
||||
{
|
||||
for (auto it : m_sounds_to_objects) {
|
||||
if (it.second == id)
|
||||
m_sound->stopSound(it.first);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user