L L4D2node

CBaseTrigger::PassesTriggerFilters

0x00b13a70 · 491 bytes · __thiscall

_ZN12CBaseTrigger20PassesTriggerFiltersEP11CBaseEntity

Decompiled

undefined (2 params)

/* CBaseTrigger::PassesTriggerFilters(CBaseEntity*) */

undefined4 __thiscall CBaseTrigger::PassesTriggerFilters(CBaseTrigger *this,CBaseEntity *param_1)

{
  byte bVar1;
  char cVar2;
  uint uVar3;
  int *piVar4;
  undefined4 uVar5;
  undefined *puVar6;
  
  uVar3 = *(uint *)(this + 0x148);
  if ((uVar3 & 0x40) == 0) {
    if (((uVar3 & 1) == 0) || ((*(uint *)(param_1 + 0x150) & 0x80) == 0)) {
      if (((uVar3 & 2) == 0) || (((byte)param_1[0x151] & 0x20) == 0)) {
        if ((uVar3 & 4) != 0) {
          if ((*(char **)(param_1 + 0x7c) == "func_pushable") ||
             (cVar2 = CBaseEntity::ClassMatchesComplex(param_1,"func_pushable"), cVar2 != '\0'))
          goto LAB_00b13b58;
          uVar3 = *(uint *)(this + 0x148);
        }
        if ((uVar3 & 8) == 0) {
          return 0;
        }
        if (param_1[0x186] != (CBaseEntity)0x6) {
          return 0;
        }
        goto LAB_00b13b58;
      }
    }
    else if ((*(uint *)(param_1 + 0x150) & 0x2000) == 0) goto LAB_00b13ab0;
LAB_00b13b67:
    piVar4 = (int *)CBaseEntity::MyNPCPointer();
    if ((*(uint *)(this + 0x148) & 0x10) == 0) {
      if ((*(uint *)(this + 0x148) & 0x800) != 0) {
        if (piVar4 == (int *)0x0) {
          return 0;
        }
        goto LAB_00b13bed;
      }
    }
    else {
      if (piVar4 == (int *)0x0) {
        return 0;
      }
      cVar2 = (**(code **)(*piVar4 + 0x6e8))(piVar4,0);
      if (cVar2 == '\0') {
        return 0;
      }
      if (((byte)this[0x149] & 8) != 0) {
LAB_00b13bed:
        cVar2 = (**(code **)(*piVar4 + 0x4fc))(piVar4);
        if (cVar2 == '\0') {
          return 0;
        }
      }
    }
  }
  else {
LAB_00b13b58:
    if ((*(uint *)(param_1 + 0x150) & 0x2000) != 0) goto LAB_00b13b67;
  }
LAB_00b13ab0:
  bVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
  if ((*(uint *)(this + 0x148) & 0x20) == 0) {
    if ((*(uint *)(this + 0x148) & 0x200) == 0) goto LAB_00b13ad2;
  }
  else {
    if (bVar1 == 0) goto LAB_00b13ad2;
    cVar2 = (**(code **)(*(int *)param_1 + 0x4fc))(param_1);
    if (cVar2 == '\0') {
      return 0;
    }
    piVar4 = (int *)(**(code **)(*(int *)param_1 + 0x500))(param_1);
    if (piVar4 == (int *)0x0) {
      return 0;
    }
    cVar2 = (**(code **)(*piVar4 + 0x3c))(piVar4);
    if (cVar2 != '\0') {
      return 0;
    }
    bVar1 = (byte)this[0x149] & 2;
  }
  if ((bVar1 != 0) && (cVar2 = (**(code **)(*(int *)param_1 + 0x4fc))(param_1), cVar2 != '\0')) {
    return 0;
  }
LAB_00b13ad2:
  uVar3 = *(uint *)(this + 0x4c0);
  if ((((uVar3 != 0xffffffff) &&
       (puVar6 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar6 + 8) == uVar3 >> 0xc)) &&
     (*(CBaseFilter **)(puVar6 + 4) != (CBaseFilter *)0x0)) {
    uVar5 = CBaseFilter::PassesFilter(*(CBaseFilter **)(puVar6 + 4),(CBaseEntity *)this,param_1);
    return uVar5;
  }
  return 1;
}

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)