Skip to content

Commit

Permalink
Merge pull request #476 from KZGlobalTeam/dev
Browse files Browse the repository at this point in the history
3.6.1
  • Loading branch information
zealain authored May 6, 2023
2 parents 8ba2aa8 + a3f358d commit 46f0401
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion addons/sourcemod/gamedata/gokz-tpanglefix.games.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"WriteViewAngleUpdateReliableOffset"
{
"windows" "363"
"linux" "290"
"linux" "294"
}
"ClientIndexOffset"
{
Expand Down
12 changes: 6 additions & 6 deletions addons/sourcemod/scripting/gokz-quiet/hideplayers.sp
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ static void RequestFrame_WeaponSound(DataPack dp)

Protobuf newMsg = view_as<Protobuf>(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();

Expand Down
11 changes: 11 additions & 0 deletions addons/sourcemod/scripting/gokz-tpanglefix.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Address>(gI_ClientOffset), NumberType_Int32);
Expand Down

0 comments on commit 46f0401

Please sign in to comment.