CHLTVDemoRecorder::StopRecording
0x0016d850 · 240 bytes · __thiscall
_ZN17CHLTVDemoRecorder13StopRecordingEv.part.6
Decompiled
undefined (1 param)
/* CHLTVDemoRecorder::StopRecording() [clone .part.6] */
void __thiscall CHLTVDemoRecorder::StopRecording(CHLTVDemoRecorder *this)
{
CDemoFile *this_00;
float fVar1;
int *in_EAX;
int iVar2;
this_00 = (CDemoFile *)(in_EAX + 1);
iVar2 = (**(code **)(*in_EAX + 4))();
CDemoFile::WriteCmdHeader(this_00,'\a',iVar2,0);
iVar2 = (**(code **)(*in_EAX + 4))();
fVar1 = DAT_003a1730;
in_EAX[0x14b] = iVar2;
iVar2 = (**(code **)(*in_EAX + 4))();
in_EAX[0x14c] = in_EAX[0x161];
in_EAX[0x14a] = (int)((float)iVar2 * fVar1);
CDemoFile::WriteDemoHeader(this_00);
CDemoFile::Close(this_00);
*(undefined1 *)(in_EAX + 0x160) = 0;
if ((void *)in_EAX[0x166] != (void *)0x0) {
operator_delete__((void *)in_EAX[0x166]);
bf_write::StartWriting((bf_write *)(in_EAX + 0x166),(void *)0x0,0,0,-1);
}
ConMsg("Completed SourceTV demo \"%s\", recording time %.1f\n",this_00,
(double)(float)in_EAX[0x14a]);
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.