mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Fix music disc sound leaking across dimensions
Stop streaming music (jukebox) when the player changes dimensions so music disc sounds from the overworld cannot be heard in the nether or vice versa. Previously, the streaming audio continued playing at its original world coordinates even after a dimension change, causing the sound to leak into the new dimension at the same position. Fixes #411
This commit is contained in:
parent
c2da9e90f8
commit
fec890a7d2
|
|
@ -2694,6 +2694,10 @@ void ClientConnection::handleRespawn(shared_ptr<RespawnPacket> packet)
|
|||
int oldDimension = minecraft->localplayers[m_userIndex]->dimension;
|
||||
started = false;
|
||||
|
||||
// Stop any streaming music (e.g. jukebox) when changing dimensions
|
||||
// so it doesn't leak into the new dimension
|
||||
level->playStreamingMusic(L"", 0, 0, 0);
|
||||
|
||||
// Remove client connection from this level
|
||||
level->removeClientConnection(this, false);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue