L L4D2node

IVision::IsLineOfSightClearToEntity

0x0075c3c0 · 652 bytes · __cdecl

_ZNK7IVision26IsLineOfSightClearToEntityEP11CBaseEntityP6Vector

Decompiled

undefined (2 params)

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

undefined4 IVision::IsLineOfSightClearToEntity(CBaseEntity *param_1,Vector *param_2)

{
  uint *puVar1;
  char cVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_18;
  undefined4 local_14;
  int local_10;
  
  if (IsLineOfSightClearToEntity(CBaseEntity*,Vector*)::_counter == '\0') {
    iVar5 = __cxa_guard_acquire(&IsLineOfSightClearToEntity(CBaseEntity*,Vector*)::_counter);
    if (iVar5 != 0) {
                    /* try { // try from 0075c62b to 0075c62f has its CatchHandler @ 0075c662 */
      IsLineOfSightClearToEntity(CBaseEntity*,Vector*)::_counter =
           (int *)CVProfile::FindOrCreateCounter
                            (&g_VProfCurrentProfile,"IVision::IsLineOfSightClearToEntity",0);
      __cxa_guard_release(&IsLineOfSightClearToEntity(CBaseEntity*,Vector*)::_counter);
      __cxa_atexit(CVProfCounter::~CVProfCounter,
                   &IsLineOfSightClearToEntity(CBaseEntity*,Vector*)::_counter,&__dso_handle);
    }
  }
  *IsLineOfSightClearToEntity(CBaseEntity*,Vector*)::_counter =
       *IsLineOfSightClearToEntity(CBaseEntity*,Vector*)::_counter + 1;
  local_24 = 0;
  local_20 = 0;
  if (_towlower == 0) {
    local_10 = 0;
  }
  else {
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_24,0,0,0,0,
               "/data/src/game/server/nextbot/nextbotvisioninterface.cpp",0x21d,
               &IsLineOfSightClearToEntity(CBaseEntity*,Vector*)::tm_fmt,"(%s)%s","NextBotSpiky",
               "IVision::IsLineOfSightClearToEntity");
    local_10 = _towlower;
  }
  iVar5 = _DAT_0105db00;
  local_18 = local_24;
  local_14 = local_20;
  if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 0075c57e to 0075c5de has its CatchHandler @ 0075c678 */
    iVar4 = ThreadGetCurrentId();
    if (iVar5 == iVar4) {
      if ((char *)*_DAT_0105d15c != "IVision::IsLineOfSightClearToEntity") {
        _DAT_0105d15c =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcaa21c,(char *)0x0,0xbfa1cb);
      }
      puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
      *puVar1 = *puVar1 | 4;
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
  }
                    /* try { // try from 0075c493 to 0075c4e0 has its CatchHandler @ 0075c68d */
  uVar3 = (**(code **)(**(int **)(param_1 + 0x14) + 0x134))(*(int **)(param_1 + 0x14));
  uVar3 = IsLineOfSightBetweenTwoEntitiesClear
                    (uVar3,1,param_2,0,param_2,0,0x2006041,VisionTraceFilterFunction,0x3f800000,0);
  iVar5 = _DAT_0105db00;
  if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
    iVar4 = ThreadGetCurrentId();
    if (iVar5 == iVar4) {
      cVar2 = CVProfNode::ExitScope();
      if (cVar2 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
  }
  if (local_10 != 0) {
    (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
  }
  return uVar3;
}

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)