L L4D2node

CBreakable::TraceAttack

0x006b1cf0 · 251 bytes · __thiscall

_ZN10CBreakable11TraceAttackERK15CTakeDamageInfoRK6VectorP10CGameTrace

Decompiled

undefined (4 params)

/* CBreakable::TraceAttack(CTakeDamageInfo const&, Vector const&, CGameTrace*) */

void __thiscall
CBreakable::TraceAttack
          (CBreakable *this,CTakeDamageInfo *param_1,Vector *param_2,CGameTrace *param_3)

{
  int iVar1;
  uint local_28;
  uint local_24;
  uint local_20;
  
  iVar1 = (**(code **)(*random_valve + 8))(random_valve,0,1);
  if (iVar1 != 0) {
    if (*(int *)(this + 0x44c) == 6) {
      (**(code **)(*(int *)g_pEffects + 0x10))(g_pEffects,param_3 + 0xc,1,1,0);
      CBaseEntity::EmitSound((CBaseEntity *)this,"Breakable.Computer",0.0,(float *)0x0);
    }
    else if (*(int *)(this + 0x44c) == 7) {
      local_28 = *(uint *)param_2 ^ 0x80000000;
      local_24 = *(uint *)(param_2 + 4) ^ 0x80000000;
      local_20 = *(uint *)(param_2 + 8) ^ 0x80000000;
      (**(code **)(*(int *)g_pEffects + 0x24))(g_pEffects,param_3 + 0xc,&local_28);
    }
  }
  CBaseEntity::TraceAttack((CBaseEntity *)this,param_1,param_2,param_3);
  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)