CServerDemo::PostRecordingMessage
0x00597f70 · 450 bytes · __thiscall
_ZN11CServerDemo20PostRecordingMessageEP9KeyValuesf
Decompiled
undefined (3 params)
/* CServerDemo::PostRecordingMessage(KeyValues*, float) */
void __thiscall
CServerDemo::PostRecordingMessage(CServerDemo *this,KeyValues *param_1,float param_2)
{
undefined1 uVar1;
int iVar2;
KeyValues *this_00;
int *piVar3;
if (*(CCircularBuffer **)this != (CCircularBuffer *)0x0) {
iVar2 = CCircularBuffer::GetWriteAvailable(*(CCircularBuffer **)this);
if (iVar2 < 500) {
Warning();
return;
}
if ((PostRecordingMessage(KeyValues*,float)::hTypeSymbol == '\0') &&
(iVar2 = __cxa_guard_acquire(&PostRecordingMessage(KeyValues*,float)::hTypeSymbol),
iVar2 != 0)) {
/* try { // try from 005980f0 to 0059810c has its CatchHandler @ 00598153 */
piVar3 = (int *)KeyValuesSystem();
PostRecordingMessage(KeyValues*,float)::hTypeSymbol =
(**(code **)(*piVar3 + 0x14))(piVar3,"type",1);
__cxa_guard_release(&PostRecordingMessage(KeyValues*,float)::hTypeSymbol);
}
this_00 = (KeyValues *)
KeyValues::FindKey(param_1,PostRecordingMessage(KeyValues*,float)::hTypeSymbol);
if (this_00 == (KeyValues *)0x0) {
uVar1 = 0;
}
else {
uVar1 = KeyValues::GetInt(this_00,(char *)0x0,0);
}
if ((PostRecordingMessage(KeyValues*,float)::s_header == '\0') &&
(iVar2 = __cxa_guard_acquire(&PostRecordingMessage(KeyValues*,float)::s_header), iVar2 != 0))
{
PostRecordingMessage(KeyValues*,float)::s_header._0_4_ = 0xbadc0ffe;
__cxa_guard_release(&PostRecordingMessage(KeyValues*,float)::s_header);
}
PostRecordingMessage(KeyValues*,float)::s_header._8_4_ = param_2 - *(float *)(this + 0x118);
PostRecordingMessage(KeyValues*,float)::s_header[4] = uVar1;
CCircularBuffer::Write
(*(CCircularBuffer **)this,PostRecordingMessage(KeyValues*,float)::s_header,0xc);
switch(uVar1) {
case 7:
WriteCamera(this,param_1);
case 6:
WriteBaseFlex(this,param_1);
case 5:
WriteBaseAnimatingOverlay(this,param_1);
case 4:
WriteBaseAnimating(this,param_1);
case 2:
WriteBaseEntity(this,param_1);
return;
case 10:
WriteParticleSystemCreated(this,param_1);
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.