L L4D2node

CDispCollTree::AABBTree_Ray

0x000cc1f0 · 584 bytes · __thiscall

_ZN13CDispCollTree12AABBTree_RayERK5Ray_tRK6VectorP10CBaseTraceb

Decompiled

undefined (5 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CDispCollTree::AABBTree_Ray(Ray_t const&, Vector const&, CBaseTrace*, bool) */

undefined4 __thiscall
CDispCollTree::AABBTree_Ray
          (CDispCollTree *this,Ray_t *param_1,Vector *param_2,CBaseTrace *param_3,bool param_4)

{
  int iVar1;
  char cVar2;
  int iVar3;
  undefined4 uVar4;
  CDispCollTri *local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (_exit == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(_exit + 0x50))
              (_exit,&local_34,0,0,0,0,"/data/src/engine/../public/dispcoll_common.cpp",0x28b,
               &AABBTree_Ray(Ray_t_const&,Vector_const&,CBaseTrace*,bool)::tm_fmt,"(%s)%s",
               "Unaccounted","AABBTree_Ray");
    local_20 = _exit;
  }
  iVar1 = _DAT_0040b9d4;
  local_28 = local_34;
  local_24 = local_30;
  if ((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) {
                    /* try { // try from 000cc2a5 to 000cc2a9 has its CatchHandler @ 000cc46f */
    iVar3 = ThreadGetCurrentId();
    if (iVar1 == iVar3) {
      if ((char *)*_DAT_0040b030 != "AABBTree_Ray") {
                    /* try { // try from 000cc430 to 000cc441 has its CatchHandler @ 000cc46f */
        _DAT_0040b030 =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2a28cc,&DAT_00000001,0x2a054b);
      }
      CVProfNode::EnterScope();
      DAT_0040b02c = '\0';
    }
  }
  if ((((byte)this[0x2c] & 8) == 0) && ((*(uint *)(this + 0x20) & 0x4081) != 0)) {
    local_38 = (CDispCollTri *)0x0;
                    /* try { // try from 000cc397 to 000cc39b has its CatchHandler @ 000cc44e */
    AABBTree_TreeTrisRayTest(this,param_1,param_2,0,param_3,param_4,&local_38);
    if (local_38 != (CDispCollTri *)0x0) {
      uVar4 = 1;
      *(undefined4 *)(param_3 + 0x18) = *(undefined4 *)(local_38 + 8);
      *(undefined4 *)(param_3 + 0x1c) = *(undefined4 *)(local_38 + 0xc);
      *(undefined4 *)(param_3 + 0x20) = *(undefined4 *)(local_38 + 0x10);
      *(undefined4 *)(param_3 + 0x24) = *(undefined4 *)(local_38 + 0x14);
      *(ushort *)(param_3 + 0x34) = *(ushort *)(local_38 + 6) >> 6 & 0x1f;
      goto LAB_000cc2c7;
    }
  }
  uVar4 = 0;
LAB_000cc2c7:
  iVar1 = _DAT_0040b9d4;
  if ((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) {
    iVar3 = ThreadGetCurrentId();
    if (iVar1 == iVar3) {
      cVar2 = CVProfNode::ExitScope();
      if (cVar2 != '\0') {
        _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
      }
      DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
    }
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
  }
  return uVar4;
}

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)