CVEngineServer::ClientCommandKeyValues
0x0022de90 · 180 bytes · __thiscall
_ZN14CVEngineServer22ClientCommandKeyValuesEP7edict_tP9KeyValues
Decompiled
undefined (3 params)
/* CVEngineServer::ClientCommandKeyValues(edict_t*, KeyValues*) */
void __thiscall
CVEngineServer::ClientCommandKeyValues(CVEngineServer *this,edict_t *param_1,KeyValues *param_2)
{
int iVar1;
int *piVar2;
undefined4 uVar3;
undefined4 uVar4;
undefined **local_6c [23];
if (param_2 != (KeyValues *)0x0) {
iVar1 = NUM_FOR_EDICT(param_1);
if ((iVar1 < 1) || (DAT_003b8080 < iVar1)) {
uVar3 = CBaseServer::GetMaxClients((CBaseServer *)&sv);
uVar4 = KeyValues::GetName(param_2);
ConMsg("\n!!!\n\nClientCommandKeyValues: Some entity tried to stuff \'%s\' to console buffer of entity %i when maxclients was set to %i, ignoring\n\n"
,uVar4,iVar1,uVar3);
return;
}
SVC_CmdKeyValues::SVC_CmdKeyValues((SVC_CmdKeyValues *)local_6c,param_2);
iVar1 = *(int *)(DAT_003b8074 + -4 + iVar1 * 4);
piVar2 = (int *)0x0;
if (iVar1 != 0) {
piVar2 = (int *)(iVar1 + 4);
}
/* try { // try from 0022def4 to 0022def6 has its CatchHandler @ 0022df46 */
(**(code **)(*piVar2 + 0x78))(piVar2,(SVC_CmdKeyValues *)local_6c,0,0);
local_6c[0] = &PTR__SVC_CmdKeyValues_002a1708;
Base_CmdKeyValues::~Base_CmdKeyValues((Base_CmdKeyValues *)local_6c);
}
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.