mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-05 15:15:25 +01:00
Fix attached sounds stopping if objects are removed serverside (#14436)
Restores backwards compatibility for death sounds or other sounds that are not supposed to be "cut off" abruptly. --------- Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: grorp <gregor.parzefall@posteo.de>
This commit is contained in:
@@ -2123,11 +2123,3 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,9 +471,6 @@ private:
|
||||
|
||||
bool canSendChatMessage() const;
|
||||
|
||||
// remove sounds attached to object
|
||||
void removeActiveObjectSounds(u16 id);
|
||||
|
||||
float m_packetcounter_timer = 0.0f;
|
||||
float m_connection_reinit_timer = 0.1f;
|
||||
float m_avg_rtt_timer = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user