L L4D2node

CBaseCombatCharacter::Weapon_ShootPosition

0x005f00f0 · 348 bytes · __cdecl

_ZN20CBaseCombatCharacter20Weapon_ShootPositionEv

Decompiled

undefined (0 params)

/* CBaseCombatCharacter::Weapon_ShootPosition() */

float * CBaseCombatCharacter::Weapon_ShootPosition(void)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float *in_stack_00000004;
  CBaseEntity *in_stack_00000008;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  float local_1c;
  float local_18;
  float local_14;
  float local_10;
  
  if (((byte)in_stack_00000008[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(in_stack_00000008);
  }
  AngleVectors((QAngle *)(in_stack_00000008 + 0x37c),(Vector *)&local_30,(Vector *)&local_24,
               (Vector *)&local_18);
  fVar1 = *(float *)(in_stack_00000008 + 0x17f4);
  fVar2 = *(float *)(in_stack_00000008 + 0x17ec);
  fVar3 = *(float *)(in_stack_00000008 + 0x17f0);
  if (((byte)in_stack_00000008[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(in_stack_00000008);
  }
  fVar4 = *(float *)(in_stack_00000008 + 0x2e8);
  fVar5 = *(float *)(in_stack_00000008 + 0x2e0);
  in_stack_00000004[1] =
       local_20 * fVar2 + local_14 * fVar1 + *(float *)(in_stack_00000008 + 0x2e4) +
       local_2c * fVar3;
  *in_stack_00000004 = local_24 * fVar2 + local_18 * fVar1 + fVar5 + local_30 * fVar3;
  in_stack_00000004[2] = fVar1 * local_10 + fVar2 * local_1c + fVar4 + fVar3 * local_28;
  return in_stack_00000004;
}

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)