L L4D2node

ZombieBotLocomotion::UpdatePosition

0x00a54720 · 747 bytes · __thiscall

_ZN19ZombieBotLocomotion14UpdatePositionERK6Vector

Decompiled

undefined (2 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ZombieBotLocomotion::UpdatePosition(Vector const&) */

void __thiscall ZombieBotLocomotion::UpdatePosition(ZombieBotLocomotion *this,Vector *param_1)

{
  uint *puVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  ZombieBotLocomotion *pZVar5;
  Vector *pVVar6;
  undefined4 uVar7;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_40;
  undefined4 local_3c;
  int local_38;
  Vector local_34 [12];
  Vector local_28 [24];
  
  local_4c = 0;
  local_48 = 0;
  if (_towlower == 0) {
    local_38 = 0;
  }
  else {
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_4c,0,0,0,0,
               "/data/src/game/server/terror/zombiebot/zombiebotlocomotion.cpp",0x3f8,
               &UpdatePosition(Vector_const&)::tm_fmt,"(%s)%s","NextBot",
               "ZombieBotLocomotion::UpdatePosition");
    local_38 = _towlower;
  }
  iVar4 = _DAT_0105db00;
  local_40 = local_4c;
  local_3c = local_48;
                    /* try { // try from 00a547d2 to 00a547d6 has its CatchHandler @ 00a54a4b */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
    if ((char *)*_DAT_0105d15c != "ZombieBotLocomotion::UpdatePosition") {
                    /* try { // try from 00a549b8 to 00a549db has its CatchHandler @ 00a54a4b */
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd288ac,(char *)0x0,0xca8906);
    }
    puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
    *puVar1 = *puVar1 | 4;
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
  iVar4 = _DAT_0105db00;
  if ((*(int *)(NextBotStop._28_4_ + 0x30) == 0) &&
     ((*(byte *)(*(int *)(this + 0x78) + 0x150) & 0x20) == 0)) {
    pVVar6 = local_34;
    pZVar5 = this;
                    /* try { // try from 00a54810 to 00a5486d has its CatchHandler @ 00a54a2a */
    ResolveZombieCollisions(pVVar6);
    iVar4 = (**(code **)(*(int *)(*(int *)(this + 0x78) + 0x1a3c) + 0xd4))
                      (*(int *)(this + 0x78) + 0x1a3c,pZVar5,param_1);
    uVar7 = 3;
    ResolveCollision(local_28,(Vector *)this,iVar4);
    (**(code **)(*(int *)(*(int *)(this + 0x78) + 0x1a3c) + 0xd0))
              (*(int *)(this + 0x78) + 0x1a3c,local_28,iVar4,pVVar6,uVar7);
    iVar4 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
      cVar2 = CVProfNode::ExitScope();
      if (cVar2 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
    if (local_38 != 0) {
      (**(code **)(local_38 + 0x54))(local_38,local_40,local_3c,0,0,0);
    }
  }
  else {
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
      cVar2 = CVProfNode::ExitScope();
      if (cVar2 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
    if (local_38 != 0) {
      (**(code **)(local_38 + 0x54))(local_38,local_40,local_3c,0,0,0);
      return;
    }
  }
  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)