CGameClient::SendSnapshot
0x001eb750 · 646 bytes · __thiscall
_ZN11CGameClient12SendSnapshotEP12CClientFrame
Decompiled
undefined (2 params)
/* CGameClient::SendSnapshot(CClientFrame*) */
void __thiscall CGameClient::SendSnapshot(CGameClient *this,CClientFrame *param_1)
{
code *pcVar1;
CFrameSnapshot *this_00;
char cVar2;
int iVar3;
uchar *puVar4;
undefined4 uVar5;
CFrameSnapshot *this_01;
undefined **local_b0;
undefined1 local_ac;
undefined4 local_a8;
undefined4 local_a4;
undefined4 local_a0;
undefined8 local_9c;
undefined4 local_94;
undefined4 local_90;
undefined8 local_8c;
undefined4 local_84;
undefined4 local_80;
undefined1 local_7c;
undefined8 local_78;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_58;
undefined1 local_54;
undefined4 local_50;
undefined4 local_4c;
bf_write local_34 [36];
if ((this[0xbc] != (CGameClient)0x0) && (hltv != (INetMessage *)0x0)) {
iVar3 = (**(code **)(*(int *)this + 0x5c))(this);
CNetworkStringTableContainer::DirectUpdate
((CNetworkStringTableContainer *)networkStringTableContainerServer,iVar3);
puVar4 = (uchar *)NET_AllocPayload();
if (0 < *(int *)(this + 0x1d760)) {
local_a4 = 0;
local_a0 = 0;
local_9c = 0;
local_94 = 0;
local_90 = 0;
local_8c = 0;
local_84 = 0;
local_80 = 0;
local_7c = 0;
local_78 = 0;
local_70 = 0;
local_6c = 0;
local_ac = 1;
local_a8 = 0;
local_b0 = &PTR__SVC_Sounds_002a1dc8;
local_54 = 0;
local_58 = 0;
local_50 = 0xffffffff;
local_4c = 0;
/* try { // try from 001eb84a to 001eb990 has its CatchHandler @ 001eb9dd */
bf_write::bf_write(local_34);
bf_write::StartWriting(local_34,puVar4,0x37aa0,0,-1);
cVar2 = (**(code **)(**(int **)(this + 0xb8) + 0x68))(*(int **)(this + 0xb8));
iVar3 = 0xff;
if (cVar2 != '\0') {
iVar3 = *(int *)(sv_multiplayer_maxsounds._28_4_ + 0x30);
}
FillSoundsMessage(this,(SVC_Sounds *)&local_b0,iVar3);
CHLTVServer::SendNetMsg(hltv,SUB41((SVC_Sounds *)&local_b0,0),false);
}
iVar3 = *(int *)(tv_transmitall._28_4_ + 0x30);
pcVar1 = *(code **)(*(int *)(hltv + 4) + 0xa0);
uVar5 = CHLTVServer::GetBuffer((CHLTVServer *)hltv,5);
(*pcVar1)((CHLTVServer *)(hltv + 4),this,*(undefined4 *)(param_1 + 0x118),
*(undefined4 *)(this + 0xfc),uVar5,(-(uint)(iVar3 == 0) & 0xffffff41) + 0xff);
CHLTVServer::AddNewFrame((CHLTVServer *)hltv,param_1);
this_00 = *(CFrameSnapshot **)(param_1 + 0x118);
this_01 = *(CFrameSnapshot **)(this + 0xfc);
if (this_00 != this_01) {
if (this_00 != (CFrameSnapshot *)0x0) {
CFrameSnapshot::AddReference(this_00);
this_01 = *(CFrameSnapshot **)(this + 0xfc);
}
if (this_01 != (CFrameSnapshot *)0x0) {
CFrameSnapshot::ReleaseReference(this_01);
}
*(CFrameSnapshot **)(this + 0xfc) = this_00;
}
(**(code **)(*(int *)this + 200))(this,*(undefined4 *)(param_1 + 8));
NET_FreePayload(puVar4);
return;
}
WriteViewAngleUpdate(this);
CBaseClient::SendSnapshot((CBaseClient *)this,param_1);
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.