L L4D2node

CFuncLadder::SearchForDismountPoints

0x004508f0 · 333 bytes · __thiscall

_ZN11CFuncLadder23SearchForDismountPointsEv

Decompiled

undefined (1 param)

/* CFuncLadder::SearchForDismountPoints() */

void __thiscall CFuncLadder::SearchForDismountPoints(CFuncLadder *this)

{
  longdouble lVar1;
  float local_60;
  float local_54;
  float local_50;
  float local_4c;
  float local_48;
  float local_44;
  float local_40;
  float local_3c;
  float local_38;
  float local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  local_30 = 0;
  local_2c = 0;
  local_28 = 0;
  local_24 = 0;
  local_20 = 0;
                    /* try { // try from 00450929 to 004509fc has its CatchHandler @ 00450a3f */
  GetTopPosition(this,(Vector *)&local_54);
  GetBottomPosition(this,(Vector *)&local_48);
  local_3c = local_54 - local_48;
  local_38 = local_50 - local_44;
  local_34 = local_4c - local_40;
  lVar1 = (longdouble)VectorNormalize((Vector *)&local_3c);
  local_60 = (float)lVar1;
  FindNearbyDismountPoints(this,(Vector *)&local_54,100.0,(CUtlVector *)(this + 0x44c));
  while( true ) {
    FindNearbyDismountPoints(this,(Vector *)&local_48,100.0,(CUtlVector *)(this + 0x44c));
    local_60 = local_60 - 40.0;
    if (local_60 <= 0.0) break;
    local_44 = local_38 * 40.0 + local_44;
    local_40 = local_34 * 40.0 + local_40;
    local_48 = local_3c * 40.0 + local_48;
  }
  local_24 = 0;
  CUtlMemory<CHandle<CInfoLadderDismount>,int>::Purge
            ((CUtlMemory<CHandle<CInfoLadderDismount>,int> *)&local_30);
  local_20 = local_30;
  CUtlMemory<CHandle<CInfoLadderDismount>,int>::Purge
            ((CUtlMemory<CHandle<CInfoLadderDismount>,int> *)&local_30);
  return;
}

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)