L L4D2node

WitchWander::OnInjured

0x00a44150 · 181 bytes · __cdecl

_ZN11WitchWander9OnInjuredEP8InfectedRK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* WitchWander::OnInjured(Infected*, CTakeDamageInfo const&) */

Infected * WitchWander::OnInjured(Infected *param_1,CTakeDamageInfo *param_2)

{
  uint uVar1;
  CBaseEntity *this;
  char cVar2;
  int iVar3;
  undefined4 *puVar4;
  undefined *puVar5;
  int in_stack_00000010;
  
  uVar1 = *(uint *)(in_stack_00000010 + 0x34);
  if ((((uVar1 != 0xffffffff) &&
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
     (this = *(CBaseEntity **)(puVar5 + 4), this != (CBaseEntity *)0x0)) {
    cVar2 = (**(code **)(*(int *)this + 0x16c))(this);
    if (cVar2 != '\0') {
      iVar3 = CBaseEntity::GetTeamNumber(this);
      cVar2 = IsASurvivorTeam(iVar3);
      if (cVar2 != '\0') {
        cVar2 = IsInCommentaryMode();
        if (cVar2 == '\0') {
          cVar2 = (**(code **)(*(int *)this + 0x778))(this);
          if (cVar2 == '\0') {
            puVar4 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
            *(undefined4 *)(param_2 + 0x4850) = *puVar4;
          }
        }
      }
    }
  }
  *(undefined4 *)param_1 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  *(undefined4 *)(param_1 + 0xc) = 1;
  return param_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)