L L4D2node

IVision::IsAbleToSee

0x0075c0f0 · 649 bytes · __thiscall

_ZNK7IVision11IsAbleToSeeERK6VectorNS_20FieldOfViewCheckTypeE

Decompiled

undefined (3 params)

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

undefined4 __thiscall IVision::IsAbleToSee(IVision *this,undefined4 param_1,int param_3)

{
  uint *puVar1;
  int iVar2;
  code *pcVar3;
  char cVar4;
  int *piVar5;
  int iVar6;
  undefined4 uVar7;
  longdouble lVar8;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (_towlower == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_34,0,0,0,0,
               "/data/src/game/server/nextbot/nextbotvisioninterface.cpp",0x1b5,
               &IsAbleToSee(Vector_const&,IVision::FieldOfViewCheckType)::tm_fmt,"(%s)%s",
               "NextBotExpensive","IVision::IsAbleToSee");
    local_20 = _towlower;
  }
  iVar2 = _DAT_0105db00;
  local_28 = local_34;
  local_24 = local_30;
                    /* try { // try from 0075c296 to 0075c2f6 has its CatchHandler @ 0075c3bc */
  if (((_DAT_0105d154 == 0) && (DAT_0105d158 != '\0')) ||
     (iVar6 = ThreadGetCurrentId(), iVar2 != iVar6)) {
    iVar2 = *(int *)(this + 0x14);
  }
  else {
    if ((char *)*_DAT_0105d15c != "IVision::IsAbleToSee") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcaa168,(char *)0x0,0xca957e);
    }
    puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
    *puVar1 = *puVar1 | 4;
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
    iVar2 = *(int *)(this + 0x14);
  }
  if (iVar2 == 0) {
    uVar7 = 1;
  }
  else {
                    /* try { // try from 0075c1b4 to 0075c1e8 has its CatchHandler @ 0075c39b */
    piVar5 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
    pcVar3 = *(code **)(*piVar5 + 0x120);
    lVar8 = (longdouble)(**(code **)(*(int *)this + 200))(this);
    cVar4 = (*pcVar3)(piVar5,param_1,(float)lVar8);
    if (cVar4 == '\0') {
                    /* try { // try from 0075c31d to 0075c391 has its CatchHandler @ 0075c39b */
      piVar5 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
      piVar5 = (int *)(**(code **)(*piVar5 + 0xb4))(piVar5);
      cVar4 = (**(code **)(*piVar5 + 0x400))(piVar5,param_1);
      if ((cVar4 == '\0') &&
         ((param_3 != 0 || (cVar4 = (**(code **)(*(int *)this + 0xe0))(this,param_1), cVar4 != '\0')
          ))) {
        uVar7 = (**(code **)(*(int *)this + 0xf4))(this,param_1);
        goto LAB_0075c1f3;
      }
    }
    uVar7 = 0;
  }
LAB_0075c1f3:
  iVar2 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar6 = ThreadGetCurrentId(), iVar2 == iVar6)) {
    cVar4 = CVProfNode::ExitScope();
    if (cVar4 != '\0') {
      _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
    }
    DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
  }
  return uVar7;
}

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)