From 63f7ffb16dcd0520086614f4e7ec69c619b6c48b Mon Sep 17 00:00:00 2001 From: Lynn Date: Wed, 25 Feb 2026 17:08:37 -0800 Subject: [PATCH 1/3] Scale 2D space (for usable defaults in Mumble) Since DDNet stores positional data as 32 units per tile, we need to scale this down for Mumble so the defaults for positional audio are reasonable (I chose 4 tiles = 1 meter) --- src/game/client/components/tclient/mumble.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/client/components/tclient/mumble.cpp b/src/game/client/components/tclient/mumble.cpp index 980d9718c88..a67f4b8d42a 100644 --- a/src/game/client/components/tclient/mumble.cpp +++ b/src/game/client/components/tclient/mumble.cpp @@ -9,6 +9,8 @@ #include +#define MUMBLE_2D_SCALE 128 + void CMumble::MakeContext() { mumble_destroy_context(&m_pContext); @@ -76,7 +78,7 @@ void CMumble::OnRender() m_LastClientId = ClientId; } const auto &Pos = GameClient()->m_aClients[ClientId].m_RenderPos; - mumble_2d_update(m_pContext, Pos.x, Pos.y); + mumble_2d_update(m_pContext, Pos.x / MUMBLE_2D_SCALE, Pos.y / MUMBLE_2D_SCALE); } void CMumble::OnConsoleInit() From d913bb1ca159020375135e1ba13e86226318cf92 Mon Sep 17 00:00:00 2001 From: Lynn Date: Wed, 25 Feb 2026 17:12:04 -0800 Subject: [PATCH 2/3] Forgot to make 2D_SCALE a float oops --- src/game/client/components/tclient/mumble.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/components/tclient/mumble.cpp b/src/game/client/components/tclient/mumble.cpp index a67f4b8d42a..d511ec33136 100644 --- a/src/game/client/components/tclient/mumble.cpp +++ b/src/game/client/components/tclient/mumble.cpp @@ -9,7 +9,7 @@ #include -#define MUMBLE_2D_SCALE 128 +#define MUMBLE_2D_SCALE 128.0f void CMumble::MakeContext() { From c54bf4c0bee0409140d342511e0ec910acb734f6 Mon Sep 17 00:00:00 2001 From: Lynn Date: Wed, 25 Feb 2026 17:12:48 -0800 Subject: [PATCH 3/3] Fix typo (not correctly setting identity) --- src/game/client/components/tclient/mumble.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/components/tclient/mumble.cpp b/src/game/client/components/tclient/mumble.cpp index d511ec33136..2bc02948498 100644 --- a/src/game/client/components/tclient/mumble.cpp +++ b/src/game/client/components/tclient/mumble.cpp @@ -73,7 +73,7 @@ void CMumble::OnRender() { char aIdentity[16]; str_format(aIdentity, sizeof(aIdentity), "%d", ClientId); - if(!mumble_set_context(m_pContext, aIdentity)) + if(!mumble_set_identity(m_pContext, aIdentity)) log_error("mumble", "Failed to set identity"); m_LastClientId = ClientId; }