L L4D2node

Infected::RememberLastHitGroup

0x00a0e530 · 157 bytes · __thiscall

_ZN8Infected20RememberLastHitGroupEPK10CGameTrace

Decompiled

undefined (2 params)

/* Infected::RememberLastHitGroup(CGameTrace const*) */

void __thiscall Infected::RememberLastHitGroup(Infected *this,CGameTrace *param_1)

{
  short sVar1;
  CBaseEdict *this_00;
  int iVar2;
  int iVar3;
  
  iVar2 = gpGlobals;
  iVar3 = *(int *)(param_1 + 0x44);
  if (*(int *)(gpGlobals + 4) == *(int *)(this + 0x1cf0)) {
    switch(*(undefined4 *)(this + 0x1838)) {
    case 1:
      goto switchD_00a0e5bf_caseD_1;
    case 4:
    case 5:
switchD_00a0e5bf_caseD_4:
      if (iVar3 != 1) {
        return;
      }
      break;
    case 6:
    case 7:
      if (1 < iVar3 - 4U) goto switchD_00a0e5bf_caseD_4;
    }
  }
  *(int *)(this + 0x1838) = iVar3;
  *(undefined4 *)(this + 0x1cf0) = *(undefined4 *)(iVar2 + 4);
  sVar1 = *(short *)(param_1 + 0x48);
  if ((int)sVar1 != *(int *)(this + 0x448)) {
    if (this[0x6c] == (Infected)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (Infected)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0x448) = (int)sVar1;
  }
switchD_00a0e5bf_caseD_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)