L L4D2node

CTerrorGameRules::WeaponTraceEntity

0x00503870 · 408 bytes · __thiscall

_ZN16CTerrorGameRules17WeaponTraceEntityEP11CBaseEntityRK6VectorS4_jP10CGameTrace

Decompiled

undefined (6 params)

/* CTerrorGameRules::WeaponTraceEntity(CBaseEntity*, Vector const&, Vector const&, unsigned int,
   CGameTrace*) */

longdouble __thiscall
CTerrorGameRules::WeaponTraceEntity
          (CTerrorGameRules *this,CBaseEntity *param_1,Vector *param_2,Vector *param_3,uint param_4,
          CGameTrace *param_5)

{
  int iVar1;
  uint uVar2;
  undefined **local_34 [4];
  bool local_24;
  undefined4 local_20;
  
  uVar2 = (**(code **)(*(int *)param_1 + 0x228))(param_1);
  if ((uVar2 & 8) == 0) {
    uVar2 = (**(code **)(*(int *)param_1 + 0x228))(param_1);
    if ((uVar2 & 0x40) == 0) {
      uVar2 = (**(code **)(*(int *)param_1 + 0x228))(param_1);
      if ((uVar2 & 0x10000000) == 0) {
        uVar2 = (**(code **)(*(int *)param_1 + 0x228))(param_1);
        if ((uVar2 & 0x400) == 0) {
          UTIL_TraceEntity(param_1,param_2,param_3,param_4,param_5);
          return (longdouble)1;
        }
        CTraceFilterSimple::CTraceFilterSimple
                  ((CTraceFilterSimple *)local_34,(IHandleEntity *)param_1,*(int *)(param_1 + 0x234)
                   ,(_func_bool_IHandleEntity_ptr_int *)0x0);
        local_20 = 3;
      }
      else {
        CTraceFilterSimple::CTraceFilterSimple
                  ((CTraceFilterSimple *)local_34,(IHandleEntity *)param_1,*(int *)(param_1 + 0x234)
                   ,(_func_bool_IHandleEntity_ptr_int *)0x0);
        local_20 = 2;
      }
    }
    else {
      CTraceFilterSimple::CTraceFilterSimple
                ((CTraceFilterSimple *)local_34,(IHandleEntity *)param_1,*(int *)(param_1 + 0x234),
                 (_func_bool_IHandleEntity_ptr_int *)0x0);
      local_20 = 0xffffffff;
    }
    local_24 = false;
  }
  else {
    iVar1 = *(int *)(ZombieTanksBlockMolotovs._28_4_ + 0x30);
    CTraceFilterSimple::CTraceFilterSimple
              ((CTraceFilterSimple *)local_34,(IHandleEntity *)param_1,*(int *)(param_1 + 0x234),
               (_func_bool_IHandleEntity_ptr_int *)0x0);
    local_20 = 0xffffffff;
    local_24 = iVar1 != 0;
  }
  local_34[0] = &PTR_ShouldHitEntity_00c2afc8;
  UTIL_TraceEntity(param_1,param_2,param_3,param_4,(ITraceFilter *)local_34,param_5);
  return (longdouble)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)