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.

104 lines
2.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #include "cbase.h"
  9. #include "basehlcombatweapon.h"
  10. #include "player.h"
  11. #include "gamerules.h"
  12. #include "ammodef.h"
  13. #include "in_buttons.h"
  14. #include "bone_setup.h"
  15. // memdbgon must be the last include file in a .cpp file!!!
  16. #include "tier0/memdbgon.h"
  17. class CWeapon_Manhack : public CBaseHLCombatWeapon
  18. {
  19. DECLARE_DATADESC();
  20. public:
  21. DECLARE_CLASS( CWeapon_Manhack, CBaseHLCombatWeapon );
  22. DECLARE_SERVERCLASS();
  23. void Spawn( void );
  24. void Precache( void );
  25. void ItemPostFrame( void );
  26. void PrimaryAttack( void );
  27. void SecondaryAttack( void );
  28. float m_flBladeYaw;
  29. };
  30. IMPLEMENT_SERVERCLASS_ST( CWeapon_Manhack, DT_Weapon_Manhack)
  31. END_SEND_TABLE()
  32. LINK_ENTITY_TO_CLASS( weapon_manhack, CWeapon_Manhack );
  33. PRECACHE_WEAPON_REGISTER(weapon_manhack);
  34. //---------------------------------------------------------
  35. // Save/Restore
  36. //---------------------------------------------------------
  37. BEGIN_DATADESC( CWeapon_Manhack )
  38. DEFINE_FIELD( m_flBladeYaw, FIELD_FLOAT ),
  39. END_DATADESC()
  40. void CWeapon_Manhack::Spawn( )
  41. {
  42. // Call base class first
  43. BaseClass::Spawn();
  44. Precache( );
  45. SetModel( GetViewModel() );
  46. FallInit();// get ready to fall down.
  47. m_flBladeYaw = NULL;
  48. AddSolidFlags( FSOLID_NOT_SOLID );
  49. }
  50. //------------------------------------------------------------------------------
  51. // Purpose :
  52. // Input :
  53. // Output :
  54. //------------------------------------------------------------------------------
  55. void CWeapon_Manhack::ItemPostFrame( void )
  56. {
  57. WeaponIdle( );
  58. }
  59. void CWeapon_Manhack::Precache( void )
  60. {
  61. BaseClass::Precache();
  62. }
  63. //------------------------------------------------------------------------------
  64. // Purpose :
  65. // Input :
  66. // Output :
  67. //------------------------------------------------------------------------------
  68. void CWeapon_Manhack::PrimaryAttack()
  69. {
  70. }
  71. //------------------------------------------------------------------------------
  72. // Purpose :
  73. // Input :
  74. // Output :
  75. //------------------------------------------------------------------------------
  76. void CWeapon_Manhack::SecondaryAttack()
  77. {
  78. }