Skip to content

Commit 70db873

Browse files
authored
Merge pull request #189 from kaitlynia/patch-3
Mumble fixes
2 parents c64fddb + c54bf4c commit 70db873

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/game/client/components/tclient/mumble.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
#include <game/client/gameclient.h>
1111

12+
#define MUMBLE_2D_SCALE 128.0f
13+
1214
void CMumble::MakeContext()
1315
{
1416
mumble_destroy_context(&m_pContext);
@@ -71,12 +73,12 @@ void CMumble::OnRender()
7173
{
7274
char aIdentity[16];
7375
str_format(aIdentity, sizeof(aIdentity), "%d", ClientId);
74-
if(!mumble_set_context(m_pContext, aIdentity))
76+
if(!mumble_set_identity(m_pContext, aIdentity))
7577
log_error("mumble", "Failed to set identity");
7678
m_LastClientId = ClientId;
7779
}
7880
const auto &Pos = GameClient()->m_aClients[ClientId].m_RenderPos;
79-
mumble_2d_update(m_pContext, Pos.x, Pos.y);
81+
mumble_2d_update(m_pContext, Pos.x / MUMBLE_2D_SCALE, Pos.y / MUMBLE_2D_SCALE);
8082
}
8183

8284
void CMumble::OnConsoleInit()

0 commit comments

Comments
 (0)