L L4D2node

CFuncLadder::SetEndPoints

0x0044e600 · 2083 bytes · __thiscall

_ZN11CFuncLadder12SetEndPointsERK6VectorS2_

Decompiled

undefined (3 params)

/* CFuncLadder::SetEndPoints(Vector const&, Vector const&) */

void __thiscall CFuncLadder::SetEndPoints(CFuncLadder *this,Vector *param_1,Vector *param_2)

{
  float fVar1;
  CBaseEdict *pCVar2;
  bool bVar3;
  int iVar4;
  float fVar5;
  float fVar6;
  float fVar7;
  float fVar8;
  float fVar9;
  float fVar10;
  CTraceFilterSimple local_dc [16];
  float local_cc;
  float local_c8;
  float local_c4;
  undefined4 local_bc;
  undefined4 local_b8;
  undefined4 local_b4;
  float local_ac;
  float local_a8;
  float local_a4;
  float local_9c;
  float local_98;
  float local_94;
  undefined4 local_8c;
  undefined1 local_88;
  undefined1 local_87;
  Vector local_70 [12];
  float local_64;
  float local_60;
  float local_5c;
  char local_39;
  
  fVar5 = *(float *)param_1;
  if (((fVar5 == *(float *)(this + 0x460)) && (*(float *)(param_1 + 4) == *(float *)(this + 0x464)))
     && (*(float *)(param_1 + 8) == *(float *)(this + 0x468))) {
    fVar5 = *(float *)param_2;
    if (fVar5 == *(float *)(this + 0x46c)) {
LAB_0044e65b:
      if ((*(float *)(param_2 + 4) == *(float *)(this + 0x470)) &&
         (fVar6 = *(float *)(this + 0x474), fVar6 == *(float *)(param_2 + 8))) goto LAB_0044e67f;
    }
  }
  else {
    if (this[0x6c] == (CFuncLadder)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar4 + 2) = 0;
        fVar5 = *(float *)param_1;
      }
    }
    else {
      this[0x70] = (CFuncLadder)((byte)this[0x70] | 1);
      fVar5 = *(float *)param_1;
    }
    *(float *)(this + 0x460) = fVar5;
    *(undefined4 *)(this + 0x464) = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(this + 0x468) = *(undefined4 *)(param_1 + 8);
    fVar5 = *(float *)param_2;
    if (fVar5 == *(float *)(this + 0x46c)) goto LAB_0044e65b;
  }
  if (this[0x6c] == (CFuncLadder)0x0) {
    pCVar2 = *(CBaseEdict **)(this + 0x30);
    if (pCVar2 != (CBaseEdict *)0x0) {
      *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
      iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
      *(undefined2 *)(iVar4 + 2) = 0;
      fVar5 = *(float *)param_2;
    }
  }
  else {
    this[0x70] = (CFuncLadder)((byte)this[0x70] | 1);
    fVar5 = *(float *)param_2;
  }
  *(float *)(this + 0x46c) = fVar5;
  *(undefined4 *)(this + 0x470) = *(undefined4 *)(param_2 + 4);
  fVar6 = *(float *)(param_2 + 8);
  *(float *)(this + 0x474) = fVar6;
