L L4D2node

InfectedDying::OnStart

0x00a32bb0 · 585 bytes · __thiscall

_ZN13InfectedDying7OnStartEP8InfectedP6ActionIS0_E

Decompiled

undefined (3 params)

/* InfectedDying::OnStart(Infected*, Action<Infected>*) */

InfectedDying * __thiscall
InfectedDying::OnStart(InfectedDying *this,Infected *param_1,Action *param_2)

{
  Action AVar1;
  char cVar2;
  char *pcVar3;
  Action *local_34;
  undefined4 local_30;
  undefined4 local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  cVar2 = INextBot::IsDebugging((INextBot *)(param_2 + 0x1a3c),0xffff);
  if (cVar2 == '\0') {
    AVar1 = param_2[0x104];
  }
  else {
    local_28 = *(float *)(param_1 + 0x40);
    local_24 = *(float *)(param_1 + 0x44);
    local_20 = *(float *)(param_1 + 0x48);
    NDebugOverlay::Cross3D((Vector *)&local_28,2.0,0xff,0,0,true,10.0);
    local_34 = *(Action **)(param_1 + 0x40);
    local_30 = *(undefined4 *)(param_1 + 0x44);
    local_24 = *(float *)(param_1 + 0x38) * 0.002 + *(float *)(param_1 + 0x44);
    local_2c = *(undefined4 *)(param_1 + 0x48);
    local_20 = *(float *)(param_1 + 0x3c) * 0.002 + *(float *)(param_1 + 0x48);
    local_28 = *(float *)(param_1 + 0x34) * 0.002 + *(float *)(param_1 + 0x40);
    NDebugOverlay::HorzArrow((Vector *)&local_34,(Vector *)&local_28,2.0,0xff,0xff,0,0xff,true,10.0)
    ;
    AVar1 = param_2[0x104];
  }
  if (AVar1 == (Action)0x0) {
    (**(code **)(*(int *)param_2 + 0x130))(param_2,param_1 + 0x34);
  }
  local_34 = param_2;
  local_30 = 0;
  ForEachPlayer<ZombieDeath>((ZombieDeath *)&local_34);
  CBaseAnimatingOverlay::RemoveAllGestures((CBaseAnimatingOverlay *)param_2);
  cVar2 = TryToStartDeathThroes((InfectedDying *)param_1,(Infected *)param_2);
  pcVar3 = "Zombie.Die";
  if (cVar2 == '\0') {
    if (*(int *)(param_2 + 0x1838) == 1) {
      Infected::SetDamagedBodyGroupVariant((Infected *)param_2,"Head","Head");
      Infected::SetDamagedBodyGroupVariant((Infected *)param_2,"UpperBody","Head");
      pcVar3 = "Zombie.HeadlessCough";
    }
    local_28 = *(float *)(param_1 + 0x34);
    local_24 = *(float *)(param_1 + 0x38);
    local_20 = *(float *)(param_1 + 0x3c);
    (**(code **)(*(int *)param_2 + 0x4dc))(param_2,param_1 + 0x34,&local_28);
  }
  CBaseEntity::EmitSound((CBaseEntity *)param_2,pcVar3,0.0,(float *)0x0);
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  return this;
}

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)