PlayerLocomotion::AscendLadder
0x0076c790 · 665 bytes · __thiscall
_ZN16PlayerLocomotion12AscendLadderEv
Decompiled
undefined (1 param)
/* PlayerLocomotion::AscendLadder() */
undefined4 __thiscall PlayerLocomotion::AscendLadder(PlayerLocomotion *this)
{
float fVar1;
float fVar2;
float fVar3;
char cVar4;
int *piVar5;
int iVar6;
int iVar7;
float *pfVar8;
INextBot *this_00;
undefined4 uVar9;
longdouble lVar10;
float local_18;
float local_14;
float local_10;
uVar9 = 0;
if (*(int *)(this + 0xa8) != 0) {
piVar5 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
iVar6 = (**(code **)(*piVar5 + 0xb4))(piVar5);
if (*(char *)(iVar6 + 0x186) == '\t') {
iVar7 = (**(code **)(*(int *)this + 300))(this);
iVar6 = *(int *)(this + 0xa8);
if (*(float *)(iVar7 + 8) < *(float *)(iVar6 + 0xc)) {
fVar1 = *(float *)(iVar6 + 0x40);
fVar2 = *(float *)(iVar6 + 0x44);
fVar3 = *(float *)(iVar6 + 0x48);
pfVar8 = (float *)(**(code **)(*(int *)this + 300))(this);
local_18 = -fVar1 * 100.0 + *pfVar8;
local_14 = -fVar2 * 100.0 + pfVar8[1];
local_10 = (2.0 - fVar3) * 100.0 + pfVar8[2];
piVar5 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
piVar5 = (int *)(**(code **)(*piVar5 + 0xc4))(piVar5);
(**(code **)(*piVar5 + 0xc0))(piVar5,&local_18,4,0x3dcccccd,0,"Ladder",0,0x3e800000);
uVar9 = 3;
(**(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;
}
uVar9 = 3;
NDebugOverlay::EntityText(iVar6,0,"Ascend",0.1,0xff,0xff,0xff,0xff);
}
}
else {
lVar10 = (longdouble)CountdownTimer::Now();
if ((float)lVar10 + 2.0 != *(float *)(this + 0xb8)) {
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb8);
*(float *)(this + 0xb8) = (float)lVar10 + 2.0;
}
if (*(float *)(this + 0xb4) == 2.0) {
uVar9 = 5;
}
else {
uVar9 = 5;
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb4);
*(undefined4 *)(this + 0xb4) = 0x40000000;
}
}
}
else {
*(undefined4 *)(this + 0xa8) = 0;
}
}
return uVar9;
}
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.