Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef TF_WEAPON_MECHANICAL_ARM_H
  7. #define TF_WEAPON_MECHANICAL_ARM_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tf_weaponbase_gun.h"
  12. #include "tf_shareddefs.h"
  13. #include "tf_viewmodel.h"
  14. #ifdef CLIENT_DLL
  15. #define CTFMechanicalArm C_TFMechanicalArm
  16. #endif
  17. //=============================================================================
  18. //
  19. // Mechanical Arm class.
  20. //
  21. class CTFMechanicalArm : public CTFWeaponBaseGun
  22. {
  23. public:
  24. DECLARE_CLASS( CTFMechanicalArm, CTFWeaponBaseGun );
  25. DECLARE_NETWORKCLASS();
  26. DECLARE_PREDICTABLE();
  27. CTFMechanicalArm();
  28. ~CTFMechanicalArm();
  29. virtual void Precache();
  30. virtual void PrimaryAttack();
  31. virtual void SecondaryAttack( void );
  32. virtual int GetWeaponID( void ) const { return TF_WEAPON_MECHANICAL_ARM; }
  33. virtual int GetCustomDamageType( ) const { return TF_DMG_CUSTOM_PLASMA; }
  34. virtual int GetAmmoPerShot( void );
  35. virtual bool UpdateBodygroups( CBaseCombatCharacter* pOwner, int iState );
  36. #ifdef CLIENT_DLL
  37. virtual void OnDataChanged( DataUpdateType_t updateType );
  38. #endif // CLIENT_DLL
  39. private:
  40. bool ShockAttack( void );
  41. #ifdef GAME_DLL
  42. bool IsValidVictim( CTFPlayer *pOwner, CBaseEntity *pTarget );
  43. void ShockVictim( CTFPlayer *pOwner, CBaseEntity *pTarget );
  44. #else
  45. void StopParticleBeam( );
  46. void UpdateParticleBeam();
  47. HPARTICLEFFECT m_pParticleBeamEffect;
  48. HPARTICLEFFECT m_pParticleBeamSpark;
  49. C_BaseEntity *m_pEffectOwner;
  50. #endif // CLIENT_DLL
  51. };
  52. #endif // TF_WEAPON_MECHANICAL_ARM_H