CTerrorGameRules::SaveConvar
0x00509b20 · 265 bytes · __thiscall
_ZN16CTerrorGameRules10SaveConvarERK9ConVarRef
Decompiled
undefined (2 params)
/* CTerrorGameRules::SaveConvar(ConVarRef const&) */
void __thiscall CTerrorGameRules::SaveConvar(CTerrorGameRules *this,ConVarRef *param_1)
{
char cVar1;
int iVar2;
char *pcVar3;
int local_40;
undefined **local_3c [11];
(**(code **)(**(int **)param_1 + 0x10))(*(int **)param_1);
AllocPooledString((char *)&local_40);
if (0 < *(int *)(this + 0x2f4)) {
if (**(int **)(this + 0x2e8) == local_40) {
return;
}
iVar2 = 0;
do {
iVar2 = iVar2 + 1;
if (iVar2 == *(int *)(this + 0x2f4)) goto LAB_00509b80;
} while ((*(int **)(this + 0x2e8))[iVar2] != local_40);
if (iVar2 != -1) {
return;
}
}
LAB_00509b80:
cVar1 = (**(code **)(**(int **)param_1 + 0x18))(*(int **)param_1,0x2000);
if (cVar1 != '\0') {
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
local_3c[0] = &PTR__CBroadcastRecipientFilter_00c09928;
/* try { // try from 00509bab to 00509baf has its CatchHandler @ 00509c31 */
CRecipientFilter::AddAllPlayers((CRecipientFilter *)local_3c);
local_3c[0] = &PTR__CReliableBroadcastRecipientFilter_00c157a8;
/* try { // try from 00509bba to 00509bbe has its CatchHandler @ 00509c5c */
CRecipientFilter::MakeReliable((CRecipientFilter *)local_3c);
/* try { // try from 00509bca to 00509be5 has its CatchHandler @ 00509c43 */
UserMessageBegin((IRecipientFilter *)local_3c,"SavedConvar");
pcVar3 = (char *)(**(code **)(**(int **)param_1 + 0x10))(*(int **)param_1);
MessageWriteString(pcVar3);
MessageEnd();
local_3c[0] = &PTR__CBroadcastRecipientFilter_00c09928;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
}
CUtlVector<string_t,CUtlMemory<string_t,int>>::InsertBefore
((CUtlVector<string_t,CUtlMemory<string_t,int>> *)(this + 0x2e8),*(int *)(this + 0x2f4),
(string_t *)&local_40);
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.