aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/MultiPlayerGameMode.cpp
diff options
context:
space:
mode:
authorModMaker101 <119018978+ModMaker101@users.noreply.github.com>2026-03-04 11:28:37 -0500
committerGitHub <noreply@github.com>2026-03-04 23:28:37 +0700
commit464cf91f4c88b9df7921e0e730ac638b356c7138 (patch)
tree338fe3d01d11c20f16af46bead6dd08fab4f9a6b /Minecraft.Client/MultiPlayerGameMode.cpp
parentcea1084978bbf525c983fba67dc44f3718f667e4 (diff)
Prevent door sounds from playing twice #392 (#425)
Diffstat (limited to 'Minecraft.Client/MultiPlayerGameMode.cpp')
-rw-r--r--Minecraft.Client/MultiPlayerGameMode.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Minecraft.Client/MultiPlayerGameMode.cpp b/Minecraft.Client/MultiPlayerGameMode.cpp
index e7611b37..9470a49a 100644
--- a/Minecraft.Client/MultiPlayerGameMode.cpp
+++ b/Minecraft.Client/MultiPlayerGameMode.cpp
@@ -370,7 +370,9 @@ bool MultiPlayerGameMode::useItemOn(shared_ptr<Player> player, Level *level, sha
// are meant to be directly caused by this. If we don't do this, then the sounds never happen as the tile's use method is only called on the
// server, and that won't allow any sounds that are directly made, or broadcast back level events to us that would make the sound, since we are
// the source of the event.
- if( ( t > 0 ) && ( !bTestUseOnly ) && player->isAllowedToUse(Tile::tiles[t]) )
+ // ---------------------------------------------------------------------------------
+ // Only call soundOnly version if we didn't already call the tile's use method above
+ if( !didSomething && ( t > 0 ) && ( !bTestUseOnly ) && player->isAllowedToUse(Tile::tiles[t]) )
{
Tile::tiles[t]->use(level, x, y, z, player, face, clickX, clickY, clickZ, true);
}