ZombieBotLocomotion::TraverseLadder
0x00a54a50 · 874 bytes · __thiscall
_ZN19ZombieBotLocomotion14TraverseLadderEv
Decompiled
undefined (1 param)
/* ZombieBotLocomotion::TraverseLadder() */
undefined4 __thiscall ZombieBotLocomotion::TraverseLadder(ZombieBotLocomotion *this)
{
float fVar1;
float fVar2;
float fVar3;
ZombieBotLocomotion ZVar4;
CBaseEntity *this_00;
undefined4 uVar5;
undefined4 uVar6;
undefined4 uVar7;
char cVar8;
int *piVar9;
int iVar10;
int iVar11;
longdouble lVar12;
float fVar13;
float fVar14;
float local_40;
float local_3c;
undefined4 local_38;
QAngle local_34 [12];
uint local_28;
uint local_24;
float local_20;
piVar9 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
piVar9 = (int *)(**(code **)(*piVar9 + 0xc4))(piVar9);
if (piVar9 == (int *)0x0) {
return 0;
}
if (*(int *)(this + 0xe8) != 0) {
cVar8 = (**(code **)(*piVar9 + 0xe4))(piVar9,0x2cd);
if (cVar8 == '\0') {
iVar11 = (**(code **)(*(int *)this + 300))(this);
iVar10 = *(int *)(this + 0xe8);
fVar13 = *(float *)(iVar10 + 0x14);
fVar1 = *(float *)(iVar10 + 4);
fVar14 = (*(float *)(iVar11 + 8) - *(float *)(iVar10 + 0x18)) /
(*(float *)(iVar10 + 0xc) - *(float *)(iVar10 + 0x18));
fVar2 = *(float *)(iVar10 + 0x10);
fVar3 = *(float *)(iVar10 + 8);
lVar12 = (longdouble)(**(code **)(*piVar9 + 0x118))(piVar9);
this_00 = *(CBaseEntity **)(this + 0x78);
local_40 = (fVar1 - fVar2) * fVar14 + fVar2 +
*(float *)(*(int *)(this + 0xe8) + 0x40) * (float)lVar12 * 0.75;
local_3c = (fVar3 - fVar13) * fVar14 + fVar13 +
(float)lVar12 * 0.75 * *(float *)(*(int *)(this + 0xe8) + 0x44);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
local_38 = *(undefined4 *)(this_00 + 0x2e8);
UpdatePosition(this,(Vector *)&local_40);
iVar10 = *(int *)(this + 0xe8);
local_20 = -*(float *)(iVar10 + 0x48);
local_24 = *(uint *)(iVar10 + 0x44) ^ 0x80000000;
local_28 = *(uint *)(iVar10 + 0x40) ^ 0x80000000;
VectorAngles((Vector *)&local_28,local_34);
CBaseEntity::SetAbsAngles(*(CBaseEntity **)(this + 0x78),local_34);
ZVar4 = this[0xf0];
}
else {
ZVar4 = this[0xf0];
}
if (ZVar4 == (ZombieBotLocomotion)0x0) {
(**(code **)(*(int *)this + 0x120))(this,*(int *)(this + 0xe8) + 0x10);
iVar10 = (**(code **)(*(int *)this + 300))(this);
fVar13 = *(float *)(iVar10 + 8);
fVar1 = *(float *)(*(int *)(this + 0xec) + 0x34);
lVar12 = (longdouble)(**(code **)(*(int *)this + 0x130))(this);
if (fVar13 < (float)lVar12 + fVar1) {
*(undefined4 *)(this + 0xe8) = 0;
return 0;
}
}
else {
CNavArea::GetClosestPointOnArea
(*(CNavArea **)(this + 0xec),(Vector *)(*(int *)(this + 0xe8) + 4),
(Vector *)&local_28);
fVar13 = *(float *)(*(int *)(this + 0xe8) + 0xc);
if (*(float *)(*(int *)(this + 0xe8) + 0xc) <= local_20) {
fVar13 = local_20;
}
lVar12 = (longdouble)(**(code **)(*piVar9 + 0x120))(piVar9);
iVar10 = (**(code **)(*(int *)this + 300))(this);
if ((float)lVar12 <= fVar13 - *(float *)(iVar10 + 8)) {
(**(code **)(*(int *)this + 0x120))(this,*(int *)(this + 0xe8) + 4);
}
else {
cVar8 = (**(code **)(*piVar9 + 0xe4))(piVar9,0x2cd);
if (cVar8 == '\0') {
(**(code **)(*piVar9 + 0xd8))(piVar9,0x2cd,3);
}
(**(code **)(*(int *)this + 0x120))(this,*(int *)(this + 0xec) + 0x2c);
}
}
uVar7 = DAT_01053d50;
uVar6 = DAT_01053d4c;
uVar5 = vec3_origin;
*(undefined4 *)(this + 0x6c) = vec3_origin;
*(undefined4 *)(this + 0x70) = uVar6;
*(undefined4 *)(this + 0x74) = uVar7;
*(undefined4 *)(this + 0x94) = uVar5;
*(undefined4 *)(this + 0x98) = uVar6;
*(undefined4 *)(this + 0x9c) = uVar7;
return 1;
}
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.