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.

60 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef WEAPON_IFMBASE_H
  7. #define WEAPON_IFMBASE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #if defined( CLIENT_DLL )
  12. #define CWeaponIFMBase C_WeaponIFMBase
  13. #endif
  14. #if defined ( DOD_DLL )
  15. #include "weapon_dodbase.h"
  16. #define CWeaponModBaseClass CWeaponDODBase
  17. #elif defined ( TF_CLIENT_DLL ) || defined ( TF_DLL )
  18. #include "tf_weaponbase.h"
  19. #define CWeaponModBaseClass CTFWeaponBase
  20. #endif
  21. class CWeaponIFMBase : public CWeaponModBaseClass
  22. {
  23. public:
  24. DECLARE_CLASS( CWeaponIFMBase, CWeaponModBaseClass );
  25. DECLARE_NETWORKCLASS();
  26. DECLARE_PREDICTABLE();
  27. CWeaponIFMBase();
  28. #ifdef GAME_DLL
  29. DECLARE_DATADESC();
  30. #endif
  31. // All predicted weapons need to implement and return true
  32. virtual bool IsPredicted() const;
  33. // virtual void FallInit( void );
  34. public:
  35. #if defined( CLIENT_DLL )
  36. virtual bool ShouldPredict();
  37. virtual void OnDataChanged( DataUpdateType_t type );
  38. #else
  39. virtual void Spawn();
  40. // FIXME: How should this work? This is a hack to get things working
  41. virtual const unsigned char *GetEncryptionKey( void ) { return NULL; }
  42. #endif
  43. private:
  44. CWeaponIFMBase( const CWeaponIFMBase & );
  45. };
  46. #endif // WEAPON_IFMBASE_H