PlayerLocomotion::DescendLadder
0x0076ca40 · 719 bytes · __thiscall
_ZN16PlayerLocomotion13DescendLadderEv
Decompiled
undefined (1 param)
/* PlayerLocomotion::DescendLadder() */
undefined4 __thiscall PlayerLocomotion::DescendLadder(PlayerLocomotion *this)
{
float fVar1;
float fVar2;
float fVar3;
char cVar4;
int *piVar5;
int iVar6;
float *pfVar7;
INextBot *this_00;
undefined4 uVar8;
longdouble lVar9;
float local_18;
float local_14;
float local_10;
uVar8 = 0;
if (*(int *)(this + 0xa8) != 0) {
piVar5 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
iVar6 = (**(code **)(*piVar5 + 0xb4))(piVar5);
if (*(char *)(iVar6 + 0x186) == '\t') {
iVar6 = (**(code **)(*(int *)this + 300))(this);
fVar1 = *(float *)(iVar6 + 8);
fVar2 = *(float *)(*(int *)(this + 0xa8) + 0x18);
piVar5 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
piVar5 = (int *)(**(code **)(*piVar5 + 0xc0))(piVar5);
lVar9 = (longdouble)(**(code **)(*piVar5 + 0x130))(piVar5);
if ((float)lVar9 + fVar2 < fVar1) {
iVar6 = *(int *)(this + 0xa8);
fVar1 = *(float *)(iVar6 + 0x48);
fVar2 = *(float *)(iVar6 + 0x40);
fVar3 = *(float *)(iVar6 + 0x44);
pfVar7 = (float *)(**(code **)(*(int *)this + 300))(this);
local_18 = fVar2 * 100.0 + *pfVar7;
local_14 = fVar3 * 100.0 + pfVar7[1];
local_10 = (fVar1 + -2.0) * 100.0 + pfVar7[2];
piVar5 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
piVar5 = (int *)(**(code **)(*piVar5 + 0xc4))(piVar5);
(**(code **)(*piVar5 + 0xc0))(piVar5,&local_18,4,0x3dcccccd,0,"Ladder",1,0x3e800000);
uVar8 = 4;
(**(code **)(*(int *)this + 0xb4))(this,&local_18,0x4b189680);
this_00 = (INextBot *)(**(code **)(*(int *)this + 0xb0))(this);
cVar4 = INextBot::IsDebugging(this_00,0x10);
if (cVar4 != '\0') {
piVar5 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
iVar6 = (**(code **)(*piVar5 + 0xb4))(piVar5);
if (*(int *)(iVar6 + 0x30) == 0) {
iVar6 = 0;
}
else {
iVar6 = *(int *)(iVar6 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
uVar8 = 4;
NDebugOverlay::EntityText(iVar6,0,"Descend",0.1,0xff,0xff,0xff,0xff);
}
}
else {
lVar9 = (longdouble)CountdownTimer::Now();
if ((float)lVar9 + 2.0 != *(float *)(this + 0xb8)) {
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb8);
*(float *)(this + 0xb8) = (float)lVar9 + 2.0;
}
if (*(float *)(this + 0xb4) == 2.0) {
uVar8 = 6;
}
else {
uVar8 = 6;
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb4);
*(undefined4 *)(this + 0xb4) = 0x40000000;
}
}
}
else {
*(undefined4 *)(this + 0xa8) = 0;
}
}
return uVar8;
}
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.