L L4D2node

BossZombiePlayerBot::PhysicsSimulate

0x00a79d30 · 675 bytes · __thiscall

_ZN19BossZombiePlayerBot15PhysicsSimulateEv

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* BossZombiePlayerBot::PhysicsSimulate() */

void __thiscall BossZombiePlayerBot::PhysicsSimulate(BossZombiePlayerBot *this)

{
  CBaseEdict *this_00;
  char cVar1;
  CBaseEntity *this_01;
  int iVar2;
  int iVar3;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_18;
  undefined4 local_14;
  int local_10;
  
  local_24 = 0;
  local_20 = 0;
  if (___atan2f_finite == 0) {
    local_10 = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_24,0,0,0,0,
               "/data/src/game/server/terror/zombieplayerbot/bosszombieplayerbot.cpp",0x39,
               &PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted",
               "BossZombiePlayerBot::PhysicsSimulate");
    local_10 = ___atan2f_finite;
  }
  iVar2 = _DAT_0105db00;
  local_18 = local_24;
  local_14 = local_20;
                    /* try { // try from 00a79eb6 to 00a79f04 has its CatchHandler @ 00a7a017 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar3 = ThreadGetCurrentId(), iVar2 == iVar3)) {
    if ((char *)*_DAT_0105d15c != "BossZombiePlayerBot::PhysicsSimulate") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd2d19c,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
  if (0 < *(int *)(this + 0x4304)) {
                    /* try { // try from 00a79df0 to 00a79e52 has its CatchHandler @ 00a79ff6 */
    this_01 = (CBaseEntity *)UTIL_PlayerByUserId(*(int *)(this + 0x4304));
    if ((this_01 == (CBaseEntity *)0x0) ||
       (cVar1 = (**(code **)(*(int *)this_01 + 0x16c))(this_01), cVar1 == '\0')) {
      iVar2 = *(int *)(this + 0x4304);
    }
    else {
      iVar2 = CBaseEntity::GetTeamNumber(this_01);
      if (iVar2 == 1) goto LAB_00a79e1c;
      iVar2 = *(int *)(this + 0x4304);
    }
    if (iVar2 != 0) {
      if (this[0x6c] == (BossZombiePlayerBot)0x0) {
        this_00 = *(CBaseEdict **)(this + 0x30);
        if (this_00 != (CBaseEdict *)0x0) {
          *(uint *)this_00 = *(uint *)this_00 | 0x101;
          iVar2 = CBaseEdict::GetChangeAccessor(this_00);
          *(undefined2 *)(iVar2 + 2) = 0;
        }
      }
      else {
        this[0x70] = (BossZombiePlayerBot)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + 0x4304) = 0;
    }
  }
LAB_00a79e1c:
  iVar2 = TheNextBots();
  if (*(int *)(iVar2 + 0x4c) != 0) {
    iVar2 = TheNextBots();
    cVar1 = (**(code **)(**(int **)(iVar2 + 0x4c) + 0xe0))(*(int **)(iVar2 + 0x4c),this);
    if (cVar1 == '\0') goto LAB_00a79e4b;
  }
  if (*(int *)(BossZombieBotCrouch._28_4_ + 0x30) != 0) {
                    /* try { // try from 00a79f7d to 00a79fc9 has its CatchHandler @ 00a79ff6 */
    (**(code **)(*(int *)this + 0x980))(this,0xbf800000);
  }
LAB_00a79e4b:
  NextBotPlayer<CTerrorPlayer>::PhysicsSimulate((NextBotPlayer<CTerrorPlayer> *)this);
  iVar2 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar3 = ThreadGetCurrentId(), iVar2 == iVar3)) {
    cVar1 = CVProfNode::ExitScope();
    if (cVar1 != '\0') {
      _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
    }
    DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
  }
  if (local_10 != 0) {
    (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
  }
  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)