ZombieBotBody::Reset
0x00a4be80 · 660 bytes · __thiscall
_ZN13ZombieBotBody5ResetEv
Decompiled
undefined (1 param)
/* ZombieBotBody::Reset() */
void __thiscall ZombieBotBody::Reset(ZombieBotBody *this)
{
undefined4 uVar1;
int *piVar2;
int *piVar3;
undefined4 uVar4;
CBaseEntity *this_00;
undefined4 *puVar5;
longdouble lVar6;
float fVar7;
float local_40;
float local_34;
float local_30;
undefined4 local_2c;
float local_28;
float local_24;
float local_20;
piVar2 = mdlcache;
(**(code **)(*mdlcache + 0x68))(mdlcache);
/* try { // try from 00a4be9f to 00a4c059 has its CatchHandler @ 00a4c12d */
piVar3 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
uVar4 = (**(code **)(*piVar3 + 0xb4))(piVar3);
uVar1 = vec3_origin;
*(undefined4 *)(this + 0x14) = uVar4;
*(undefined4 *)(this + 0x28) = 0x3f800000;
*(undefined4 *)(this + 0x1c) = uVar1;
uVar1 = DAT_01053d4c;
*(undefined4 *)(this + 0x2c) = 0;
*(undefined4 *)(this + 0x20) = uVar1;
uVar1 = DAT_01053d50;
*(undefined4 *)(this + 0x30) = 0;
*(undefined4 *)(this + 0x24) = uVar1;
*(undefined4 *)(this + 0x40) = 0;
*(undefined4 *)(this + 0x44) = 0;
this[0x48] = (ZombieBotBody)0x0;
lVar6 = (longdouble)(**(code **)(*(int *)this + 0x118))(this);
local_2c = 0;
fVar7 = (float)lVar6 * 0.5;
local_34 = -fVar7;
local_30 = local_34;
lVar6 = (longdouble)(**(code **)(*(int *)this + 0x120))(this);
local_20 = (float)lVar6;
local_28 = fVar7;
local_24 = fVar7;
piVar3 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
this_00 = (CBaseEntity *)(**(code **)(*piVar3 + 0xb4))(piVar3);
CBaseEntity::SetCollisionBounds(this_00,(Vector *)&local_34,(Vector *)&local_28);
*(undefined4 *)(this + 0x4c) = 0;
*(undefined4 *)(this + 0x50) = 0x233;
*(undefined4 *)(this + 0x5c) = 0x233;
*(undefined4 *)(this + 0x58) = 1;
*(undefined4 *)(this + 0x54) = 0;
*(undefined4 *)(this + 0x60) = 1;
this[100] = (ZombieBotBody)0x0;
if (*(int *)(*(int *)(this + 0x14) + 0x30) == 0) {
local_40 = 0.0;
}
else {
local_40 = (float)(*(int *)(*(int *)(this + 0x14) + 0x30) - *(int *)(gpGlobals + 0x58) >> 4) *
0.1;
fVar7 = local_40;
if (ABS(local_40) < 8388608.0) {
fVar7 = (float)(int)local_40 - (float)(-(uint)(local_40 < (float)(int)local_40) & 0x3f800000);
}
local_40 = local_40 - fVar7;
}
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + local_40 != *(float *)(this + 0x94)) {
(**(code **)(*(int *)(this + 0x8c) + 4))(this + 0x8c,this + 0x94);
*(float *)(this + 0x94) = (float)lVar6 + local_40;
}
if (local_40 != *(float *)(this + 0x90)) {
/* try { // try from 00a4c0d3 to 00a4c105 has its CatchHandler @ 00a4c12d */
(**(code **)(*(int *)(this + 0x8c) + 4))(this + 0x8c,this + 0x90);
*(float *)(this + 0x90) = local_40;
}
puVar5 = (undefined4 *)
(**(code **)(*(int *)(*(int *)(this + 0x14) + 0x1a3c) + 0xd4))
(*(int *)(this + 0x14) + 0x1a3c);
*(undefined4 *)(this + 0x98) = *puVar5;
*(undefined4 *)(this + 0x9c) = puVar5[1];
*(undefined4 *)(this + 0xa0) = puVar5[2];
(**(code **)(*piVar2 + 0x6c))(piVar2);
return;
}
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.