L L4D2node

CTraceFilterSkipTwoEntitiesAndTeammates::ShouldHitEntity

0x007c4620 · 138 bytes · __thiscall

_ZN39CTraceFilterSkipTwoEntitiesAndTeammates15ShouldHitEntityEP13IHandleEntityi

Decompiled

undefined (3 params)

/* CTraceFilterSkipTwoEntitiesAndTeammates::ShouldHitEntity(IHandleEntity*, int) */

undefined4 __thiscall
CTraceFilterSkipTwoEntitiesAndTeammates::ShouldHitEntity
          (CTraceFilterSkipTwoEntitiesAndTeammates *this,IHandleEntity *param_1,int param_2)

{
  int *piVar1;
  char cVar2;
  CBaseEntity *this_00;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  
  cVar2 = (**(code **)(*staticpropmgr + 8))(staticpropmgr,param_1);
  if ((cVar2 == '\0') && (param_1 != (IHandleEntity *)0x0)) {
    piVar1 = *(int **)(this + 4);
    cVar2 = (**(code **)(*staticpropmgr + 8))(staticpropmgr,piVar1);
    if (cVar2 == '\0') {
      this_00 = (CBaseEntity *)(**(code **)(*piVar1 + 0x18))(piVar1);
      if (this_00 != (CBaseEntity *)0x0) {
        iVar3 = CBaseEntity::GetTeamNumber(this_00);
        iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
        if (iVar3 != iVar4) {
          uVar5 = CTraceFilterSkipTwoEntities::ShouldHitEntity
                            ((CTraceFilterSkipTwoEntities *)this,param_1,param_2);
          return uVar5;
        }
      }
    }
  }
  return 0;
}

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)