L L4D2node

PlayerLocomotion::TraverseLadder

0x0076d0c0 · 303 bytes · __thiscall

_ZN16PlayerLocomotion14TraverseLadderEv

Decompiled

undefined (1 param)

/* PlayerLocomotion::TraverseLadder() */

undefined4 __thiscall PlayerLocomotion::TraverseLadder(PlayerLocomotion *this)

{
  undefined4 uVar1;
  int *piVar2;
  int iVar3;
  CBaseEntity *pCVar4;
  undefined4 uVar5;
  
  switch(*(undefined4 *)(this + 0xa4)) {
  default:
    *(undefined4 *)(this + 0xa8) = 0;
    uVar5 = 0;
    piVar2 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
    iVar3 = (**(code **)(*piVar2 + 0xb4))(piVar2);
    if (*(char *)(iVar3 + 0x186) == '\t') {
      piVar2 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
      pCVar4 = (CBaseEntity *)(**(code **)(*piVar2 + 0xb4))(piVar2);
      CBaseEntity::SetMoveType(pCVar4,2,0);
    }
    break;
  case 1:
    uVar1 = ApproachAscendingLadder(this);
    *(undefined4 *)(this + 0xa4) = uVar1;
    return 1;
  case 2:
    uVar1 = ApproachDescendingLadder(this);
    *(undefined4 *)(this + 0xa4) = uVar1;
    return 1;
  case 3:
    uVar1 = AscendLadder(this);
    *(undefined4 *)(this + 0xa4) = uVar1;
    return 1;
  case 4:
    uVar1 = DescendLadder(this);
    *(undefined4 *)(this + 0xa4) = uVar1;
    return 1;
  case 5:
    uVar1 = DismountLadderTop(this);
    *(undefined4 *)(this + 0xa4) = uVar1;
    return 1;
  case 6:
    uVar5 = 1;
    uVar1 = DismountLadderBottom(this);
    *(undefined4 *)(this + 0xa4) = uVar1;
  }
  return uVar5;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)