L L4D2node

CFuncLadderEndPoint::Validate

0x006bffa0 · 480 bytes · __thiscall

_ZN19CFuncLadderEndPoint8ValidateEv

Decompiled

undefined (1 param)

/* CFuncLadderEndPoint::Validate() */

undefined4 __thiscall CFuncLadderEndPoint::Validate(CFuncLadderEndPoint *this)

{
  uint uVar1;
  int iVar2;
  CBaseEntity *this_00;
  CFuncLadder *this_01;
  undefined1 *puVar3;
  undefined *puVar4;
  undefined4 local_40;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  if (((byte)this[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  local_34 = *(undefined4 *)(this + 0x2e0);
  local_30 = *(undefined4 *)(this + 0x2e4);
  local_2c = *(undefined4 *)(this + 0x2e8);
  iVar2 = CBaseEntity::GetNextTarget((CBaseEntity *)this);
  if (iVar2 != 0) {
    this_00 = (CBaseEntity *)__dynamic_cast(iVar2,&CBaseEntity::typeinfo,&typeinfo,0);
    if (this_00 != (CBaseEntity *)0x0) {
      if (((byte)this_00[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(this_00);
      }
      local_28 = *(undefined4 *)(this_00 + 0x2e0);
      local_24 = *(undefined4 *)(this_00 + 0x2e4);
      local_20 = *(undefined4 *)(this_00 + 0x2e8);
      this_01 = (CFuncLadder *)CreateEntityByName("func_useableladder",-1,true);
      if (this_01 != (CFuncLadder *)0x0) {
        CFuncLadder::SetEndPoints(this_01,(Vector *)&local_34,(Vector *)&local_28);
        if (((byte)this[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
        }
        CBaseEntity::SetAbsOrigin((CBaseEntity *)this_01,(Vector *)(this + 0x2e0));
        local_40 = 0;
        uVar1 = *(uint *)(this + 0x180);
        if (((uVar1 != 0xffffffff) &&
            (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
          local_40 = *(undefined4 *)(puVar4 + 4);
        }
        (**(code **)(*(int *)this_01 + 0x98))(this_01,local_40,0xffffffff);
        *(undefined4 *)(this_01 + 0x154) = *(undefined4 *)(this + 0x154);
        (**(code **)(*(int *)this_01 + 100))(this_01);
      }
      UTIL_Remove(this_00);
      UTIL_Remove((CBaseEntity *)this);
      return 1;
    }
  }
  puVar3 = &DAT_00d539c2;
  if (*(undefined1 **)(this + 0x154) != (undefined1 *)0x0) {
    puVar3 = *(undefined1 **)(this + 0x154);
  }
  DevMsg(1,"func_ladderendpoint(%s) without matching target\n",puVar3);
  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)