L L4D2node

UTIL_TraceLineFilterEntity

0x00580880 · 350 bytes · __cdecl

_Z26UTIL_TraceLineFilterEntityP11CBaseEntityRK6VectorS3_jiP10CGameTrace

Decompiled

undefined (6 params)

/* UTIL_TraceLineFilterEntity(CBaseEntity*, Vector const&, Vector const&, unsigned int, int,
   CGameTrace*) */

void UTIL_TraceLineFilterEntity
               (CBaseEntity *param_1,Vector *param_2,Vector *param_3,uint param_4,int param_5,
               CGameTrace *param_6)

{
  undefined **local_88;
  CBaseEntity *local_84;
  int local_80;
  undefined4 local_7c;
  undefined4 local_78;
  CBaseEntity *local_74;
  undefined1 local_70;
  float local_6c;
  float local_68;
  float local_64;
  float local_5c;
  float local_58;
  float local_54;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_2c;
  undefined1 local_28;
  undefined1 local_27;
  
  local_7c = 0;
  local_88 = &PTR_ShouldHitEntity_00c54620;
  local_84 = param_1;
  local_80 = param_5;
  local_78 = CBaseEntity::GetRootMoveParent(param_1);
  local_74 = param_1;
  local_70 = (**(code **)(*g_EntityCollisionHash + 0x18))(g_EntityCollisionHash,param_1);
  local_6c = *(float *)param_2;
  local_2c = 0;
  local_68 = *(float *)(param_2 + 4);
  local_28 = 1;
  local_5c = *(float *)param_3 - local_6c;
  local_64 = *(float *)(param_2 + 8);
  local_58 = *(float *)(param_3 + 4) - local_68;
  local_54 = *(float *)(param_3 + 8) - local_64;
  local_34 = 0;
  local_38 = 0;
  local_3c = 0;
  local_27 = local_58 * local_58 + local_5c * local_5c + local_54 * local_54 != 0.0;
  local_44 = 0;
  local_48 = 0;
  local_4c = 0;
  (**(code **)(*enginetrace + 0x14))(enginetrace,&local_6c,param_4,&local_88,param_6);
  if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
    DebugDrawLine((Vector *)param_6,(Vector *)(param_6 + 0xc),0xff,0,0,true,-1.0);
  }
  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)