CServerDemo::WriteBaseEntity
0x00596910 · 189 bytes · __thiscall
_ZN11CServerDemo15WriteBaseEntityEP9KeyValues
Decompiled
undefined (2 params)
/* CServerDemo::WriteBaseEntity(KeyValues*) */
void __thiscall CServerDemo::WriteBaseEntity(CServerDemo *this,KeyValues *param_1)
{
int iVar1;
KeyValues *this_00;
ServerDemoPacket_BaseEntity *this_01;
int *piVar2;
if (WriteBaseEntity(KeyValues*)::hSym == '\0') {
iVar1 = __cxa_guard_acquire(&WriteBaseEntity(KeyValues*)::hSym);
if (iVar1 != 0) {
/* try { // try from 005969a0 to 005969bc has its CatchHandler @ 005969d3 */
piVar2 = (int *)KeyValuesSystem();
WriteBaseEntity(KeyValues*)::hSym = (**(code **)(*piVar2 + 0x14))(piVar2,"baseentity",1);
__cxa_guard_release(&WriteBaseEntity(KeyValues*)::hSym);
}
}
this_00 = (KeyValues *)KeyValues::FindKey(param_1,WriteBaseEntity(KeyValues*)::hSym);
if (this_00 != (KeyValues *)0x0) {
this_01 = (ServerDemoPacket_BaseEntity *)KeyValues::GetPtr(this_00,(char *)0x0,(void *)0x0);
if (this_01 != (ServerDemoPacket_BaseEntity *)0x0) {
CCircularBuffer::Write(*(CCircularBuffer **)this,this_01,4);
ServerDemoPacket_BaseEntity::WriteModifiedDataToBuffer(this_01,*(CCircularBuffer **)this);
return;
}
}
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.