L L4D2node

INextBot::UpdateImmobileStatus

0x00754560 · 508 bytes · __thiscall

_ZN8INextBot20UpdateImmobileStatusEv

Decompiled

undefined (1 param)

/* INextBot::UpdateImmobileStatus() */

void __thiscall INextBot::UpdateImmobileStatus(INextBot *this)

{
  CBaseEntity *pCVar1;
  longdouble lVar2;
  
  lVar2 = (longdouble)CountdownTimer::Now();
  if (*(float *)(this + 0x30) <= (float)lVar2) {
    lVar2 = (longdouble)CountdownTimer::Now();
    if ((float)lVar2 + 1.0 != *(float *)(this + 0x30)) {
      (**(code **)(*(int *)(this + 0x28) + 4))(this + 0x28,this + 0x30);
      *(float *)(this + 0x30) = (float)lVar2 + 1.0;
    }
    if (*(float *)(this + 0x2c) != 1.0) {
      (**(code **)(*(int *)(this + 0x28) + 4))(this + 0x28,this + 0x2c);
      *(undefined4 *)(this + 0x2c) = 0x3f800000;
    }
    lVar2 = (longdouble)(**(code **)(*(int *)this + 0x110))(this);
    pCVar1 = (CBaseEntity *)(**(code **)(*(int *)this + 0xb4))(this);
    if (((byte)pCVar1[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(pCVar1);
    }
    if ((float)lVar2 * (float)lVar2 <
        (*(float *)(pCVar1 + 0x2e4) - *(float *)(this + 0x20)) *
        (*(float *)(pCVar1 + 0x2e4) - *(float *)(this + 0x20)) +
        (*(float *)(pCVar1 + 0x2e0) - *(float *)(this + 0x1c)) *
        (*(float *)(pCVar1 + 0x2e0) - *(float *)(this + 0x1c)) +
        (*(float *)(pCVar1 + 0x2e8) - *(float *)(this + 0x24)) *
        (*(float *)(pCVar1 + 0x2e8) - *(float *)(this + 0x24))) {
      pCVar1 = (CBaseEntity *)(**(code **)(*(int *)this + 0xb4))(this);
      if (((byte)pCVar1[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(pCVar1);
      }
      *(undefined4 *)(this + 0x1c) = *(undefined4 *)(pCVar1 + 0x2e0);
      *(undefined4 *)(this + 0x20) = *(undefined4 *)(pCVar1 + 0x2e4);
      *(undefined4 *)(this + 0x24) = *(undefined4 *)(pCVar1 + 0x2e8);
      if (*(float *)(this + 0x38) != -1.0) {
        (**(code **)(*(int *)(this + 0x34) + 4))(this + 0x34,this + 0x38);
        *(undefined4 *)(this + 0x38) = 0xbf800000;
      }
    }
    else if (*(float *)(this + 0x38) <= 0.0) {
      lVar2 = (longdouble)IntervalTimer::Now();
      if ((float)lVar2 != *(float *)(this + 0x38)) {
        (**(code **)(*(int *)(this + 0x34) + 4))(this + 0x34,this + 0x38);
        *(float *)(this + 0x38) = (float)lVar2;
      }
    }
  }
  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)