Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
- name: Setup SourcePawn compiler
uses: rumblefrog/setup-sp@v1.3.1
with:
version: "1.12.x"
# 1.13.0.7427 (production): 64-bit Address / SDKType_Address
version: "1.13.7427"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
Expand Down
20 changes: 20 additions & 0 deletions addons/sourcemod/gamedata/FullUpdate.games.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
{
"signature" "sv"
}
"linux64"
{
"signature" "sv"
}
"mac"
{
"signature" "sv"
Expand All @@ -40,6 +44,7 @@
{
"library" "engine"
"linux" "@sv"
"linux64" "@sv"
"mac" "@sv"
}
}
Expand Down Expand Up @@ -67,6 +72,10 @@
{
"signature" "sv"
}
"linux64"
{
"signature" "sv"
}
"mac"
{
"signature" "sv"
Expand All @@ -86,6 +95,7 @@
{
"library" "engine"
"linux" "@sv"
"linux64" "@sv"
"mac" "@sv"
}
}
Expand All @@ -106,11 +116,21 @@
{
"windows" "6"
"linux" "7"
"linux64" "7"
"mac" "7"
}
"CBaseClient::UpdateAcknowledgedFramecount"
{
"linux" "44"
"linux64" "44"
}
// IClient comes after the IGameEventListener2 vtable pointer in CBaseClient
"CBaseClient::IClient"
{
"windows" "4"
"linux" "4"
"linux64" "8"
"mac" "4"
}
}
}
Expand Down
16 changes: 12 additions & 4 deletions addons/sourcemod/scripting/FullUpdate.sp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Handle g_hCBaseClient_UpdateAcknowledgedFramecount;
Handle g_hGetClient;

Address g_pBaseServer;
int g_iIClientOffset = 4;

int g_iLastFullUpdate[MAXPLAYERS + 1] = { 0, ... };

Expand Down Expand Up @@ -45,7 +46,7 @@ public void OnPluginStart()
SetFailState("PrepSDKCall_SetFromConf(hGameData, SDKConf_Virtual, \"CBaseServer::GetClient\" failed!");
return;
}
PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain);
PrepSDKCall_SetReturnInfo(SDKType_Address, SDKPass_Plain);
PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);
g_hGetClient = EndPrepSDKCall();
#endif
Expand All @@ -63,6 +64,10 @@ public void OnPluginStart()

g_hCBaseClient_UpdateAcknowledgedFramecount = EndPrepSDKCall();

int iOffset = hGameData.GetOffset("CBaseClient::IClient");
if (iOffset != -1)
g_iIClientOffset = iOffset;

delete hGameData;

RegConsoleCmd("fullupdate", Command_FullUpdate);
Expand Down Expand Up @@ -142,7 +147,10 @@ public Action Command_FullUpdate(int client, int args)
#if !defined GetClientIClient
stock Address GetClientIClient(int client)
{
return SDKCall(g_hGetClient, g_pBaseServer, client-1);
// SDKType_Address results come back through a by-ref argument (64-bit Address).
Address pIClient;
SDKCall(g_hGetClient, g_pBaseServer, pIClient, client-1);
return pIClient;
}
#endif

Expand All @@ -152,6 +160,6 @@ stock Address GetBaseClient(int client)
if(!pIClientTmp)
return Address_Null;

// The IClient vtable is +4 from the IGameEventListener2 (CBaseClient) vtable due to multiple inheritance.
return pIClientTmp - view_as<Address>(4);
// The IClient vtable comes after the IGameEventListener2 (CBaseClient) one due to multiple inheritance.
return pIClientTmp - view_as<Address>(g_iIClientOffset);
}
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/include/FullUpdate.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#define _FullUpdate_Included

#define FullUpdate_V_MAJOR "1"
#define FullUpdate_V_MINOR "3"
#define FullUpdate_V_PATCH "3"
#define FullUpdate_V_MINOR "4"
#define FullUpdate_V_PATCH "0"

#define FullUpdate_VERSION FullUpdate_V_MAJOR..."."...FullUpdate_V_MINOR..."."...FullUpdate_V_PATCH

Expand Down
Loading