CEnvGlobal::InputToggle
0x006e8b40 · 170 bytes · __cdecl
_ZN10CEnvGlobal11InputToggleER11inputdata_t
Decompiled
undefined (1 param)
/* CEnvGlobal::InputToggle(inputdata_t&) */
void CEnvGlobal::InputToggle(inputdata_t *param_1)
{
int iVar1;
char *pcVar2;
undefined1 *puVar3;
char *pcVar4;
undefined4 uVar5;
undefined4 uStack00000008;
pcVar2 = "";
if (*(char **)(param_1 + 0x458) != (char *)0x0) {
pcVar2 = *(char **)(param_1 + 0x458);
}
iVar1 = GlobalEntity_GetIndex(pcVar2);
iVar1 = GlobalEntity_GetState(iVar1);
if (iVar1 == 1) {
uVar5 = 0;
}
else {
uVar5 = 1;
if (iVar1 != 0) {
return;
}
}
pcVar2 = *(char **)(param_1 + 0x458);
if (pcVar2 == (char *)0x0) {
pcVar2 = "";
}
iVar1 = GlobalEntity_GetIndex(pcVar2);
pcVar2 = *(char **)(param_1 + 0x458);
if (iVar1 < 0) {
puVar3 = *(undefined1 **)(gpGlobals + 0x3c);
if (puVar3 == (undefined1 *)0x0) {
puVar3 = &DAT_00d539c2;
}
pcVar4 = "";
if (pcVar2 != (char *)0x0) {
pcVar4 = pcVar2;
}
GlobalEntity_Add(pcVar4,puVar3,uVar5);
return;
}
pcVar4 = "";
if (pcVar2 != (char *)0x0) {
pcVar4 = pcVar2;
}
GlobalEntity_GetIndex(pcVar4);
uStack00000008 = uVar5;
GlobalEntity_SetState();
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.