L L4D2node

HulkSmashableEnumerator::TrackHit

0x00562c30 · 277 bytes · __thiscall

_ZN23HulkSmashableEnumerator8TrackHitEP11CBaseEntity

Decompiled

undefined (2 params)

/* HulkSmashableEnumerator::TrackHit(CBaseEntity*) */

void __thiscall
HulkSmashableEnumerator::TrackHit(HulkSmashableEnumerator *this,CBaseEntity *param_1)

{
  int iVar1;
  float *pfVar2;
  int iVar3;
  float fVar4;
  undefined1 local_3c [12];
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  float local_1c;
  float local_18;
  float local_14;
  float local_10;
  
  (**(code **)(**(int **)(this + 4) + 0x234))(local_3c,*(int **)(this + 4));
  AngleVectors((QAngle *)(this + 0x10),(Vector *)&local_30);
  (**(code **)(**(int **)(this + 4) + 0x234))(&local_18,*(int **)(this + 4));
  pfVar2 = (float *)(**(code **)(*(int *)param_1 + 0x288))(param_1);
  local_20 = pfVar2[1] - local_14;
  local_1c = pfVar2[2] - local_10;
  local_24 = *pfVar2 - local_18;
  VectorNormalize((Vector *)&local_24);
  fVar4 = local_2c * local_20 + local_30 * local_24 + local_28 * local_1c;
  if (*(float *)(this + 0xc) <= fVar4 && fVar4 != *(float *)(this + 0xc)) {
    *(float *)(this + 0xc) = fVar4;
    *(CBaseEntity **)(this + 8) = param_1;
  }
  iVar1 = *(int *)(this + 0x28);
  if (0 < iVar1) {
    if ((CBaseEntity *)**(int **)(this + 0x1c) == param_1) {
      return;
    }
    iVar3 = 0;
    do {
      iVar3 = iVar3 + 1;
      if (iVar3 == iVar1) goto LAB_00562d1c;
    } while ((CBaseEntity *)(*(int **)(this + 0x1c))[iVar3] != param_1);
    if (iVar3 != -1) {
      return;
    }
  }
LAB_00562d1c:
  CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>>::InsertBefore
            ((CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>> *)(this + 0x1c),iVar1,&param_1);
  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)