L L4D2node

InfectedStandDazed::OnAnimationActivityComplete

0x00a38980 · 788 bytes · __thiscall

_ZN18InfectedStandDazed27OnAnimationActivityCompleteEP8Infectedi

Decompiled

undefined (3 params)

/* InfectedStandDazed::OnAnimationActivityComplete(Infected*, int) */

InfectedStandDazed * __thiscall
InfectedStandDazed::OnAnimationActivityComplete
          (InfectedStandDazed *this,Infected *param_1,int param_2)

{
  char cVar1;
  undefined4 *puVar2;
  int iVar3;
  
  if (0 < *(int *)(ZombieStandStill._28_4_ + 0x30)) {
    puVar2 = ::operator_new(0x34);
    *(undefined4 *)this = 1;
    puVar2[8] = 0;
    puVar2[9] = 0;
    puVar2[10] = 0;
    puVar2[3] = 0;
    puVar2[4] = 0;
    puVar2[5] = 0;
    puVar2[6] = 0;
    puVar2[7] = 0;
    puVar2[2] = 0;
    *(undefined1 *)(puVar2 + 0xc) = 0;
    *(undefined1 *)((int)puVar2 + 0x31) = 0;
    puVar2[0xb] = 0;
    *puVar2 = &PTR__InfectedStandDazed_00d25148;
    puVar2[1] = &PTR__InfectedStandDazed_00d252ac;
    *(undefined4 **)(this + 4) = puVar2;
    *(undefined4 *)(this + 8) = 0;
    *(undefined4 *)(this + 0xc) = 1;
    return this;
  }
  if (((0 < *(int *)(ZombieMustWander._28_4_ + 0x30)) ||
      (*(char *)(*(int *)(TheDirector + 0x634) + 0x37) != '\0')) ||
     (cVar1 = IsTimeOfDayBetween(2,4), cVar1 != '\0')) {
LAB_00a389ab:
    puVar2 = ::operator_new(0x3c);
    puVar2[8] = 0;
    puVar2[9] = 0;
    puVar2[10] = 0;
    puVar2[3] = 0;
    puVar2[4] = 0;
    puVar2[5] = 0;
    puVar2[6] = 0;
    puVar2[7] = 0;
    puVar2[2] = 0;
    *(undefined1 *)(puVar2 + 0xc) = 0;
    *(undefined1 *)((int)puVar2 + 0x31) = 0;
    puVar2[0xb] = 0;
    *puVar2 = &PTR__InfectedStaggerAround_00d24da8;
    puVar2[1] = &PTR__InfectedStaggerAround_00d24f0c;
    *(undefined4 **)(this + 4) = puVar2;
    *(undefined4 *)this = 1;
    *(undefined4 *)(this + 8) = 0;
    *(undefined4 *)(this + 0xc) = 1;
    return this;
  }
  if (*(int *)(ZombieMustWander._28_4_ + 0x30) < 0) {
    iVar3 = RandomInt(0,10);
    if (iVar3 < 5) goto LAB_00a38c19;
    goto LAB_00a38b5e;
  }
  cVar1 = CanRelax((InfectedStandDazed *)param_1);
  if (cVar1 == '\0') goto LAB_00a389ab;
  iVar3 = RandomInt(0,100);
  cVar1 = Infected::IsOutside((Infected *)param_2);
  if (cVar1 == '\0') {
    if (iVar3 < 0xf) goto LAB_00a38c19;
    if (0x1d < iVar3) goto LAB_00a389ab;
  }
  else {
    if (iVar3 < 5) {
LAB_00a38c19:
      puVar2 = ::operator_new(0x40);
      puVar2[8] = 0;
      puVar2[9] = 0;
      puVar2[10] = 0;
      puVar2[3] = 0;
      puVar2[4] = 0;
      puVar2[5] = 0;
      puVar2[6] = 0;
      puVar2[7] = 0;
      puVar2[2] = 0;
      *(undefined1 *)(puVar2 + 0xc) = 0;
      *(undefined1 *)((int)puVar2 + 0x31) = 0;
      puVar2[0xb] = 0;
      *puVar2 = &PTR__InfectedLieDown_00d24368;
      puVar2[1] = &PTR__InfectedLieDown_00d244cc;
      goto LAB_00a38bbe;
    }
    if (9 < iVar3) goto LAB_00a389ab;
  }
LAB_00a38b5e:
  puVar2 = ::operator_new(0x40);
  puVar2[8] = 0;
  puVar2[9] = 0;
  puVar2[10] = 0;
  puVar2[3] = 0;
  puVar2[4] = 0;
  puVar2[5] = 0;
  puVar2[6] = 0;
  puVar2[7] = 0;
  puVar2[2] = 0;
  *(undefined1 *)(puVar2 + 0xc) = 0;
  *(undefined1 *)((int)puVar2 + 0x31) = 0;
  puVar2[0xb] = 0;
  *puVar2 = &PTR__InfectedSitDown_00d24848;
  puVar2[1] = &PTR__InfectedSitDown_00d249ac;
LAB_00a38bbe:
  puVar2[0xd] = &PTR_NetworkStateChanged_00c0b6e0;
  puVar2[0xe] = 0;
  puVar2[0xf] = 0xbf800000;
  *(undefined4 **)(this + 4) = puVar2;
  *(undefined4 *)this = 1;
  *(undefined4 *)(this + 8) = 0;
  *(undefined4 *)(this + 0xc) = 1;
  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)