L L4D2node

ILocomotion::HasPotentialGap

0x007563c0 · 921 bytes · __thiscall

_ZNK11ILocomotion15HasPotentialGapERK6VectorS2_Pf

Decompiled

undefined (4 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ILocomotion::HasPotentialGap(Vector const&, Vector const&, float*) const */

undefined4 __thiscall
ILocomotion::HasPotentialGap(ILocomotion *this,Vector *param_1,Vector *param_2,float *param_3)

{
  uint *puVar1;
  int iVar2;
  char cVar3;
  int *piVar4;
  int iVar5;
  undefined4 uVar6;
  longdouble lVar7;
  longdouble lVar8;
  float fVar9;
  float fVar10;
  float fVar11;
  float fVar12;
  float fVar13;
  float local_60;
  float local_50;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_40;
  undefined4 local_3c;
  int local_38;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  local_4c = 0;
  local_48 = 0;
  if (_towlower == 0) {
    local_38 = 0;
  }
  else {
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_4c,0,0,0,0,
               "/data/src/game/server/nextbot/nextbotlocomotioninterface.cpp",0xe9,
               &HasPotentialGap(Vector_const&,Vector_const&,float*)::tm_fmt,"(%s)%s","NextBot",
               "Locomotion::HasPotentialGap");
    local_38 = _towlower;
  }
  iVar2 = _DAT_0105db00;
  local_40 = local_4c;
  local_3c = local_48;
                    /* try { // try from 00756688 to 007566e9 has its CatchHandler @ 0075679e */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar5 = ThreadGetCurrentId(), iVar2 == iVar5)) {
    if ((char *)*_DAT_0105d15c != "Locomotion::HasPotentialGap") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xca9550,(char *)0x0,0xca8906);
    }
    puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
    *puVar1 = *puVar1 | 4;
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
                    /* try { // try from 00756498 to 007565dc has its CatchHandler @ 0075677d */
  (**(code **)(*(int *)this + 0x158))(this,param_1,param_2,0,&local_50);
  local_30 = (*(float *)(param_2 + 4) - *(float *)(param_1 + 4)) * local_50;
  local_2c = (*(float *)(param_2 + 8) - *(float *)(param_1 + 8)) * local_50;
  local_34 = (*(float *)param_2 - *(float *)param_1) * local_50;
  lVar7 = (longdouble)VectorNormalize((Vector *)&local_34);
  piVar4 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
  piVar4 = (int *)(**(code **)(*piVar4 + 0xc4))(piVar4);
  lVar8 = (longdouble)(**(code **)(*piVar4 + 0x118))(piVar4);
  local_28 = *(float *)param_1;
  fVar11 = (float)lVar8 * 0.5;
  local_60 = 0.0;
  local_24 = *(float *)(param_1 + 4);
  fVar13 = local_34 * fVar11;
  fVar9 = local_30 * fVar11;
  local_20 = *(float *)(param_1 + 8);
  fVar10 = (float)lVar7 + fVar11;
  fVar12 = fVar11 * local_2c;
  if (0.0 < fVar10) {
    do {
      uVar6 = (**(code **)(*(int *)this + 0x160))(this,&local_28,(Vector *)&local_34);
      if ((char)uVar6 != '\0') {
        if (param_3 == (float *)0x0) goto LAB_00756712;
        *param_3 = (local_60 - fVar11) / fVar10;
        if (DAT_0105d158 == '\0') goto LAB_00756618;
        goto LAB_0075671f;
      }
      local_28 = fVar13 + local_28;
      local_60 = local_60 + fVar11;
      local_24 = fVar9 + local_24;
      local_20 = fVar12 + local_20;
    } while (local_60 < fVar10);
  }
  if (param_3 != (float *)0x0) {
    *param_3 = 1.0;
  }
  uVar6 = 0;
LAB_00756712:
  if (DAT_0105d158 != '\0') {
LAB_0075671f:
    if (_DAT_0105d154 == 0) goto LAB_00756631;
  }
LAB_00756618:
  iVar2 = _DAT_0105db00;
  iVar5 = ThreadGetCurrentId();
  if (iVar2 == iVar5) {
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
    }
    DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
  }
LAB_00756631:
  if (local_38 != 0) {
    (**(code **)(local_38 + 0x54))(local_38,local_40,local_3c,0,0,0);
  }
  return uVar6;
}

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)