Counter Strike : Global Offensive Source Code
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.

58 lines
1.3 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef C_TEAM_TRAIN_WATCHER_H
  7. #define C_TEAM_TRAIN_WATCHER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "c_baseentity.h"
  12. class C_TeamTrainWatcher : public C_BaseEntity
  13. {
  14. DECLARE_CLASS( C_TeamTrainWatcher, C_BaseEntity );
  15. public:
  16. DECLARE_CLIENTCLASS();
  17. C_TeamTrainWatcher();
  18. ~C_TeamTrainWatcher();
  19. virtual void OnPreDataChanged( DataUpdateType_t updateType );
  20. virtual void OnDataChanged( DataUpdateType_t updateType );
  21. float GetTotalProgress( void ) { return m_flTotalProgress; }
  22. int GetSpeedLevel( void ) { return m_iTrainSpeedLevel; }
  23. private:
  24. // === Networked Data ===
  25. // percent distance to cp1, distance to cp2, etc
  26. // adds up to 1.0
  27. //CNetworkArray( float, m_flDistances, MAX_CONTROL_POINTS );
  28. // current total progress, percentage
  29. CNetworkVar( float, m_flTotalProgress );
  30. float m_flOldProgress;
  31. CNetworkVar( int, m_iTrainSpeedLevel );
  32. int m_iOldTrainSpeedLevel;
  33. CNetworkVar( float, m_flRecedeTime );
  34. float m_flOldRecedeTime;
  35. CNetworkVar( int, m_nNumCappers );
  36. int m_nOldNumCappers;
  37. };
  38. extern C_TeamTrainWatcher *g_pTrainWatcher;
  39. inline C_TeamTrainWatcher *TrainWatcher()
  40. {
  41. return g_pTrainWatcher;
  42. }
  43. #endif //C_TEAM_TRAIN_WATCHER_H