CGameDLL_ConVarAccessor::RegisterConCommandBase
0x006c4290 · 224 bytes · __thiscall
_ZN23CGameDLL_ConVarAccessor22RegisterConCommandBaseEP14ConCommandBase
Decompiled
undefined (2 params)
/* CGameDLL_ConVarAccessor::RegisterConCommandBase(ConCommandBase*) */
undefined4 __thiscall
CGameDLL_ConVarAccessor::RegisterConCommandBase
(CGameDLL_ConVarAccessor *this,ConCommandBase *param_1)
{
code *pcVar1;
char cVar2;
char cVar3;
undefined4 uVar4;
int iVar5;
undefined4 local_20;
cVar2 = (**(code **)(*(int *)param_1 + 0xc))(param_1,0x2000);
if (cVar2 != '\0') {
cVar3 = (**(code **)(*(int *)param_1 + 8))(param_1);
if (cVar3 == '\0') {
local_20 = ConVar::GetDefault((ConVar *)param_1);
goto LAB_006c42bd;
}
}
local_20 = 0;
LAB_006c42bd:
(**(code **)(*cvar + 0x18))(cvar,param_1);
pcVar1 = *(code **)(*cvar + 0x24);
uVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1);
iVar5 = (*pcVar1)(cvar,uVar4);
if (iVar5 == 0) {
if ((local_20 != 0) && (cVar2 != '\0')) {
cVar2 = (**(code **)(*(int *)param_1 + 8))(param_1);
if (cVar2 == '\0') {
(**(code **)(*(int *)param_1 + 0x3c))(param_1,local_20);
}
}
}
else {
cVar2 = (**(code **)(*(int *)param_1 + 8))(param_1);
if (cVar2 == '\0') {
(**(code **)(*(int *)param_1 + 0x3c))(param_1,iVar5);
return 1;
}
}
return 1;
}
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.