L L4D2node

ILocomotion::IsGap

0x007567b0 · 990 bytes · __cdecl

_ZNK11ILocomotion5IsGapERK6VectorS2_

Decompiled

undefined (2 params)

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

byte ILocomotion::IsGap(Vector *param_1,Vector *param_2)

{
  uint *puVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  int iVar5;
  char cVar6;
  int *piVar7;
  IHandleEntity *pIVar8;
  int iVar9;
  byte bVar10;
  longdouble lVar11;
  longdouble lVar12;
  undefined4 local_110;
  undefined4 local_f4;
  undefined4 local_f0;
  undefined4 local_e8;
  undefined4 local_e4;
  int local_e0;
  undefined **local_dc [4];
  float local_cc;
  float local_c8;
  float local_c4;
  float local_bc;
  float local_b8;
  float local_b4;
  undefined4 local_ac;
  undefined4 local_a8;
  undefined4 local_a4;
  undefined4 local_9c;
  undefined4 local_98;
  undefined4 local_94;
  undefined4 local_8c;
  undefined1 local_88;
  undefined1 local_87;
  undefined1 local_70 [44];
  float local_44;
  byte local_39;
  
  local_f4 = 0;
  local_f0 = 0;
  if (_towlower == 0) {
    local_e0 = 0;
  }
  else {
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_f4,0,0,0,0,
               "/data/src/game/server/nextbot/nextbotlocomotioninterface.cpp",0x11b,
               &IsGap(Vector_const&,Vector_const&)::tm_fmt,"(%s)%s","NextBotSpiky",
               "Locomotion::IsGap");
    local_e0 = _towlower;
  }
  iVar5 = _DAT_0105db00;
  local_e8 = local_f4;
  local_e4 = local_f0;
  if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 00756b16 to 00756b76 has its CatchHandler @ 00756ba7 */
    iVar9 = ThreadGetCurrentId();
    if (iVar5 == iVar9) {
      if ((char *)*_DAT_0105d15c != "Locomotion::IsGap") {
        _DAT_0105d15c =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xca956c,(char *)0x0,0xbfa1cb);
      }
      puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
      *puVar1 = *puVar1 | 4;
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
  }
                    /* try { // try from 00756887 to 00756a50 has its CatchHandler @ 00756bbf */
  piVar7 = (int *)(**(code **)(*(int *)param_1 + 0xb0))(param_1);
  piVar7 = (int *)(**(code **)(*piVar7 + 0xc4))(piVar7);
  if (piVar7 == (int *)0x0) {
    local_110 = 0x201400b;
  }
  else {
    local_110 = (**(code **)(*piVar7 + 0x130))(piVar7);
  }
  piVar7 = (int *)(**(code **)(*(int *)param_1 + 0xb0))(param_1);
  pIVar8 = (IHandleEntity *)(**(code **)(*piVar7 + 0xb4))(piVar7);
  CTraceFilterSimple::CTraceFilterSimple
            ((CTraceFilterSimple *)local_dc,pIVar8,0,IgnoreActorsTraceFilterFunction);
  local_dc[0] = &PTR_ShouldHitEntity_00c23430;
  lVar11 = (longdouble)(**(code **)(*(int *)param_1 + 0x134))(param_1);
  fVar2 = *(float *)(param_2 + 8);
  fVar3 = *(float *)param_2;
  fVar4 = *(float *)(param_2 + 4);
  lVar12 = (longdouble)(**(code **)(*(int *)param_1 + 0x130))(param_1);
  local_cc = *(float *)param_2;
  local_c8 = *(float *)(param_2 + 4);
  local_88 = 0;
  local_8c = 0;
  local_bc = fVar3 - local_cc;
  local_9c = 0x3f800000;
  local_98 = 0x3f800000;
  local_b8 = fVar4 - local_c8;
  local_a4 = 0xbf000000;
  local_b4 = (fVar2 - (float)lVar11) - ((float)lVar12 + *(float *)(param_2 + 8));
  local_ac = 0;
  local_a8 = 0;
  local_87 = local_b8 * local_b8 + local_bc * local_bc + local_b4 * local_b4 != 0.0;
  local_c4 = (float)lVar12 + *(float *)(param_2 + 8) + 0.5;
  local_94 = 0x3f000000;
  (**(code **)(*enginetrace + 0x14))
            (enginetrace,&local_cc,local_110,(CTraceFilterSimple *)local_dc,local_70);
  iVar5 = _DAT_0105db00;
  bVar10 = 0;
  if (1.0 <= local_44) {
    bVar10 = local_39 ^ 1;
  }
  if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
    iVar9 = ThreadGetCurrentId();
    if (iVar5 == iVar9) {
      cVar6 = CVProfNode::ExitScope();
      if (cVar6 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
  }
  if (local_e0 != 0) {
    (**(code **)(local_e0 + 0x54))(local_e0,local_e8,local_e4,0,0,0);
  }
  return bVar10;
}

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)