L L4D2node

WitchAttack::SetVictim

0x00a3c9a0 · 135 bytes · __thiscall

_ZN11WitchAttack9SetVictimEP11CBaseEntity

Decompiled

undefined (2 params)

/* WitchAttack::SetVictim(CBaseEntity*) */

void __thiscall WitchAttack::SetVictim(WitchAttack *this,CBaseEntity *param_1)

{
  char cVar1;
  undefined4 *puVar2;
  int iVar3;
  CBaseEntity *pCVar4;
  
  if (param_1 == (CBaseEntity *)0x0) {
    *(undefined4 *)(this + 0x34) = 0xffffffff;
    *(undefined4 *)(this + 0x38) = 8;
    return;
  }
  puVar2 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
  *(undefined4 *)(this + 0x34) = *puVar2;
  cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
  if (cVar1 != '\0') {
    iVar3 = CBaseEntity::GetTeamNumber(param_1);
    cVar1 = IsASurvivorTeam(iVar3);
    if (cVar1 != '\0') {
      cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
      pCVar4 = (CBaseEntity *)0x0;
      if (cVar1 != '\0') {
        pCVar4 = param_1;
      }
      *(undefined4 *)(this + 0x38) = *(undefined4 *)(pCVar4 + 0x2ba0);
      return;
    }
  }
  *(undefined4 *)(this + 0x38) = 8;
  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)