InfectedStandDazed::OnStart
0x00a38510 · 781 bytes · __thiscall
_ZN18InfectedStandDazed7OnStartEP8InfectedP6ActionIS0_E
Decompiled
undefined (3 params)
/* InfectedStandDazed::OnStart(Infected*, Action<Infected>*) */
InfectedStandDazed * __thiscall
InfectedStandDazed::OnStart(InfectedStandDazed *this,Infected *param_1,Action *param_2)
{
float fVar1;
undefined4 uVar2;
char cVar3;
int *piVar4;
undefined4 *puVar5;
int iVar6;
int iVar7;
longdouble lVar8;
piVar4 = (int *)(**(code **)(*(int *)param_2 + 0x594))(param_2);
if (piVar4 != (int *)0x0) {
cVar3 = (**(code **)(*piVar4 + 0x100))(piVar4,2);
if (cVar3 == '\0') {
cVar3 = (**(code **)(*piVar4 + 0x100))(piVar4,4);
if (cVar3 == '\0') goto LAB_00a3861b;
}
param_1[0x32] = (Infected)0x0;
puVar5 = ::operator_new(0x38);
*(undefined4 *)this = 2;
puVar5[8] = 0;
puVar5[9] = 0;
puVar5[10] = 0;
puVar5[3] = 0;
puVar5[4] = 0;
puVar5[5] = 0;
puVar5[6] = 0;
puVar5[7] = 0;
puVar5[2] = 0;
*(undefined1 *)(puVar5 + 0xc) = 0;
*(undefined1 *)((int)puVar5 + 0x31) = 0;
puVar5[0xb] = 0;
*puVar5 = &PTR__InfectedChangePosture_00d219e8;
puVar5[1] = &PTR__InfectedChangePosture_00d21b4c;
puVar5[0xd] = 0;
*(undefined4 **)(this + 4) = puVar5;
*(undefined4 *)(param_1 + 0x20) = 0;
*(undefined4 *)(param_1 + 0x24) = 0;
*(undefined4 *)(param_1 + 0x28) = 0;
*(undefined4 *)(param_1 + 0x2c) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
LAB_00a3861b:
uVar2 = ZombieStandStill._28_4_;
param_1[0x32] = (Infected)0x1;
if (*(int *)(uVar2 + 0x30) == 0) {
lVar8 = (longdouble)RandomFloat(0,0x42c80000);
if ((float)lVar8 < 50.0) {
iVar6 = RandomInt(0,100);
iVar7 = 0x246;
if (0x20 < iVar6) {
iVar7 = (uint)(0x41 < iVar6) * 3 + 0x249;
}
lVar8 = (longdouble)RandomFloat(0x40400000,0x41700000);
fVar1 = (float)lVar8;
puVar5 = ::operator_new(0x4c);
puVar5[8] = 0;
puVar5[9] = 0;
puVar5[10] = 0;
puVar5[3] = 0;
puVar5[4] = 0;
puVar5[5] = 0;
puVar5[6] = 0;
puVar5[7] = 0;
puVar5[2] = 0;
*(undefined1 *)(puVar5 + 0xc) = 0;
*(undefined1 *)((int)puVar5 + 0x31) = 0;
puVar5[0xb] = 0;
*puVar5 = &PTR__InfectedStandingActivity_00d24c08;
puVar5[1] = &PTR__InfectedStandingActivity_00d24d6c;
puVar5[0xe] = &PTR_NetworkStateChanged_00c0b6e0;
puVar5[0xf] = 0;
puVar5[0x10] = 0xbf800000;
puVar5[0xd] = iVar7;
puVar5[0x11] = 0;
*(undefined1 *)(puVar5 + 0x12) = 0;
if (0.0 < fVar1) {
/* try { // try from 00a3878a to 00a38822 has its CatchHandler @ 00a38832 */
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar1 != (float)puVar5[0x10]) {
(**(code **)(puVar5[0xe] + 4))(puVar5 + 0xe,puVar5 + 0x10);
puVar5[0x10] = (float)lVar8 + fVar1;
}
if (fVar1 != (float)puVar5[0xf]) {
(**(code **)(puVar5[0xe] + 4))(puVar5 + 0xe,puVar5 + 0xf);
puVar5[0xf] = fVar1;
}
}
*(undefined4 *)(param_1 + 0x20) = 0;
*(undefined4 *)(param_1 + 0x24) = 0;
*(undefined4 *)(param_1 + 0x28) = 0;
*(undefined4 *)(param_1 + 0x2c) = 0;
*(undefined4 *)this = 2;
*(undefined4 **)(this + 4) = puVar5;
*(char **)(this + 8) = "Starting with random facing";
return this;
}
}
(**(code **)(*piVar4 + 0xd8))(piVar4,0x233,1);
*(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.