SV_ComputeClientPacks
0x00206f00 · 918 bytes · __cdecl
_Z21SV_ComputeClientPacksiPP11CGameClientP14CFrameSnapshot
Decompiled
undefined (3 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* SV_ComputeClientPacks(int, CGameClient**, CFrameSnapshot*) */
void SV_ComputeClientPacks(int param_1,CGameClient **param_2,CFrameSnapshot *param_3)
{
uint *puVar1;
CGameClient *this;
int *piVar2;
char cVar3;
int iVar4;
int iVar5;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
int local_2c;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_44 = 0;
local_40 = 0;
if (_Plat_SetBenchmarkMode == 0) {
local_2c = 0;
}
else {
(**(code **)(_Plat_SetBenchmarkMode + 0x50))
(_Plat_SetBenchmarkMode,&local_44,0,0,0,0,"/data/src/engine/./sv_packedentities.cpp",
0x1a7,&SV_ComputeClientPacks(int,CGameClient**,CFrameSnapshot*)::tm_fmt,"(%s)%s",
"CheckTransmit","SV_ComputeClientPacks");
local_2c = _Plat_SetBenchmarkMode;
}
iVar5 = _DAT_0040b9d4;
local_34 = local_44;
local_30 = local_40;
if ((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) {
/* try { // try from 002070e6 to 00207146 has its CatchHandler @ 002072e8 */
iVar4 = ThreadGetCurrentId();
if (iVar5 == iVar4) {
if ((char *)*_DAT_0040b030 != "SV_ComputeClientPacks") {
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2c4189,(char *)0x0,0x2c419f);
}
puVar1 = (uint *)(_DAT_0040b0bc + 4 + _DAT_0040b030[0x1c] * 8);
*puVar1 = *puVar1 | 2;
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
}
}
local_3c = 0;
local_38 = 0;
if (_g_Telemetry == 0) {
local_20 = 0;
}
else {
/* try { // try from 00207023 to 00207025 has its CatchHandler @ 002072a9 */
(**(code **)(_g_Telemetry + 0x50))
(_g_Telemetry,&local_3c,0,0,0,0,"/data/src/engine/./sv_packedentities.cpp",0x1a8,
&SV_ComputeClientPacks(int,CGameClient**,CFrameSnapshot*)::tm_fmt,&DAT_002c48a3,
"SV_ComputeClientPacks");
local_20 = _g_Telemetry;
}
piVar2 = g_pMDLCache;
/* try { // try from 0020704a to 0020704c has its CatchHandler @ 002072e4 */
local_28 = local_3c;
local_24 = local_38;
(**(code **)(*g_pMDLCache + 0x68))(g_pMDLCache);
if (0 < param_1) {
iVar5 = 0;
do {
this = param_2[iVar5];
CGameClient::SetupPackInfo(this,param_3);
if (*(int *)(param_2[iVar5] + 0xf0) < 0) {
(**(code **)(*serverGameEnts + 0x1c))
(serverGameEnts,*(undefined4 *)(param_2[iVar5] + 0x1d750));
}
/* try { // try from 0020707f to 002070d5 has its CatchHandler @ 002072ca */
(**(code **)(*serverGameEnts + 0x18))
(serverGameEnts,this + 0x1d770,*(undefined4 *)(param_3 + 0x10),
*(undefined4 *)(param_3 + 0x14));
CGameClient::SetupPrevPackInfo(param_2[iVar5]);
iVar5 = iVar5 + 1;
} while (iVar5 != param_1);
}
if (g_pLocalNetworkBackdoor == (CLocalNetworkBackdoor *)0x0) {
/* try { // try from 00207294 to 00207298 has its CatchHandler @ 002072ca */
PackEntities_Normal(param_1,param_2,param_3);
}
else {
/* try { // try from 0020716d to 002071b2 has its CatchHandler @ 002072ca */
iVar5 = (**(code **)(*(int *)*param_2 + 0x5c))(*param_2);
CNetworkStringTableContainer::DirectUpdate(DAT_003b801c,iVar5);
CLocalNetworkBackdoor::StartEntityStateUpdate(g_pLocalNetworkBackdoor);
PackEntities_NetworkBackDoor(param_1,param_2,param_3);
CLocalNetworkBackdoor::EndEntityStateUpdate(g_pLocalNetworkBackdoor);
PrintPartialChangeEntsList();
}
(**(code **)(*piVar2 + 0x6c))(piVar2);
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
iVar5 = _DAT_0040b9d4;
if ((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) {
iVar4 = ThreadGetCurrentId();
if (iVar5 == iVar4) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
}
if (local_2c != 0) {
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,0,0,0);
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.