L L4D2node

CBaseEntity::GetPhysicsCollisionRulesCache

0x00410450 · 250 bytes · __thiscall

_ZN11CBaseEntity29GetPhysicsCollisionRulesCacheER28PhysicsCollisionRulesCache_t

Decompiled

undefined (2 params)

/* CBaseEntity::GetPhysicsCollisionRulesCache(PhysicsCollisionRulesCache_t&) */

void __thiscall
CBaseEntity::GetPhysicsCollisionRulesCache(CBaseEntity *this,PhysicsCollisionRulesCache_t *param_1)

{
  CBaseEntity CVar1;
  uint uVar2;
  char cVar3;
  undefined4 uVar4;
  int *piVar5;
  int iVar6;
  undefined *puVar7;
  byte local_20;
  
  CVar1 = this[0x186];
  uVar4 = (**(code **)(*(int *)this + 0x1c))(this);
  *(undefined4 *)param_1 = uVar4;
  uVar4 = (**(code **)(*(int *)this + 0x2c8))(this);
  puVar7 = g_pEntityList;
  *(undefined4 *)(param_1 + 4) = uVar4;
  *(short *)(param_1 + 8) = (short)*(undefined4 *)(this + 0x234);
  uVar2 = *(uint *)(this + 0x188);
  if ((((uVar2 == 0xffffffff) ||
       (puVar7 = puVar7 + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)) {
    if (CVar1 != (CBaseEntity)0x7) goto LAB_004104be;
  }
  else {
    local_20 = 1;
    if (CVar1 != (CBaseEntity)0x6) goto LAB_004104e5;
    local_20 = 1;
    iVar6 = GetRootMoveParent(this);
    if (*(char *)(iVar6 + 0x186) != '\x06') goto LAB_004104e5;
LAB_004104be:
    piVar5 = *(int **)(this + 0x238);
    if (((piVar5 == (int *)0x0) ||
        (piVar5 = (int *)(**(code **)(*piVar5 + 0x120))(piVar5), piVar5 == (int *)0x0)) ||
       ((CVar1 != (CBaseEntity)0xb &&
        (((CVar1 != (CBaseEntity)0x6 ||
          (cVar3 = (**(code **)(*piVar5 + 0x18))(piVar5), cVar3 != '\0')) ||
         (cVar3 = (**(code **)(*piVar5 + 0x1c))(piVar5), cVar3 != '\0')))))) {
      local_20 = 0;
      goto LAB_004104e5;
    }
  }
  local_20 = 1;
LAB_004104e5:
  param_1[10] = (PhysicsCollisionRulesCache_t)((byte)param_1[10] & 0xfe | local_20);
  return;
}

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)