L L4D2node

DebugMoveTo::Update

0x00a2f3b0 · 900 bytes · __thiscall

_ZN11DebugMoveTo6UpdateEP8Infectedf

Decompiled

undefined (3 params)

/* DebugMoveTo::Update(Infected*, float) */

DebugMoveTo * __thiscall DebugMoveTo::Update(DebugMoveTo *this,Infected *param_1,float param_2)

{
  INextBot *this_00;
  char cVar1;
  int *piVar2;
  int *piVar3;
  undefined4 *puVar4;
  longdouble lVar5;
  float fVar6;
  float fVar7;
  float fVar8;
  undefined4 uVar9;
  
  piVar2 = (int *)(**(code **)(*(int *)param_2 + 0x594))(param_2);
  piVar3 = (int *)(**(code **)(*(int *)param_2 + 0x590))(param_2);
  cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,2);
  if (cVar1 == '\0') {
    cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,4);
    if (cVar1 == '\0') {
      this_00 = (INextBot *)((int)param_2 + 0x1a3c);
      PathFollower::Update((PathFollower *)(param_1 + 0x40),this_00);
      lVar5 = (longdouble)CountdownTimer::Now();
      if (((float)lVar5 < *(float *)(param_1 + 0x4828)) && (0 < *(int *)(param_1 + 0x4444))) {
        if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
        }
        fVar6 = *(float *)((int)param_2 + 0x2e4) - *(float *)(param_1 + 0x38);
        fVar8 = *(float *)((int)param_2 + 0x2e8) - *(float *)(param_1 + 0x3c);
        fVar7 = *(float *)((int)param_2 + 0x2e0) - *(float *)(param_1 + 0x34);
        if (400.0 <= fVar6 * fVar6 + fVar8 * fVar8 + fVar7 * fVar7) {
          cVar1 = (**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0x104))(this_00);
          if (cVar1 != '\0') {
            lVar5 = (longdouble)(**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0x108))(this_00);
            if (5.0 < (float)lVar5) {
              cVar1 = (**(code **)(*piVar2 + 0xe4))(piVar2,0x26b);
              if (cVar1 == '\0') {
                (**(code **)(*piVar2 + 0xd8))(piVar2,0x26b,1);
              }
              goto LAB_00a2f633;
            }
          }
          uVar9 = 4;
          cVar1 = INextBot::IsDebugging(this_00,4);
          if (cVar1 != '\0') {
            uVar9 = 0;
            PathFollower::Draw((Segment *)(param_1 + 0x40));
          }
          cVar1 = (**(code **)(*piVar3 + 200))(piVar3,uVar9);
          if (cVar1 == '\0') {
            cVar1 = (**(code **)(*piVar3 + 0x114))(piVar3);
            if (cVar1 == '\0') {
              cVar1 = (**(code **)(*piVar3 + 0xf8))(piVar3);
              if (cVar1 != '\0') {
                cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,0);
                if (cVar1 == '\0') {
                  cVar1 = (**(code **)(*piVar2 + 0xe4))(piVar2,0x260);
                  if (cVar1 == '\0') {
                    (**(code **)(*piVar2 + 0xd8))(piVar2,0x260,0);
                  }
                }
                else {
                  cVar1 = (**(code **)(*piVar2 + 0xe4))(piVar2,0x255);
                  if (cVar1 == '\0') {
                    (**(code **)(*piVar2 + 0xd8))(piVar2,0x255,0);
                  }
                }
              }
            }
          }
          *(undefined4 *)this = 0;
          *(undefined4 *)(this + 4) = 0;
          *(undefined4 *)(this + 8) = 0;
          return this;
        }
      }
LAB_00a2f633:
      *(undefined4 *)this = 3;
      *(undefined4 *)(this + 4) = 0;
      *(undefined4 *)(this + 8) = 0;
      return this;
    }
  }
  puVar4 = ::operator_new(0x38);
  *(undefined4 *)this = 2;
  puVar4[8] = 0;
  puVar4[9] = 0;
  puVar4[10] = 0;
  puVar4[3] = 0;
  puVar4[4] = 0;
  puVar4[5] = 0;
  puVar4[6] = 0;
  puVar4[7] = 0;
  puVar4[2] = 0;
  *(undefined1 *)(puVar4 + 0xc) = 0;
  *(undefined1 *)((int)puVar4 + 0x31) = 0;
  puVar4[0xb] = 0;
  *puVar4 = &PTR__InfectedChangePosture_00d219e8;
  puVar4[1] = &PTR__InfectedChangePosture_00d21b4c;
  puVar4[0xd] = 0;
  *(undefined4 **)(this + 4) = puVar4;
  *(undefined4 *)(param_1 + 0x20) = 0;
  *(undefined4 *)(param_1 + 0x24) = 0;
  *(undefined4 *)(param_1 + 0x28) = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0;
  *(undefined4 *)(this + 8) = 0;
  return this;
}

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)