WitchDying::TryToStartDeathThroes
0x00a3f300 · 387 bytes · __thiscall
_ZN10WitchDying21TryToStartDeathThroesEP8Infected
Decompiled
undefined (2 params)
/* WitchDying::TryToStartDeathThroes(Infected*) */
undefined4 __thiscall WitchDying::TryToStartDeathThroes(WitchDying *this,Infected *param_1)
{
uint uVar1;
CBaseEntity *this_00;
char cVar2;
int iVar3;
int *piVar4;
undefined *puVar5;
undefined4 uVar6;
longdouble lVar7;
uVar1 = *(uint *)(this + 0x68);
if ((((((uVar1 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) ||
((this_00 = *(CBaseEntity **)(puVar5 + 4), this_00 == (CBaseEntity *)0x0 ||
(cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar2 == '\0')))) ||
((iVar3 = CBaseEntity::GetTeamNumber(this_00), iVar3 != 3 ||
(iVar3 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar3 != 8)))) &&
((((((byte)param_1[0x153] & 8) == 0 && (((byte)this[0x7c] & 0x40) == 0)) &&
(piVar4 = (int *)(**(code **)(*(int *)param_1 + 0x594))(param_1), piVar4 != (int *)0x0)) &&
(cVar2 = (**(code **)(*piVar4 + 0x114))(piVar4,2), cVar2 != '\0')))) {
if (((byte)param_1[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)param_1);
}
if (22500.0 < *(float *)(param_1 + 0x278) * *(float *)(param_1 + 0x278) +
*(float *)(param_1 + 0x274) * *(float *)(param_1 + 0x274) +
*(float *)(param_1 + 0x27c) * *(float *)(param_1 + 0x27c)) {
lVar7 = (longdouble)RandomFloat(0xc28c0000,0x428c0000);
uVar6 = 0x29d;
*(float *)(this + 0x94) = (float)lVar7;
}
else {
*(undefined4 *)(this + 0x94) = 0;
uVar6 = 0x29b;
}
uVar6 = (**(code **)(*piVar4 + 0xd8))(piVar4,uVar6,5);
if ((char)uVar6 != '\0') {
*(undefined4 *)(this + 0x34) = vec3_origin;
*(undefined4 *)(this + 0x38) = DAT_01053d4c;
*(undefined4 *)(this + 0x3c) = DAT_01053d50;
return uVar6;
}
}
return 0;
}
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.