L L4D2node

ZombieBotBody::SetPosition

0x00a4cfd0 · 783 bytes · __thiscall

_ZN13ZombieBotBody11SetPositionERK6Vector

Decompiled

undefined (2 params)

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

undefined4 __thiscall ZombieBotBody::SetPosition(ZombieBotBody *this,Vector *param_1)

{
  float fVar1;
  int iVar2;
  char cVar3;
  int iVar4;
  longdouble lVar5;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (___atan2f_finite == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_34,0,0,0,0,
               "/data/src/game/server/terror/zombiebot/zombiebotbody.cpp",0x6b,
               &SetPosition(Vector_const&)::tm_fmt,"(%s)%s","Unaccounted",
               "ZombieBotBody::SetPosition");
    local_20 = ___atan2f_finite;
  }
  iVar2 = _DAT_0105db00;
  local_28 = local_34;
  local_24 = local_30;
  if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 00a4d1c6 to 00a4d214 has its CatchHandler @ 00a4d30b */
    iVar4 = ThreadGetCurrentId();
    if (iVar2 == iVar4) {
      if ((char *)*_DAT_0105d15c != "ZombieBotBody::SetPosition") {
        _DAT_0105d15c =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd27e0e,(char *)0x1,0xbfafa1);
      }
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
  }
  if (*(int *)(ZombieMove._28_4_ + 0x30) != 0) {
                    /* try { // try from 00a4d0a0 to 00a4d15b has its CatchHandler @ 00a4d320 */
    lVar5 = (longdouble)CountdownTimer::Now();
    if (*(float *)(this + 0x94) <= (float)lVar5) {
      if (*(float *)(this + 0x94) <= 0.0) {
        *(undefined4 *)(this + 0x98) = *(undefined4 *)param_1;
        *(undefined4 *)(this + 0x9c) = *(undefined4 *)(param_1 + 4);
        *(undefined4 *)(this + 0xa0) = *(undefined4 *)(param_1 + 8);
      }
      fVar1 = *(float *)(ZombieTouchTriggerDelay._28_4_ + 0x2c);
      lVar5 = (longdouble)CountdownTimer::Now();
      if ((float)lVar5 + fVar1 != *(float *)(this + 0x94)) {
        (**(code **)(*(int *)(this + 0x8c) + 4))(this + 0x8c,this + 0x94);
        *(float *)(this + 0x94) = (float)lVar5 + fVar1;
      }
      if (fVar1 != *(float *)(this + 0x90)) {
                    /* try { // try from 00a4d293 to 00a4d2c5 has its CatchHandler @ 00a4d320 */
        (**(code **)(*(int *)(this + 0x8c) + 4))(this + 0x8c,this + 0x90);
        *(float *)(this + 0x90) = fVar1;
      }
      CBaseEntity::PhysicsTouchTriggers(*(CBaseEntity **)(this + 0x14),(Vector *)(this + 0x98));
      *(undefined4 *)(this + 0x98) = *(undefined4 *)param_1;
      *(undefined4 *)(this + 0x9c) = *(undefined4 *)(param_1 + 4);
      *(undefined4 *)(this + 0xa0) = *(undefined4 *)(param_1 + 8);
    }
    CBaseEntity::SetAbsOrigin(*(CBaseEntity **)(this + 0x14),param_1);
  }
  iVar2 = _DAT_0105db00;
  if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
    iVar4 = ThreadGetCurrentId();
    if (iVar2 == iVar4) {
      cVar3 = CVProfNode::ExitScope();
      if (cVar3 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
  }
  return 1;
}

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)