L L4D2node

SurvivorIntention::Reset

0x0094da40 · 1091 bytes · __thiscall

_ZN17SurvivorIntention5ResetEv

Decompiled

undefined (1 param)

/* SurvivorIntention::Reset() */

void __thiscall SurvivorIntention::Reset(SurvivorIntention *this)

{
  int *piVar1;
  CBaseEntity *this_00;
  int iVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  SurvivorLegsStayClose *this_01;
  
  *(undefined4 *)(this + 0x70) = 0;
  *(undefined4 *)(this + 0x84) = 0;
  piVar1 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
  this_00 = (CBaseEntity *)(**(code **)(*piVar1 + 0xb4))(piVar1);
  piVar1 = *(int **)(this + 0x1c);
  *(CBaseEntity **)(this + 0x18) = this_00;
  if (piVar1 != (int *)0x0) {
    (**(code **)(*piVar1 + 4))(piVar1);
    this_00 = *(CBaseEntity **)(this + 0x18);
  }
  *(undefined4 *)(this + 0x1c) = 0;
  iVar2 = CBaseEntity::GetTeamNumber(this_00);
  if ((iVar2 == 4) && (*(int *)(sb_l4d1_survivor_behavior._28_4_ + 0x30) != 0)) {
    puVar3 = ::operator_new(0x40);
    puVar3[8] = 0;
    puVar3[9] = 0;
    puVar3[10] = 0;
    puVar3[3] = 0;
    puVar3[4] = 0;
    puVar3[5] = 0;
    puVar3[6] = 0;
    puVar3[7] = 0;
    puVar3[2] = 0;
    *(undefined1 *)(puVar3 + 0xc) = 0;
    *(undefined1 *)((int)puVar3 + 0x31) = 0;
    puVar3[0xb] = 0;
    *puVar3 = &PTR__L4D1SurvivorBehavior_00d03a68;
    puVar3[1] = &PTR__L4D1SurvivorBehavior_00d03bdc;
    puVar3[0xd] = &PTR_NetworkStateChanged_00c0b6e0;
    puVar3[0xe] = 0;
    puVar3[0xf] = 0xbf800000;
    puVar4 = ::operator_new(0x38);
    *puVar4 = &PTR__Behavior_00d00308;
    puVar4[1] = &PTR__Behavior_00d003d0;
                    /* try { // try from 0094dd2f to 0094dd33 has its CatchHandler @ 0094de88 */
    CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar4 + 3),"%s",&DAT_00d539c2);
    puVar4[2] = puVar3;
    *(undefined4 **)(this + 0x1c) = puVar4;
    this_01 = ::operator_new(0x483c);
    *(undefined4 *)(this_01 + 0x20) = 0;
    *(undefined4 *)(this_01 + 0x24) = 0;
    *(undefined4 *)(this_01 + 0x28) = 0;
    *(undefined4 *)(this_01 + 0xc) = 0;
    *(undefined4 *)(this_01 + 0x10) = 0;
    *(undefined4 *)(this_01 + 0x14) = 0;
    *(undefined4 *)(this_01 + 0x18) = 0;
    *(undefined4 *)(this_01 + 0x1c) = 0;
    *(undefined4 *)(this_01 + 8) = 0;
    this_01[0x30] = (SurvivorLegsStayClose)0x0;
    this_01[0x31] = (SurvivorLegsStayClose)0x0;
    *(undefined4 *)(this_01 + 0x2c) = 0;
    *(undefined ***)this_01 = &PTR__L4D1SurvivorLegsBattleStations_00d0a7a8;
    *(undefined ***)(this_01 + 4) = &PTR__L4D1SurvivorLegsBattleStations_00d0a910;
                    /* try { // try from 0094ddaa to 0094ddae has its CatchHandler @ 0094dec2 */
    PathFollower::PathFollower((PathFollower *)(this_01 + 0x34));
    *(undefined ***)(this_01 + 0x4818) = &PTR_NetworkStateChanged_00c0b6e0;
    *(undefined4 *)(this_01 + 0x481c) = 0;
    *(undefined4 *)(this_01 + 0x4820) = 0xbf800000;
    *(undefined ***)(this_01 + 0x4824) = &PTR_NetworkStateChanged_00c0b6e0;
    *(undefined4 *)(this_01 + 0x4828) = 0;
    *(undefined4 *)(this_01 + 0x482c) = 0xbf800000;
    *(undefined ***)(this_01 + 0x4830) = &PTR_NetworkStateChanged_00c0b6e0;
    *(undefined4 *)(this_01 + 0x4834) = 0;
    *(undefined4 *)(this_01 + 0x4838) = 0xbf800000;
    iVar2 = *(int *)(this + 0x60);
    while (-1 < iVar2) {
      piVar1 = *(int **)(this + iVar2 * 4 + 0x20);
      if (piVar1 != (int *)0x0) {
        (**(code **)(*piVar1 + 4))(piVar1);
        iVar2 = *(int *)(this + 0x60);
      }
      iVar2 = iVar2 + -1;
      *(int *)(this + 0x60) = iVar2;
    }
    *(undefined4 *)(this + 0x60) = 0;
    *(undefined4 *)(this + 0x20) = 0;
    puVar3 = ::operator_new(0x38);
    *puVar3 = &PTR__Behavior_00d00308;
    puVar3[1] = &PTR__Behavior_00d003d0;
                    /* try { // try from 0094de7e to 0094de82 has its CatchHandler @ 0094debd */
    CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar3 + 3),"%s",&DAT_00d539c2);
  }
  else {
    puVar3 = ::operator_new(0x80);
    puVar3[8] = 0;
    puVar3[9] = 0;
    puVar3[10] = 0;
    puVar3[3] = 0;
    puVar3[4] = 0;
    puVar3[5] = 0;
    puVar3[6] = 0;
    puVar3[7] = 0;
    puVar3[2] = 0;
    *(undefined1 *)(puVar3 + 0xc) = 0;
    *(undefined1 *)((int)puVar3 + 0x31) = 0;
    puVar3[0xb] = 0;
    *puVar3 = &PTR__SurvivorBehavior_00d045c8;
    puVar3[1] = &PTR__SurvivorBehavior_00d0473c;
    puVar3[0xd] = &PTR_NetworkStateChanged_00c0b6e0;
    puVar3[0xe] = 0;
    puVar3[0xf] = 0xbf800000;
    puVar3[0x10] = &PTR_NetworkStateChanged_00c0b6e0;
    puVar3[0x11] = 0;
    puVar3[0x12] = 0xbf800000;
    puVar3[0x13] = &PTR_NetworkStateChanged_00c0b6e0;
    puVar3[0x14] = 0;
    puVar3[0x15] = 0xbf800000;
    puVar3[0x18] = &PTR_NetworkStateChanged_00c0b6e0;
    puVar3[0x19] = 0;
    puVar3[0x1a] = 0xbf800000;
    puVar3[0x1c] = 0xffffffff;
    puVar3[0x1d] = &PTR_NetworkStateChanged_00c0b6e0;
    puVar3[0x1e] = 0;
    puVar3[0x1f] = 0xbf800000;
    puVar4 = ::operator_new(0x38);
    *puVar4 = &PTR__Behavior_00d00308;
    puVar4[1] = &PTR__Behavior_00d003d0;
                    /* try { // try from 0094dbaa to 0094dbae has its CatchHandler @ 0094debb */
    CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar4 + 3),"%s",&DAT_00d539c2);
    puVar4[2] = puVar3;
    *(undefined4 **)(this + 0x1c) = puVar4;
    this_01 = ::operator_new(0x48);
                    /* try { // try from 0094dbc6 to 0094dbca has its CatchHandler @ 0094dea9 */
    SurvivorLegsStayClose::SurvivorLegsStayClose(this_01);
    iVar2 = *(int *)(this + 0x60);
    while (-1 < iVar2) {
      piVar1 = *(int **)(this + iVar2 * 4 + 0x20);
      if (piVar1 != (int *)0x0) {
        (**(code **)(*piVar1 + 4))(piVar1);
        iVar2 = *(int *)(this + 0x60);
      }
      iVar2 = iVar2 + -1;
      *(int *)(this + 0x60) = iVar2;
    }
    *(undefined4 *)(this + 0x60) = 0;
    *(undefined4 *)(this + 0x20) = 0;
    puVar3 = ::operator_new(0x38);
    *puVar3 = &PTR__Behavior_00d00308;
    puVar3[1] = &PTR__Behavior_00d003d0;
                    /* try { // try from 0094dc3e to 0094dc42 has its CatchHandler @ 0094dea7 */
    CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar3 + 3),"%s",&DAT_00d539c2);
  }
  puVar3[2] = this_01;
  *(undefined4 **)(this + *(int *)(this + 0x60) * 4 + 0x20) = puVar3;
  iVar2 = gpGlobals;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = *(undefined4 *)(iVar2 + 0x1c);
  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)