diff --git a/addons/sourcemod/gamedata/gokz-tpanglefix.games.txt b/addons/sourcemod/gamedata/gokz-tpanglefix.games.txt index 0aef1863..62f903d7 100644 --- a/addons/sourcemod/gamedata/gokz-tpanglefix.games.txt +++ b/addons/sourcemod/gamedata/gokz-tpanglefix.games.txt @@ -32,7 +32,7 @@ "WriteViewAngleUpdateReliableOffset" { "windows" "363" - "linux" "290" + "linux" "294" } "ClientIndexOffset" { diff --git a/addons/sourcemod/scripting/gokz-quiet/hideplayers.sp b/addons/sourcemod/scripting/gokz-quiet/hideplayers.sp index b4e1be4e..21ab7db6 100644 --- a/addons/sourcemod/scripting/gokz-quiet/hideplayers.sp +++ b/addons/sourcemod/scripting/gokz-quiet/hideplayers.sp @@ -125,14 +125,14 @@ static void RequestFrame_WeaponSound(DataPack dp) Protobuf newMsg = view_as(StartMessageEx(msg_id, newClients, newTotal, flags)); - newMsg.AddInt("entidx", dp.ReadCell()); - newMsg.AddFloat("origin_x", dp.ReadFloat()); - newMsg.AddFloat("origin_y", dp.ReadFloat()); - newMsg.AddFloat("origin_z", dp.ReadFloat()); + newMsg.SetInt("entidx", dp.ReadCell()); + newMsg.SetFloat("origin_x", dp.ReadFloat()); + newMsg.SetFloat("origin_y", dp.ReadFloat()); + newMsg.SetFloat("origin_z", dp.ReadFloat()); char path[PLATFORM_MAX_PATH]; dp.ReadString(path, sizeof(path)); - newMsg.AddString("sound", path); - newMsg.AddFloat("timestamp", dp.ReadFloat()); + newMsg.SetString("sound", path); + newMsg.SetFloat("timestamp", dp.ReadFloat()); EndMessage(); diff --git a/addons/sourcemod/scripting/gokz-tpanglefix.sp b/addons/sourcemod/scripting/gokz-tpanglefix.sp index 6c3d392a..62977958 100644 --- a/addons/sourcemod/scripting/gokz-tpanglefix.sp +++ b/addons/sourcemod/scripting/gokz-tpanglefix.sp @@ -96,12 +96,23 @@ void HookEvents() } // Prevent the server from crashing. FindConVar("sv_parallel_sendsnapshot").SetBool(false); + FindConVar("sv_parallel_sendsnapshot").AddChangeHook(OnParallelSendSnapshotCvarChanged); + gI_ClientOffset = gamedataConf.GetOffset("ClientIndexOffset"); if (gI_ClientOffset == -1) { SetFailState("Failed to get ClientIndexOffset offset."); } } + +void OnParallelSendSnapshotCvarChanged(ConVar convar, const char[] oldValue, const char[] newValue) +{ + if (convar.BoolValue) + { + convar.BoolValue = false; + } +} + public MRESReturn DHooks_OnWriteViewAngleUpdate_Pre(Address pThis) { int client = LoadFromAddress(pThis + view_as
(gI_ClientOffset), NumberType_Int32);