1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Remove attached sounds when the active object is removed (#14341)

This commit is contained in:
sfence 2024-02-25 23:10:39 +01:00 committed by GitHub
parent 39b1311a1b
commit 63a9853811
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 44 additions and 12 deletions

View file

@ -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);
}
}