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.

74 lines
2.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "weapon_citizenpackage.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. IMPLEMENT_SERVERCLASS_ST(CWeaponCitizenPackage, DT_WeaponCitizenPackage)
  11. END_SEND_TABLE()
  12. BEGIN_DATADESC( CWeaponCitizenPackage )
  13. END_DATADESC()
  14. LINK_ENTITY_TO_CLASS( weapon_citizenpackage, CWeaponCitizenPackage );
  15. PRECACHE_WEAPON_REGISTER(weapon_citizenpackage);
  16. acttable_t CWeaponCitizenPackage::m_acttable[] =
  17. {
  18. { ACT_IDLE, ACT_IDLE_PACKAGE, false },
  19. { ACT_WALK, ACT_WALK_PACKAGE, false },
  20. };
  21. IMPLEMENT_ACTTABLE(CWeaponCitizenPackage);
  22. //-----------------------------------------------------------------------------
  23. // Purpose:
  24. //-----------------------------------------------------------------------------
  25. void CWeaponCitizenPackage::ItemPostFrame( void )
  26. {
  27. // Do nothing
  28. }
  29. //-----------------------------------------------------------------------------
  30. // Purpose: Remove the citizen package if it's ever dropped
  31. //-----------------------------------------------------------------------------
  32. void CWeaponCitizenPackage::Drop( const Vector &vecVelocity )
  33. {
  34. BaseClass::Drop( vecVelocity );
  35. UTIL_Remove( this );
  36. }
  37. //-----------------------------------------------------------------------------
  38. // Purpose: Citizen suitcase
  39. //-----------------------------------------------------------------------------
  40. class CWeaponCitizenSuitcase : public CWeaponCitizenPackage
  41. {
  42. DECLARE_CLASS( CWeaponCitizenSuitcase, CWeaponCitizenPackage );
  43. public:
  44. DECLARE_SERVERCLASS();
  45. DECLARE_DATADESC();
  46. DECLARE_ACTTABLE();
  47. };
  48. IMPLEMENT_SERVERCLASS_ST(CWeaponCitizenSuitcase, DT_WeaponCitizenSuitcase)
  49. END_SEND_TABLE()
  50. BEGIN_DATADESC( CWeaponCitizenSuitcase )
  51. END_DATADESC()
  52. LINK_ENTITY_TO_CLASS( weapon_citizensuitcase, CWeaponCitizenSuitcase );
  53. PRECACHE_WEAPON_REGISTER(weapon_citizensuitcase);
  54. acttable_t CWeaponCitizenSuitcase::m_acttable[] =
  55. {
  56. { ACT_IDLE, ACT_IDLE_SUITCASE, false },
  57. { ACT_WALK, ACT_WALK_SUITCASE, false },
  58. };
  59. IMPLEMENT_ACTTABLE(CWeaponCitizenSuitcase);