PlayerLocomotion::ApproachAscendingLadder
0x0076c120 · 592 bytes · __thiscall
_ZN16PlayerLocomotion23ApproachAscendingLadderEv
Decompiled
undefined (1 param)
/* PlayerLocomotion::ApproachAscendingLadder() */
undefined4 __thiscall PlayerLocomotion::ApproachAscendingLadder(PlayerLocomotion *this)
{
float fVar1;
float fVar2;
char cVar3;
int iVar4;
undefined4 uVar5;
int *piVar6;
INextBot *this_00;
longdouble lVar7;
if (*(int *)(this + 0xa8) == 0) {
return 0;
}
iVar4 = (**(code **)(*(int *)this + 300))(this);
fVar1 = *(float *)(iVar4 + 8);
fVar2 = *(float *)(*(int *)(this + 0xa8) + 0xc);
lVar7 = (longdouble)(**(code **)(*(int *)this + 0x130))(this);
if (fVar1 < fVar2 - (float)lVar7) {
iVar4 = (**(code **)(*(int *)this + 300))(this);
fVar1 = *(float *)(iVar4 + 8);
fVar2 = *(float *)(*(int *)(this + 0xa8) + 0x18);
lVar7 = (longdouble)(**(code **)(*(int *)this + 0x134))(this);
if (fVar1 <= fVar2 - (float)lVar7) {
return 0;
}
(**(code **)(*(int *)this + 0x120))(this,*(int *)(this + 0xa8) + 0x10);
(**(code **)(*(int *)this + 0xb4))(this,*(int *)(this + 0xa8) + 0x10,0x4b189680);
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
iVar4 = (**(code **)(*piVar6 + 0xb4))(piVar6);
uVar5 = 3;
if (*(char *)(iVar4 + 0x186) != '\t') {
this_00 = (INextBot *)(**(code **)(*(int *)this + 0xb0))(this);
cVar3 = INextBot::IsDebugging(this_00,0x10);
uVar5 = 1;
if (cVar3 != '\0') {
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
iVar4 = (**(code **)(*piVar6 + 0xb4))(piVar6);
if (*(int *)(iVar4 + 0x30) == 0) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(iVar4 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
NDebugOverlay::EntityText(iVar4,0,"Approach ascending ladder",0.1,0xff,0xff,0xff,0xff);
uVar5 = 1;
}
}
}
else {
lVar7 = (longdouble)CountdownTimer::Now();
if ((float)lVar7 + 2.0 != *(float *)(this + 0xb8)) {
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb8);
*(float *)(this + 0xb8) = (float)lVar7 + 2.0;
}
uVar5 = 5;
if (*(float *)(this + 0xb4) != 2.0) {
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb4);
*(undefined4 *)(this + 0xb4) = 0x40000000;
return 5;
}
}
return uVar5;
}
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.