L L4D2node

CBasePropDoor::TestCollision

0x007e6800 · 547 bytes · __thiscall

_ZN13CBasePropDoor13TestCollisionERK5Ray_tjR10CGameTrace

Decompiled

undefined (4 params)

/* CBasePropDoor::TestCollision(Ray_t const&, unsigned int, CGameTrace&) */

undefined4 __thiscall
CBasePropDoor::TestCollision(CBasePropDoor *this,Ray_t *param_1,uint param_2,CGameTrace *param_3)

{
  int *piVar1;
  code *pcVar2;
  int *piVar3;
  undefined2 uVar4;
  int iVar5;
  undefined4 uVar6;
  int *piVar7;
  CBasePropDoor *local_34;
  CBasePropDoor *local_30;
  undefined **local_24;
  int local_20;
  
  piVar3 = mdlcache;
  if (*(int *)(this + 0x238) == 0) {
    return 0;
  }
  (**(code **)(*mdlcache + 0x68))(mdlcache);
  piVar7 = *(int **)(this + 0x13e0);
  if (piVar7 == (int *)0x0) {
    iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar5 != 0) {
      CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
    }
    piVar7 = *(int **)(this + 0x13e0);
    if (piVar7 != (int *)0x0) goto LAB_007e6836;
  }
  else {
LAB_007e6836:
    if ((*piVar7 != 0) && ((*(uint *)(*piVar7 + 0x14c) & param_2) != 0)) {
      piVar1 = *(int **)(this + 0x238);
                    /* try { // try from 007e6870 to 007e6a3c has its CatchHandler @ 007e6a3f */
      iVar5 = (**(code **)(*piVar1 + 0x15c))(piVar1);
      if (iVar5 == 0) {
        pcVar2 = *(code **)(*physcollision + 0x84);
        if ((((byte)this[0x14d] & 8) != 0) &&
           (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
        }
        local_34 = this + 0x37c;
        uVar6 = (**(code **)(*piVar1 + 300))(piVar1);
        (*pcVar2)(physcollision,param_1,uVar6,this + 0x2e0,local_34,param_3);
      }
      else {
        local_24 = &PTR_GetPhysics2Actor_00cc2bc0;
        pcVar2 = *(code **)(*physcollision + 0xec);
        local_20 = iVar5;
        if ((((byte)this[0x14d] & 8) != 0) &&
           (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
        }
        local_30 = this + 0x37c;
        (*pcVar2)(physcollision,param_1,&local_24,this + 0x2e0,local_30,param_3);
      }
      if (((*(float *)(param_3 + 0x2c) <= 1.0 && *(float *)(param_3 + 0x2c) != 1.0) ||
          (param_3[0x36] != (CGameTrace)0x0)) || (param_3[0x37] != (CGameTrace)0x0)) {
        uVar6 = *(undefined4 *)(*piVar7 + 0x14c);
        *(undefined **)(param_3 + 0x3c) = &DAT_00c5994b;
        *(undefined2 *)(param_3 + 0x42) = 0;
        *(undefined4 *)(param_3 + 0x30) = uVar6;
        uVar4 = (**(code **)(**(int **)(this + 0x238) + 0x9c))(*(int **)(this + 0x238));
        uVar6 = 1;
        *(undefined2 *)(param_3 + 0x40) = uVar4;
        goto LAB_007e6849;
      }
    }
  }
  uVar6 = 0;
LAB_007e6849:
  (**(code **)(*piVar3 + 0x6c))(piVar3);
  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)