LAB_0044e67f:
  fVar5 = *(float *)(this + 0x468);
  if (fVar5 < fVar6) {
    fVar1 = *(float *)(this + 0x46c);
    fVar7 = *(float *)(this + 0x470);
    if (this[0x6c] == (CFuncLadder)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar4 + 2) = 0;
        fVar5 = *(float *)(this + 0x468);
      }
    }
    else {
      this[0x70] = (CFuncLadder)((byte)this[0x70] | 1);
    }
    *(float *)(this + 0x474) = fVar5;
    *(float *)(this + 0x46c) = *(float *)(this + 0x460);
    *(float *)(this + 0x470) = *(float *)(this + 0x464);
    if (((fVar1 != *(float *)(this + 0x460)) || (fVar7 != *(float *)(this + 0x464))) ||
       (fVar6 != fVar5)) {
      if (this[0x6c] == (CFuncLadder)0x0) {
        pCVar2 = *(CBaseEdict **)(this + 0x30);
        if (pCVar2 != (CBaseEdict *)0x0) {
          *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CFuncLadder)((byte)this[0x70] | 1);
      }
      *(float *)(this + 0x460) = fVar1;
      *(float *)(this + 0x464) = fVar7;
      *(float *)(this + 0x468) = fVar6;
    }
  }
  iVar4 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
  fVar5 = *(float *)(iVar4 + 0xc);
  fVar6 = *(float *)(iVar4 + 0x10);
  fVar1 = *(float *)(iVar4 + 0x14);
  iVar4 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
  local_87 = 1;
  fVar8 = (*(float *)(iVar4 + 0x18) - fVar5) * 0.5;
  local_bc = 0;
  local_b8 = 0;
  local_b4 = 0xc0800000;
  local_8c = 0;
  fVar7 = (*(float *)(iVar4 + 0x18) + fVar5) * 0.5;
  local_cc = *(float *)(this + 0x460) + fVar7;
  fVar9 = (*(float *)(iVar4 + 0x1c) - fVar6) * 0.5;
  fVar6 = (*(float *)(iVar4 + 0x1c) + fVar6) * 0.5;
  local_c8 = *(float *)(this + 0x464) + fVar6;
  fVar10 = (*(float *)(iVar4 + 0x20) - fVar1) * 0.5;
  fVar5 = (*(float *)(iVar4 + 0x20) + fVar1) * 0.5;
  local_c4 = *(float *)(this + 0x468) + 4.0 + fVar5;
  bVar3 = fVar10 * fVar10 + fVar8 * fVar8 + fVar9 * fVar9 < 1e-06;
  local_ac = -fVar7;
  local_a8 = -fVar6;
  local_a4 = -fVar5;
  local_9c = fVar8;
  local_98 = fVar9;
  local_94 = fVar10;
  local_88 = bVar3;
  CTraceFilterSimple::CTraceFilterSimple
            (local_dc,(IHandleEntity *)0x0,8,(_func_bool_IHandleEntity_ptr_int *)0x0);
  (**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,0x1400b,local_dc,local_70);
  if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
    DebugDrawLine(local_70,(Vector *)&local_64,0xff,0xff,0,true,-1.0);
  }
  if ((local_39 == '\0') &&
     (((local_64 != *(float *)(this + 0x460) || (local_60 != *(float *)(this + 0x464))) ||
      (local_5c != *(float *)(this + 0x468))))) {
    if (this[0x6c] == (CFuncLadder)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CFuncLadder)((byte)this[0x70] | 1);
    }
    *(float *)(this + 0x460) = local_64;
    *(float *)(this + 0x464) = local_60;
    *(float *)(this + 0x468) = local_5c;
  }
  local_87 = 1;
  local_bc = 0;
  local_b8 = 0;
  local_cc = *(float *)(this + 0x46c) + fVar7;
  local_b4 = 0xc0800000;
  local_c4 = *(float *)(this + 0x474) + 4.0 + fVar5;
  local_c8 = *(float *)(this + 0x470) + fVar6;
  local_8c = 0;
  local_ac = -fVar7;
  local_a8 = -fVar6;
  local_a4 = -fVar5;
  local_9c = fVar8;
  local_98 = fVar9;
  local_94 = fVar10;
  local_88 = bVar3;
  CTraceFilterSimple::CTraceFilterSimple
            (local_dc,(IHandleEntity *)0x0,8,(_func_bool_IHandleEntity_ptr_int *)0x0);
  (**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,0x1400b,local_dc,local_70);
  if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
    DebugDrawLine(local_70,(Vector *)&local_64,0xff,0xff,0,true,-1.0);
  }
  if ((local_39 == '\0') &&
     (((local_64 != *(float *)(this + 0x46c) || (local_60 != *(float *)(this + 0x470))) ||
      (local_5c != *(float *)(this + 0x474))))) {
    if (this[0x6c] == (CFuncLadder)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CFuncLadder)((byte)this[0x70] | 1);
    }
    *(float *)(this + 0x46c) = local_64;
    *(float *)(this + 0x470) = local_60;
    *(float *)(this + 0x474) = local_5c;
    return;
  }
  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)