Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Beatrici <git@davidebeatrici.dev>2020-11-09 08:32:15 +0300
committerDavide Beatrici <git@davidebeatrici.dev>2020-11-09 08:32:15 +0300
commit5cbd01f9848d0ba3aabe3617fccfaaceb7b7db7e (patch)
treef755c44d6884409072c5b713bafbef30ccb8203b /plugins
parentdd154ba4316a0dfe7f8193f1b38e0683019e822b (diff)
FIX(positional-audio): Fix Source Engine plugin using wrong player ID on Linux
The code was retrieving the wrong offset (GetLocalClient). As a result, peek() always returned 0 and the player ID was always 1. The plugin appeared to be working fine because the player ID is always 1 when playing locally.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/se/client.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/se/client.h b/plugins/se/client.h
index c470dd859..41ad980dc 100644
--- a/plugins/se/client.h
+++ b/plugins/se/client.h
@@ -121,7 +121,7 @@ static procptr_t getLocalPlayer(const procptr_t localClient, procptr_t clientEnt
// C9 leave
// 83 C0 01 add eax, 1
// C3 retn
- const auto localPlayerIndexOffset = proc->peek< int32_t >(GetLocalPlayer + (isWin32 ? 9 : 14));
+ const auto localPlayerIndexOffset = proc->peek< int32_t >(GetLocalPlayer + (isWin32 ? 9 : 20));
const auto localPlayerIndex = proc->peek< uint32_t >(localClient + localPlayerIndexOffset) + 1;
auto GetClientNetworkable = proc->virtualFunction(clientEntityList, 0);