L L4D2node

CPhysicsPushedEntities::ComputeRotationalPushDirection

0x0078c010 · 351 bytes · __thiscall

_ZN22CPhysicsPushedEntities30ComputeRotationalPushDirectionEP11CBaseEntityRKNS_18RotatingPushMove_tEP6VectorS1_

Decompiled

undefined (5 params)

/* CPhysicsPushedEntities::ComputeRotationalPushDirection(CBaseEntity*,
   CPhysicsPushedEntities::RotatingPushMove_t const&, Vector*, CBaseEntity*) */

void __thiscall
CPhysicsPushedEntities::ComputeRotationalPushDirection
          (CPhysicsPushedEntities *this,CBaseEntity *param_1,RotatingPushMove_t *param_2,
          Vector *param_3,CBaseEntity *param_4)

{
  char cVar1;
  float *pfVar2;
  int iVar3;
  float local_40;
  float local_3c;
  float local_38;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  pfVar2 = (float *)(**(code **)(*(int *)(param_1 + 0x194) + 0x20))
                              ((CCollisionProperty *)(param_1 + 0x194));
  local_40 = *pfVar2;
  local_3c = pfVar2[1];
  local_38 = pfVar2[2];
  iVar3 = (**(code **)(*(int *)(param_4 + 0x194) + 0x2c))(param_4 + 0x194);
  if (iVar3 == 6) {
    CCollisionProperty::CollisionAABBToWorldAABB
              ((CCollisionProperty *)(param_1 + 0x194),(Vector *)(param_1 + 0x19c),
               (Vector *)(param_1 + 0x1a8),(Vector *)&local_34,(Vector *)&local_28);
    local_40 = local_28;
    if (0.0 < *(float *)param_3 || *(float *)param_3 == 0.0) {
      local_40 = local_34;
    }
    local_3c = local_24;
    if (0.0 < *(float *)(param_3 + 4) || *(float *)(param_3 + 4) == 0.0) {
      local_3c = local_30;
    }
    local_38 = local_20;
    if (0.0 < *(float *)(param_3 + 8) || *(float *)(param_3 + 8) == 0.0) {
      local_38 = local_2c;
    }
    cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
    if (cVar1 != '\0') {
      CBasePlayer::SetPhysicsFlag((CBasePlayer *)param_1,0x20,true);
    }
  }
  VectorITransform(&local_40,(matrix3x4_t *)(param_2 + 0xc),&local_34);
  VectorTransform(&local_34,(matrix3x4_t *)(param_2 + 0x3c),&local_28);
  *(float *)param_3 = local_28 - local_40;
  *(float *)(param_3 + 4) = local_24 - local_3c;
  *(float *)(param_3 + 8) = local_20 - local_38;
  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)