CEnvGlobal::InputGetCounter
0x006e7b30 · 238 bytes · __thiscall
_ZN10CEnvGlobal15InputGetCounterER11inputdata_t
Decompiled
undefined (2 params)
/* CEnvGlobal::InputGetCounter(inputdata_t&) */
void __thiscall CEnvGlobal::InputGetCounter(CEnvGlobal *this,inputdata_t *param_1)
{
undefined4 uVar1;
char *pcVar2;
int iVar3;
undefined1 *puVar4;
undefined1 *puVar5;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
pcVar2 = *(char **)(this + 0x458);
if (pcVar2 == (char *)0x0) {
pcVar2 = "";
}
iVar3 = GlobalEntity_GetIndex(pcVar2);
if (iVar3 < 0) {
puVar4 = *(undefined1 **)(gpGlobals + 0x3c);
if (puVar4 == (undefined1 *)0x0) {
puVar4 = &DAT_00d539c2;
}
puVar5 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x458) != (undefined1 *)0x0) {
puVar5 = *(undefined1 **)(this + 0x458);
}
GlobalEntity_Add(puVar5,puVar4,1);
}
uVar1 = *(undefined4 *)param_1;
pcVar2 = "";
if (*(char **)(this + 0x458) != (char *)0x0) {
pcVar2 = *(char **)(this + 0x458);
}
iVar3 = GlobalEntity_GetIndex(pcVar2);
local_34 = GlobalEntity_GetCounter(iVar3);
variant_t::Set((variant_t *)(this + 0x440),5,&local_34);
local_30 = *(undefined4 *)(this + 0x440);
local_2c = *(undefined4 *)(this + 0x444);
local_28 = *(undefined4 *)(this + 0x448);
local_24 = *(undefined4 *)(this + 0x44c);
local_20 = *(undefined4 *)(this + 0x450);
CBaseEntityOutput::FireOutput((CBaseEntityOutput *)(this + 0x440),&local_30,uVar1,this,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.