WitchIdle::OnSound
0x00a400a0 · 345 bytes · __cdecl
_ZN9WitchIdle7OnSoundEP8InfectedP11CBaseEntityRK6VectorP9KeyValues
Decompiled
undefined (4 params)
/* WitchIdle::OnSound(Infected*, CBaseEntity*, Vector const&, KeyValues*) */
Infected *
WitchIdle::OnSound(Infected *param_1,CBaseEntity *param_2,Vector *param_3,KeyValues *param_4)
{
char cVar1;
int iVar2;
undefined4 *puVar3;
longdouble lVar4;
if (param_4 != (KeyValues *)0x0) {
cVar1 = (**(code **)(*(int *)param_4 + 0x16c))(param_4);
if (cVar1 != '\0') {
cVar1 = (**(code **)(*(int *)param_4 + 300))(param_4);
if (cVar1 != '\0') {
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_4);
cVar1 = IsASurvivorTeam(iVar2);
if ((cVar1 != '\0') && (*(float *)(param_2 + 0x48) <= 0.0)) {
lVar4 = (longdouble)CTerrorPlayer::GetTimeSinceLastFiredWeapon((CTerrorPlayer *)param_4);
if ((float)lVar4 < 1.0) {
lVar4 = (longdouble)
(**(code **)(*(int *)(param_3 + 0x1a3c) + 0x124))(param_3 + 0x1a3c,param_4);
if ((float)lVar4 < *(float *)(ZombieWitchThreatNormalRange._28_4_ + 0x2c)) {
lVar4 = (longdouble)CountdownTimer::Now();
if ((float)lVar4 + 0.4 != *(float *)(param_2 + 0x48)) {
(**(code **)(*(int *)(param_2 + 0x40) + 4))(param_2 + 0x40,param_2 + 0x48);
*(float *)(param_2 + 0x48) = (float)lVar4 + 0.4;
}
if (*(float *)(param_2 + 0x44) != 0.4) {
(**(code **)(*(int *)(param_2 + 0x40) + 4))(param_2 + 0x40,param_2 + 0x44);
*(undefined4 *)(param_2 + 0x44) = 0x3ecccccd;
}
puVar3 = (undefined4 *)(**(code **)(*(int *)param_4 + 0xc))(param_4);
*(undefined4 *)(param_2 + 0x4c) = *puVar3;
}
}
}
}
}
}
*(undefined4 *)param_1 = 0;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 1;
return param_1;
}
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.