L L4D2node

CTankClaw::GetPushDirection

0x0055e950 · 238 bytes · __cdecl

_ZN9CTankClaw16GetPushDirectionEP11CBaseEntity6Vector

Decompiled

undefined (2 params)

/* CTankClaw::GetPushDirection(CBaseEntity*, Vector) */

undefined4 *
CTankClaw::GetPushDirection
          (undefined4 *param_1,CTankClaw *param_2,CBaseEntity *param_3,undefined4 param_4,
          undefined4 param_5,undefined4 param_6)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  CBasePlayer *this;
  longdouble lVar4;
  float fVar5;
  undefined4 local_28;
  undefined4 local_24;
  float local_20;
  
  cVar2 = IsPhysicsTarget(param_2,param_3);
  if (cVar2 != '\0') {
    iVar3 = CTerrorWeapon::GetPlayerOwner((CTerrorWeapon *)param_2);
    if (iVar3 != 0) {
      piVar1 = *(int **)(param_3 + 0x238);
      fVar5 = 0.033333335;
      if (piVar1 != (int *)0x0) {
        lVar4 = (longdouble)(**(code **)(*piVar1 + 0x78))(piVar1);
        fVar5 = (float)lVar4 * 6.666667e-05;
      }
      this = (CBasePlayer *)CTerrorWeapon::GetPlayerOwner((CTerrorWeapon *)param_2);
      CBasePlayer::EyeVectors(this,(Vector *)&local_28,(Vector *)0x0,(Vector *)0x0);
      if (fVar5 <= local_20) {
        fVar5 = local_20;
      }
      local_20 = fVar5;
      VectorNormalize((Vector *)&local_28);
      *param_1 = local_28;
      param_1[1] = local_24;
      param_1[2] = local_20;
      return param_1;
    }
  }
  CClaw::GetPushDirection(param_1,param_2,param_3,param_4,param_5,param_6);
  return param_1;
}

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)