CEnvMicrophone::InputDisable
0x00688640 · 199 bytes · __cdecl
_ZN14CEnvMicrophone12InputDisableER11inputdata_t
Decompiled
undefined (1 param)
/* CEnvMicrophone::InputDisable(inputdata_t&) */
void CEnvMicrophone::InputDisable(inputdata_t *param_1)
{
uint uVar1;
int iVar2;
undefined4 *puVar3;
undefined *puVar4;
undefined4 local_10 [2];
puVar4 = g_pEntityList;
uVar1 = *(uint *)(param_1 + 0x45c);
param_1[0x440] = (inputdata_t)0x1;
if ((((uVar1 != 0xffffffff) &&
(puVar4 = puVar4 + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)) {
iVar2 = *(int *)(*(int *)(puVar4 + 4) + 0x30);
if (iVar2 == 0) {
iVar2 = 0;
}
else {
iVar2 = iVar2 - *(int *)(gpGlobals + 0x58) >> 4;
}
CBaseEntity::StopSound(iVar2,6,(char *)(param_1 + 0x4b8));
param_1[0x4b8] = (inputdata_t)0x0;
local_10[0] = 0xffffffff;
puVar3 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
local_10[0] = *puVar3;
CUtlVector<CHandle<CEnvMicrophone>,CUtlMemory<CHandle<CEnvMicrophone>,int>>::FindAndRemove
((CUtlVector<CHandle<CEnvMicrophone>,CUtlMemory<CHandle<CEnvMicrophone>,int>> *)
&s_Microphones,(CHandle *)local_10);
}
CBaseEntity::SetNextThink((CBaseEntity *)param_1,-1.0,(char *)0x0);
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.