CMatchFramework::CloseSession
0x000586c0 · 214 bytes · __thiscall
_ZN15CMatchFramework12CloseSessionEv
Decompiled
undefined (1 param)
/* CMatchFramework::CloseSession() */
void __thiscall CMatchFramework::CloseSession(CMatchFramework *this)
{
int *piVar1;
code *pcVar2;
char cVar3;
KeyValues *this_00;
int iVar4;
uint in_stack_ffffffe8;
piVar1 = *(int **)(this + 8);
if (piVar1 != (int *)0x0) {
*(undefined4 *)(this + 8) = 0;
(**(code **)(*piVar1 + 0x14))(piVar1);
pcVar2 = *(code **)(*(int *)g_pMatchEventsSubscription + 8);
this_00 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffe8);
/* try { // try from 00058714 to 00058718 has its CatchHandler @ 000587b0 */
KeyValues::KeyValues(this_00,"OnMatchSessionUpdate","state","closed");
(*pcVar2)(g_pMatchEventsSubscription,this_00);
}
if (SetNetUseSocketsForLoopback(bool)::net_usesocketsforloopback == '\0') {
iVar4 = __cxa_guard_acquire(&SetNetUseSocketsForLoopback(bool)::net_usesocketsforloopback);
if (iVar4 != 0) {
/* try { // try from 00058787 to 0005878b has its CatchHandler @ 0005879a */
ConVarRef::ConVarRef
((ConVarRef *)&SetNetUseSocketsForLoopback(bool)::net_usesocketsforloopback,
"net_usesocketsforloopback",true);
__cxa_guard_release(&SetNetUseSocketsForLoopback(bool)::net_usesocketsforloopback);
}
}
cVar3 = ConVarRef::IsValid((ConVarRef *)
&SetNetUseSocketsForLoopback(bool)::net_usesocketsforloopback);
if (cVar3 != '\0') {
(**(code **)(*SetNetUseSocketsForLoopback(bool)::net_usesocketsforloopback + 8))
(SetNetUseSocketsForLoopback(bool)::net_usesocketsforloopback,0);
}
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.