WitchWander::OnSound
0x00a44210 · 298 bytes · __cdecl
_ZN11WitchWander7OnSoundEP8InfectedP11CBaseEntityRK6VectorP9KeyValues
Decompiled
undefined (4 params)
/* WitchWander::OnSound(Infected*, CBaseEntity*, Vector const&, KeyValues*) */
Infected *
WitchWander::OnSound(Infected *param_1,CBaseEntity *param_2,Vector *param_3,KeyValues *param_4)
{
code *pcVar1;
char cVar2;
int iVar3;
undefined4 *puVar4;
longdouble lVar5;
undefined1 local_28 [24];
if (param_4 != (KeyValues *)0x0) {
cVar2 = (**(code **)(*(int *)param_4 + 0x16c))(param_4);
if (cVar2 != '\0') {
cVar2 = (**(code **)(*(int *)param_4 + 300))(param_4);
if (cVar2 != '\0') {
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_4);
cVar2 = IsASurvivorTeam(iVar3);
if (cVar2 != '\0') {
lVar5 = (longdouble)
(**(code **)(*(int *)(param_3 + 0x1a3c) + 300))(param_3 + 0x1a3c,param_4);
if ((float)lVar5 <=
*(float *)(z_witch_wander_hear_radius._28_4_ + 0x2c) *
*(float *)(z_witch_wander_hear_radius._28_4_ + 0x2c)) {
pcVar1 = *(code **)(*(int *)param_3 + 0x430);
(**(code **)(*(int *)param_4 + 0x234))(local_28,param_4);
/* try { // try from 00a442fe to 00a442ff has its CatchHandler @ 00a44341 */
cVar2 = (*pcVar1)(param_3,local_28,0,0);
if (cVar2 != '\0') {
lVar5 = (longdouble)
CTerrorPlayer::GetTimeSinceLastFiredWeapon((CTerrorPlayer *)param_4);
if ((float)lVar5 < 0.2) {
puVar4 = (undefined4 *)(**(code **)(*(int *)param_4 + 0xc))(param_4);
*(undefined4 *)(param_2 + 0x4850) = *puVar4;
}
}
}
}
}
}
}
*(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.