mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Improve core.sound_play with ephemeral sounds and player exclusion
This commit is contained in:
@@ -1106,7 +1106,7 @@ void Client::sendRemovedSounds(std::vector<s32> &soundList)
|
||||
|
||||
pkt << (u16) (server_ids & 0xFFFF);
|
||||
|
||||
for (int sound_id : soundList)
|
||||
for (s32 sound_id : soundList)
|
||||
pkt << sound_id;
|
||||
|
||||
Send(&pkt);
|
||||
|
@@ -561,7 +561,7 @@ private:
|
||||
std::unordered_map<s32, int> m_sounds_server_to_client;
|
||||
// And the other way!
|
||||
std::unordered_map<int, s32> m_sounds_client_to_server;
|
||||
// And relations to objects
|
||||
// Relation of client id to object id
|
||||
std::unordered_map<int, u16> m_sounds_to_objects;
|
||||
|
||||
// Map server hud ids to client hud ids
|
||||
|
Reference in New Issue
Block a user