L L4D2node

PlayerLocomotion::DismountLadderTop

0x0076cd30 · 722 bytes · __thiscall

_ZN16PlayerLocomotion17DismountLadderTopEv

Decompiled

undefined (1 param)

/* PlayerLocomotion::DismountLadderTop() */

undefined4 __thiscall PlayerLocomotion::DismountLadderTop(PlayerLocomotion *this)

{
  float fVar1;
  code *pcVar2;
  float fVar3;
  char cVar4;
  float *pfVar5;
  int *piVar6;
  INextBot *this_00;
  int *piVar7;
  int iVar8;
  Vector *pVVar9;
  longdouble lVar10;
  float fVar11;
  float fVar12;
  float fVar13;
  float local_40;
  float local_3c;
  float local_38;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  if ((*(int *)(this + 0xa8) != 0) &&
     (lVar10 = (longdouble)CountdownTimer::Now(), (float)lVar10 < *(float *)(this + 0xb8))) {
    iVar8 = *(int *)(this + 0xac);
    local_40 = *(float *)(iVar8 + 0x2c);
    local_3c = *(float *)(iVar8 + 0x30);
    local_38 = *(float *)(iVar8 + 0x34);
    pfVar5 = (float *)(**(code **)(*(int *)this + 300))(this);
    fVar3 = local_38;
    local_34 = local_40 - *pfVar5;
    fVar1 = pfVar5[2];
    local_2c = 0.0;
    local_30 = local_3c - pfVar5[1];
    lVar10 = (longdouble)VectorNormalize((Vector *)&local_34);
    piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
    piVar6 = (int *)(**(code **)(*piVar6 + 0xc4))(piVar6);
    fVar13 = local_34 * 100.0;
    fVar12 = local_30 * 100.0;
    fVar11 = local_2c * 100.0;
    pcVar2 = *(code **)(*piVar6 + 0xc0);
    pfVar5 = (float *)(**(code **)(*piVar6 + 0xb8))(piVar6);
    local_28 = fVar13 + *pfVar5;
    local_24 = fVar12 + pfVar5[1];
    local_20 = fVar11 + pfVar5[2];
    (*pcVar2)(piVar6,&local_28,4,0x3dcccccd,0,"Ladder dismount",1,0x3e800000);
    (**(code **)(*(int *)this + 0xb4))(this,&local_40,0x4b189680);
    this_00 = (INextBot *)(**(code **)(*(int *)this + 0xb0))(this);
    cVar4 = INextBot::IsDebugging(this_00,0x10);
    if (cVar4 != '\0') {
      piVar7 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
      iVar8 = (**(code **)(*piVar7 + 0xb4))(piVar7);
      if (*(int *)(iVar8 + 0x30) == 0) {
        iVar8 = 0;
      }
      else {
        iVar8 = *(int *)(iVar8 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
      }
      NDebugOverlay::EntityText(iVar8,0,"Dismount top",0.1,0xff,0xff,0xff,0xff);
      iVar8 = *(int *)(this + 0xac);
      pVVar9 = (Vector *)(**(code **)(*(int *)this + 300))(this);
      NDebugOverlay::HorzArrow(pVVar9,(Vector *)(iVar8 + 0x2c),5.0,0xff,0xff,0,0xff,true,0.1);
    }
    if ((20.0 <= (float)lVar10) ||
       (lVar10 = (longdouble)(**(code **)(*piVar6 + 0x120))(piVar6),
       (float)lVar10 <= ABS(fVar3 - fVar1))) {
      return 5;
    }
  }
  *(undefined4 *)(this + 0xa8) = 0;
  return 0;
}

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)