L L4D2node

CBaseEntity::ApplyAbsVelocityImpulse

0x0040f970 · 270 bytes · __thiscall

_ZN11CBaseEntity23ApplyAbsVelocityImpulseERK6Vector

Decompiled

undefined (2 params)

/* CBaseEntity::ApplyAbsVelocityImpulse(Vector const&) */

void __thiscall CBaseEntity::ApplyAbsVelocityImpulse(CBaseEntity *this,Vector *param_1)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  float local_101c [1027];
  
  local_101c[0] = *(float *)param_1;
  if (((local_101c[0] != vec3_origin) || (DAT_01053d4c != *(float *)(param_1 + 4))) ||
     (DAT_01053d50 != *(float *)(param_1 + 8))) {
    if (this[0x186] == (CBaseEntity)0x6) {
      iVar2 = (**(code **)(*(int *)this + 0x2b8))(this,local_101c,0x400);
      if (0 < iVar2) {
        iVar3 = 0;
        do {
          piVar1 = (int *)local_101c[iVar3];
          iVar3 = iVar3 + 1;
          (**(code **)(*piVar1 + 0xd8))(piVar1,param_1,0);
        } while (iVar3 != iVar2);
      }
    }
    else {
      if (((byte)this[0x14d] & 0x10) != 0) {
        CalcAbsoluteVelocity(this);
        local_101c[0] = *(float *)param_1;
      }
      local_101c[0] = local_101c[0] + *(float *)(this + 0x274);
      local_101c[1] = *(float *)(param_1 + 4) + *(float *)(this + 0x278);
      local_101c[2] = *(float *)(param_1 + 8) + *(float *)(this + 0x27c);
      SetAbsVelocity(this,(Vector *)local_101c);
    }
  }
  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)