CEnvMicrophone::Activate
0x00688930 · 385 bytes · __thiscall
_ZN14CEnvMicrophone8ActivateEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CEnvMicrophone::Activate() */
void __thiscall CEnvMicrophone::Activate(CEnvMicrophone *this)
{
uint uVar1;
int iVar2;
int *piVar3;
undefined4 *puVar4;
uint *puVar5;
undefined *puVar6;
CBaseEntity::Activate((CBaseEntity *)this);
if (*(char **)(this + 0x468) != (char *)0x0) {
iVar2 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,*(char **)(this + 0x468),
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
(IEntityFindFilter *)0x0);
if ((iVar2 == 0) ||
(piVar3 = (int *)__dynamic_cast(iVar2,&CBaseEntity::typeinfo,&CBaseFilter::typeinfo,0),
piVar3 == (int *)0x0)) {
*(undefined4 *)(this + 0x46c) = 0xffffffff;
}
else {
puVar4 = (undefined4 *)(**(code **)(*piVar3 + 0xc))(piVar3);
*(undefined4 *)(this + 0x46c) = *puVar4;
}
}
if (*(char **)(this + 0xf8) != (char *)0x0) {
piVar3 = (int *)CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,
*(char **)(this + 0xf8),(CBaseEntity *)0x0,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
if (piVar3 == (int *)0x0) {
*(undefined4 *)(this + 0x444) = 0xffffffff;
}
else {
puVar5 = (uint *)(**(code **)(*piVar3 + 0xc))(piVar3);
puVar6 = g_pEntityList;
uVar1 = *puVar5;
*(uint *)(this + 0x444) = uVar1;
if ((((uVar1 != 0xffffffff) &&
(puVar6 = puVar6 + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
((*(int *)(puVar6 + 4) != 0 && (*(int *)(*(int *)(puVar6 + 4) + 0x30) != 0)))) {
ActivateSpeaker(this);
return;
}
}
}
if (this == (CEnvMicrophone *)0x0) {
_DAT_00000444 = 0xffffffff;
ActivateSpeaker((CEnvMicrophone *)0x0);
return;
}
puVar4 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
*(undefined4 *)(this + 0x444) = *puVar4;
ActivateSpeaker(this);
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.