CBaseClientState::ProcessPacketEntities
0x000ffc20 · 591 bytes · __thiscall
_ZN16CBaseClientState21ProcessPacketEntitiesEP18SVC_PacketEntities
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseClientState::ProcessPacketEntities(SVC_PacketEntities*) */
SVC_PacketEntities __thiscall
CBaseClientState::ProcessPacketEntities(CBaseClientState *this,SVC_PacketEntities *param_1)
{
int iVar1;
char cVar2;
int iVar3;
SVC_PacketEntities SVar4;
undefined4 local_24;
undefined4 local_20;
undefined4 local_18;
undefined4 local_14;
int local_10;
local_24 = 0;
local_20 = 0;
if (_exit == 0) {
local_10 = 0;
}
else {
(**(code **)(_exit + 0x50))
(_exit,&local_24,0,0,0,0,"/data/src/engine/./baseclientstate.cpp",0x7d2,
&ProcessPacketEntities(SVC_PacketEntities*)::tm_fmt,"(%s)%s","Unaccounted",
"ProcessPacketEntities");
local_10 = _exit;
}
iVar1 = _DAT_0040b9d4;
local_18 = local_24;
local_14 = local_20;
/* try { // try from 000ffd9e to 000ffdec has its CatchHandler @ 000ffe83 */
if (((_DAT_0040b028 == 0) && (DAT_0040b02c != '\0')) ||
(iVar3 = ThreadGetCurrentId(), iVar1 != iVar3)) {
iVar1 = *(int *)(this + 0x60);
}
else {
if ((char *)*_DAT_0040b030 != "ProcessPacketEntities") {
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2a6d94,&DAT_00000001,0x2a054b);
}
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
iVar1 = *(int *)(this + 0x60);
}
if (iVar1 < 5) {
/* try { // try from 000ffe07 to 000ffe7b has its CatchHandler @ 000ffe98 */
ConMsg("Received packet entities while connecting!\n");
SVar4 = (SVC_PacketEntities)0x0;
}
else {
if (iVar1 == 5) {
if (param_1[0x54] != (SVC_PacketEntities)0x0) {
ConMsg("Received delta packet entities while spawing!\n");
SVar4 = (SVC_PacketEntities)0x0;
goto LAB_000ffd07;
}
(**(code **)(*(int *)this + 0x90))(this,6,*(undefined4 *)(this + 0x6c),0);
}
if ((-1 < *(int *)(this + 0xc0)) || (SVar4 = param_1[0x54], SVar4 == (SVC_PacketEntities)0x0)) {
SVar4 = (SVC_PacketEntities)0x1;
*(undefined4 *)(this + 0xc0) = *(undefined4 *)(this + 0xb8);
}
}
LAB_000ffd07:
iVar1 = _DAT_0040b9d4;
if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
(iVar3 = ThreadGetCurrentId(), iVar1 == iVar3)) {
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
if (local_10 != 0) {
(**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
}
return SVar4;
}
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.