InfectedBackOff::OnStart
0x00a2eaa0 · 747 bytes · __thiscall
_ZN15InfectedBackOff7OnStartEP8InfectedP6ActionIS0_E
Decompiled
undefined (3 params)
/* InfectedBackOff::OnStart(Infected*, Action<Infected>*) */
InfectedBackOff * __thiscall
InfectedBackOff::OnStart(InfectedBackOff *this,Infected *param_1,Action *param_2)
{
float fVar1;
float fVar2;
float fVar3;
Action AVar4;
CBaseEntity *this_00;
char cVar5;
int *piVar6;
longdouble lVar7;
float fVar8;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
undefined1 local_28 [24];
piVar6 = (int *)(**(code **)(*(int *)param_2 + 0x590))(param_2);
if ((piVar6 == (int *)0x0) || (cVar5 = (**(code **)(*piVar6 + 0x114))(piVar6), cVar5 == '\0')) {
this_00 = *(CBaseEntity **)(param_1 + 0x4c);
if (((byte)this_00[0x14d] & 8) == 0) {
AVar4 = param_2[0x14d];
}
else {
CBaseEntity::CalcAbsolutePosition(this_00);
AVar4 = param_2[0x14d];
}
if (((byte)AVar4 & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
fVar8 = *(float *)(param_2 + 0x2e8);
fVar1 = *(float *)(param_2 + 0x2e0);
fVar2 = *(float *)(this_00 + 0x2e8);
fVar3 = *(float *)(this_00 + 0x2e0);
*(float *)(param_1 + 0x54) = *(float *)(param_2 + 0x2e4) - *(float *)(this_00 + 0x2e4);
*(float *)(param_1 + 0x58) = fVar8 - fVar2;
*(float *)(param_1 + 0x50) = fVar1 - fVar3;
VectorNormalize((Vector *)(param_1 + 0x50));
(**(code **)(*(int *)param_2 + 0x24c))(param_2,&local_40,&local_34,local_28);
fVar8 = *(float *)(param_1 + 0x54) * local_3c + *(float *)(param_1 + 0x50) * local_40 +
*(float *)(param_1 + 0x58) * local_38;
if (fVar8 < 0.0) {
lVar7 = (longdouble)RandomFloat(0x3e4ccccd,0x3ecccccd);
fVar1 = (float)lVar7;
fVar8 = fVar8 * 0.10000001 + 0.2 + fVar1;
lVar7 = (longdouble)CountdownTimer::Now();
if ((float)lVar7 + fVar8 != *(float *)(param_1 + 0x3c)) {
(**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x3c);
*(float *)(param_1 + 0x3c) = (float)lVar7 + fVar8;
}
if (fVar8 != *(float *)(param_1 + 0x38)) {
(**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x38);
*(float *)(param_1 + 0x38) = fVar8;
}
lVar7 = (longdouble)CountdownTimer::Now();
if ((float)lVar7 + fVar1 != *(float *)(param_1 + 0x48)) {
(**(code **)(*(int *)(param_1 + 0x40) + 4))(param_1 + 0x40,param_1 + 0x48);
*(float *)(param_1 + 0x48) = (float)lVar7 + fVar1;
}
if (fVar1 != *(float *)(param_1 + 0x44)) {
(**(code **)(*(int *)(param_1 + 0x40) + 4))(param_1 + 0x40,param_1 + 0x44);
*(float *)(param_1 + 0x44) = fVar1;
}
lVar7 = (longdouble)RandomFloat(0xbf800000,0x3f800000);
fVar8 = (float)lVar7 * 3.0;
*(float *)(param_1 + 0x54) = local_30 * fVar8 + *(float *)(param_1 + 0x54);
*(float *)(param_1 + 0x58) = local_2c * fVar8 + *(float *)(param_1 + 0x58);
*(float *)(param_1 + 0x50) = fVar8 * local_34 + *(float *)(param_1 + 0x50);
if (piVar6 != (int *)0x0) {
(**(code **)(*piVar6 + 0xdc))(piVar6);
}
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
}
*(undefined4 *)this = 3;
*(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.