L L4D2node

CBaseEntity::CalcAbsoluteVelocity

0x0060ac80 · 298 bytes · __thiscall

_ZN11CBaseEntity20CalcAbsoluteVelocityEv

Decompiled

undefined (1 param)

/* CBaseEntity::CalcAbsoluteVelocity() */

void __thiscall CBaseEntity::CalcAbsoluteVelocity(CBaseEntity *this)

{
  uint uVar1;
  CBaseEntity *this_00;
  undefined *puVar2;
  
  puVar2 = g_pEntityList;
  if ((*(uint *)(this + 0x14c) & 0x1000) != 0) {
    *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) & 0xffffefff;
    uVar1 = *(uint *)(this + 0x188);
    if ((((uVar1 != 0xffffffff) &&
         (puVar2 = puVar2 + (uVar1 & 0xfff) * 0x10, puVar2 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar2 + 8) == uVar1 >> 0xc)) &&
       (this_00 = *(CBaseEntity **)(puVar2 + 4), this_00 != (CBaseEntity *)0x0)) {
      if (((byte)this_00[0x14d] & 8) != 0) {
        CalcAbsolutePosition(this_00);
      }
      VectorRotate((float *)(this + 0x2ec),(matrix3x4_t *)(this_00 + 0x28c),(float *)(this + 0x274))
      ;
      if (((byte)this_00[0x14d] & 0x10) != 0) {
        CalcAbsoluteVelocity(this_00);
      }
      *(float *)(this + 0x274) = *(float *)(this + 0x274) + *(float *)(this_00 + 0x274);
      *(float *)(this + 0x278) = *(float *)(this + 0x278) + *(float *)(this_00 + 0x278);
      *(float *)(this + 0x27c) = *(float *)(this + 0x27c) + *(float *)(this_00 + 0x27c);
      return;
    }
    *(undefined4 *)(this + 0x274) = *(undefined4 *)(this + 0x2ec);
    *(undefined4 *)(this + 0x278) = *(undefined4 *)(this + 0x2f0);
    *(undefined4 *)(this + 0x27c) = *(undefined4 *)(this + 0x2f4);
  }
  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)