WitchBurn::OnStart
0x00a3eae0 · 446 bytes · __thiscall
_ZN9WitchBurn7OnStartEP8InfectedP6ActionIS0_E
Decompiled
undefined (3 params)
/* WitchBurn::OnStart(Infected*, Action<Infected>*) */
WitchBurn * __thiscall WitchBurn::OnStart(WitchBurn *this,Infected *param_1,Action *param_2)
{
uint uVar1;
int *piVar2;
char cVar3;
WitchAttack *this_00;
CBaseEntity *pCVar4;
undefined *puVar5;
longdouble lVar6;
CBaseEntity *local_20;
lVar6 = (longdouble)RandomFloat(0xc2200000,0x42200000);
puVar5 = g_pEntityList;
uVar1 = *(uint *)(param_1 + 0x3c);
*(float *)(param_1 + 0x34) = (float)lVar6;
if (((uVar1 == 0xffffffff) ||
(puVar5 = puVar5 + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) {
(**(code **)(*(int *)param_2 + 300))(param_2);
}
else {
piVar2 = *(int **)(puVar5 + 4);
cVar3 = (**(code **)(*(int *)param_2 + 300))(param_2);
if ((cVar3 != '\0') && (piVar2 != (int *)0x0)) {
uVar1 = *(uint *)(param_1 + 0x3c);
pCVar4 = (CBaseEntity *)0x0;
if ((uVar1 != 0xffffffff) &&
((puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)))) {
pCVar4 = *(CBaseEntity **)(puVar5 + 4);
}
cVar3 = WitchAttack::IsValidEnemy(pCVar4);
if ((cVar3 != '\0') &&
(((cVar3 = IsInCommentaryMode(), cVar3 == '\0' ||
(cVar3 = (**(code **)(*piVar2 + 0x16c))(piVar2), cVar3 == '\0')) ||
(cVar3 = (**(code **)(*piVar2 + 0x778))(piVar2), cVar3 != '\0')))) {
uVar1 = *(uint *)(param_1 + 0x3c);
local_20 = (CBaseEntity *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
local_20 = *(CBaseEntity **)(puVar5 + 4);
}
this_00 = ::operator_new(0x487c);
/* try { // try from 00a3ec25 to 00a3ec29 has its CatchHandler @ 00a3ecb1 */
WitchAttack::WitchAttack(this_00,local_20);
*(undefined4 *)(param_1 + 0x20) = 0;
*(undefined4 *)(param_1 + 0x24) = 0;
*(undefined4 *)(param_1 + 0x28) = 0;
*(undefined4 *)(param_1 + 0x2c) = 0;
*(undefined4 *)this = 2;
*(WitchAttack **)(this + 4) = this_00;
*(char **)(this + 8) = "Attacking person who caught me on fire";
return this;
}
}
}
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
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.