L L4D2node

SurvivorBot::SurvivorBot

0x009427c0 · 1793 bytes · __thiscall

_ZN11SurvivorBotC2Ev

Decompiled

undefined (1 param)

/* SurvivorBot::SurvivorBot() */

void __thiscall SurvivorBot::SurvivorBot(SurvivorBot *this)

{
  INextBot *this_00;
  SurvivorBot *pSVar1;
  undefined4 uVar2;
  float fVar3;
  CBaseEdict *pCVar4;
  SurvivorBot SVar5;
  SurvivorBot *pSVar6;
  SurvivorBot *pSVar7;
  SurvivorLocomotion *this_01;
  SurvivorBody *this_02;
  SurvivorIntention *this_03;
  SurvivorVision *this_04;
  int iVar8;
  longdouble lVar9;
  
  CTerrorPlayer::CTerrorPlayer((CTerrorPlayer *)this);
  this_00 = (INextBot *)(this + 0x4028);
                    /* try { // try from 009427e0 to 009427e4 has its CatchHandler @ 00942eef */
  INextBot::INextBot(this_00);
  *(undefined ***)(this + 0x4264) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 17000) = 0;
  *(undefined4 *)(this + 0x426c) = 0xbf800000;
  *(undefined ***)(this + 0x4270) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x4274) = 0;
  *(undefined4 *)(this + 0x4278) = 0xbf800000;
  *(undefined ***)(this + 0x427c) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x4280) = 0;
  *(undefined4 *)(this + 0x4284) = 0xbf800000;
  *(undefined ***)(this + 0x4288) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x428c) = 0;
  *(undefined4 *)(this + 0x4290) = 0xbf800000;
  *(undefined ***)(this + 0x4294) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x4298) = 0;
  *(undefined4 *)(this + 0x429c) = 0xbf800000;
  *(undefined ***)(this + 0x42a0) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x42a4) = 0;
  *(undefined4 *)(this + 0x42a8) = 0xbf800000;
  *(undefined ***)(this + 0x42ac) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x42b0) = 0;
  *(undefined4 *)(this + 0x42b4) = 0xbf800000;
  *(undefined ***)(this + 0x42b8) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x42bc) = 0;
  *(undefined4 *)(this + 0x42c0) = 0xbf800000;
  *(undefined ***)(this + 0x42c4) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x42c8) = 0;
  *(undefined4 *)(this + 0x42cc) = 0xbf800000;
  *(undefined ***)(this + 0x42d0) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x42d4) = 0;
  *(undefined4 *)(this + 0x42d8) = 0xbf800000;
  *(undefined ***)(this + 0x42dc) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x42e0) = 0;
  *(undefined4 *)(this + 0x42e4) = 0xbf800000;
  *(undefined ***)(this + 0x42e8) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x42ec) = 0;
  *(undefined4 *)(this + 0x42f0) = 0xbf800000;
  *(undefined ***)(this + 0x42f4) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x42f8) = 0xbf800000;
  *(undefined4 *)(this + 0x4260) = 0;
  *(undefined4 *)(this + 0x425c) = 0;
  *(undefined ***)this = &PTR__SurvivorBot_00d097c8;
  *(undefined **)(this + 0x2364) = &DAT_00d0a18c;
  *(undefined ***)(this + 0x4028) = &PTR__SurvivorBot_00d0a1a0;
  *(undefined ***)(this + 0x4258) = &PTR_PressFireButton_00d0a2f0;
  *(undefined ***)(this + 0x4338) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x433c) = 0xbf800000;
                    /* try { // try from 009429c2 to 009429c6 has its CatchHandler @ 00942fa7 */
  PathFollower::PathFollower((PathFollower *)(this + 0x4350));
  *(undefined ***)(this + 0x8b30) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x8b34) = 0;
  *(undefined4 *)(this + 0x8b38) = 0xbf800000;
  *(undefined ***)(this + 0x8b48) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x8b4c) = 0;
  *(undefined4 *)(this + 0x8b50) = 0xbf800000;
  *(undefined ***)(this + 0x8b54) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x8b58) = 0xbf800000;
  *(undefined ***)(this + 0x8b5c) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x8b60) = 0;
  *(undefined4 *)(this + 0x8b64) = 0xbf800000;
                    /* try { // try from 00942a42 to 00942a46 has its CatchHandler @ 00942f77 */
  SurvivorTeamSituation::SurvivorTeamSituation((SurvivorTeamSituation *)(this + 0x8b6c),this);
                    /* try { // try from 00942a53 to 00942a57 has its CatchHandler @ 00942fa5 */
  PathFollower::PathFollower((PathFollower *)(this + 0x16298));
  pSVar1 = this + 0x1ab10;
  *(undefined ***)(this + 0x1aa78) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x1aa7c) = 0;
  *(undefined4 *)(this + 0x1aa80) = 0xbf800000;
  *(undefined4 *)(this + 0x1aa84) = 0;
  *(undefined4 *)(this + 0x1aa88) = 0;
  *(undefined4 *)(this + 0x1aa8c) = 0;
  *(undefined4 *)(this + 0x1aa90) = 0;
  *(undefined4 *)(this + 0x1aa94) = 0;
  *(undefined ***)(this + 0x1aaac) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x1aab0) = 0;
  *(undefined4 *)(this + 0x1aab4) = 0xbf800000;
  *(undefined4 *)(this + 0x1aab8) = 0xffffffff;
  *(undefined ***)(this + 0x1ab04) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x1ab08) = 0;
  *(undefined4 *)(this + 0x1ab0c) = 0xbf800000;
  pSVar6 = pSVar1;
  do {
    *(undefined ***)pSVar6 = &PTR_NetworkStateChanged_00c0b6e0;
    pSVar7 = pSVar6 + 0xc;
    *(undefined4 *)(this + (int)(pSVar6 + (0x1ab14 - (int)pSVar1))) = 0;
    *(undefined4 *)(this + (int)(pSVar6 + (0x1ab18 - (int)pSVar1))) = 0xbf800000;
    pSVar6 = pSVar7;
  } while (pSVar7 != this + 0x1ab70);
  *(undefined ***)(this + 0x1ab70) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x1ab74) = 0;
  *(undefined4 *)(this + 0x1ab78) = 0xbf800000;
  *(undefined ***)(this + 0x1ab7c) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x1ab80) = 0;
  *(undefined4 *)(this + 0x1ab84) = 0xbf800000;
  *(undefined ***)(this + 0x1ab88) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x1ab8c) = 0;
  *(undefined4 *)(this + 0x1ab90) = 0xbf800000;
  *(undefined ***)(this + 0x1ab94) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x1ab98) = 0xbf800000;
  *(undefined4 *)(this + 0x1aba0) = 0xffffffff;
  *(undefined ***)(this + 0x1aba4) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x1aba8) = 0xbf800000;
  *(undefined ***)(this + 0x1abac) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x1abb0) = 0xbf800000;
                    /* try { // try from 00942be8 to 00942bec has its CatchHandler @ 00942f9e */
  this_01 = ::operator_new(0xec);
                    /* try { // try from 00942bf9 to 00942bfd has its CatchHandler @ 00942f99 */
  SurvivorLocomotion::SurvivorLocomotion(this_01,this_00);
  *(SurvivorLocomotion **)(this + 0x4340) = this_01;
                    /* try { // try from 00942c0b to 00942c0f has its CatchHandler @ 00942f9e */
  this_02 = ::operator_new(0xac);
                    /* try { // try from 00942c1c to 00942c20 has its CatchHandler @ 00942f94 */
  SurvivorBody::SurvivorBody(this_02,this_00);
  *(SurvivorBody **)(this + 0x4344) = this_02;
                    /* try { // try from 00942c2e to 00942c32 has its CatchHandler @ 00942f9e */
  this_03 = ::operator_new(0x8c);
                    /* try { // try from 00942c3f to 00942c43 has its CatchHandler @ 00942f75 */
  SurvivorIntention::SurvivorIntention(this_03,this_00);
  *(SurvivorIntention **)(this + 0x4348) = this_03;
                    /* try { // try from 00942c51 to 00942c55 has its CatchHandler @ 00942f9e */
  this_04 = ::operator_new(0x154);
                    /* try { // try from 00942c62 to 00942c66 has its CatchHandler @ 00942f01 */
  SurvivorVision::SurvivorVision(this_04,this_00);
  *(SurvivorVision **)(this + 0x434c) = this_04;
  *(undefined4 *)(this + 0x1aa90) = 0;
  *(undefined4 *)(this + 0x1aafc) = 0;
  *(undefined4 *)(this + 0x1ab00) = 0;
  if (*(int *)(this + 0x4308) == 0) {
    SVar5 = this[0x6c];
  }
  else {
    if (this[0x6c] == (SurvivorBot)0x0) {
      pCVar4 = *(CBaseEdict **)(this + 0x30);
      if (pCVar4 == (CBaseEdict *)0x0) {
        SVar5 = (SurvivorBot)0x0;
      }
      else {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar8 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar8 + 2) = 0;
        SVar5 = this[0x6c];
      }
    }
    else {
      this[0x70] = (SurvivorBot)((byte)this[0x70] | 1);
      SVar5 = (SurvivorBot)0x1;
    }
    *(undefined4 *)(this + 0x4308) = 0;
  }
  if (*(int *)(this + 0x430c) != 0) {
    if (SVar5 == (SurvivorBot)0x0) {
      pCVar4 = *(CBaseEdict **)(this + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar8 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar8 + 2) = 0;
        SVar5 = this[0x6c];
      }
    }
    else {
      this[0x70] = (SurvivorBot)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x430c) = 0;
  }
  if (*(int *)(this + 0x4330) != 0) {
    if (SVar5 == (SurvivorBot)0x0) {
      pCVar4 = *(CBaseEdict **)(this + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
                    /* try { // try from 00942ccd to 00942ea2 has its CatchHandler @ 00942f9e */
        iVar8 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar8 + 2) = 0;
        SVar5 = this[0x6c];
      }
    }
    else {
      this[0x70] = (SurvivorBot)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x4330) = 0;
  }
  this[0x4335] = (SurvivorBot)0x0;
  if (SVar5 == (SurvivorBot)0x0) {
    pCVar4 = *(CBaseEdict **)(this + 0x30);
    if (pCVar4 != (CBaseEdict *)0x0) {
      *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
      iVar8 = CBaseEdict::GetChangeAccessor(pCVar4);
      *(undefined2 *)(iVar8 + 2) = 0;
    }
  }
  else {
    this[0x70] = (SurvivorBot)((byte)this[0x70] | 1);
  }
  uVar2 = *(undefined4 *)(gpGlobals + 0xc);
  *(undefined4 *)(this + 0x78) = 0;
  *(undefined4 *)(this + 0x74) = uVar2;
  V_strncpy((char *)(this + 0x4310),"",0x20);
  this[0x4334] = (SurvivorBot)0x0;
  lVar9 = (longdouble)IntervalTimer::Now();
  if ((float)lVar9 != *(float *)(this + 0x433c)) {
    (**(code **)(*(int *)(this + 0x4338) + 4))(this + 0x4338,this + 0x433c);
    *(float *)(this + 0x433c) = (float)lVar9;
  }
  lVar9 = (longdouble)RandomFloat(0x3f800000,0x3fc00000);
  fVar3 = (float)lVar9;
  lVar9 = (longdouble)CountdownTimer::Now();
  if ((float)lVar9 + fVar3 != *(float *)(this + 0x1ab90)) {
    (**(code **)(*(int *)(this + 0x1ab88) + 4))(this + 0x1ab88,this + 0x1ab90);
    *(float *)(this + 0x1ab90) = (float)lVar9 + fVar3;
  }
  if (fVar3 != *(float *)(this + 0x1ab8c)) {
    (**(code **)(*(int *)(this + 0x1ab88) + 4))(this + 0x1ab88,this + 0x1ab8c);
    *(float *)(this + 0x1ab8c) = fVar3;
  }
  INextBot::Reset(this_00);
  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)