diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/c_team_train_watcher.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/c_team_train_watcher.h')
| -rw-r--r-- | game/client/c_team_train_watcher.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/game/client/c_team_train_watcher.h b/game/client/c_team_train_watcher.h new file mode 100644 index 0000000..8887d22 --- /dev/null +++ b/game/client/c_team_train_watcher.h @@ -0,0 +1,77 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//============================================================================= + +#ifndef C_TEAM_TRAIN_WATCHER_H +#define C_TEAM_TRAIN_WATCHER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "c_baseentity.h" +#include "c_physicsprop.h" +#ifdef GLOWS_ENABLE +#include "glow_outline_effect.h" +#endif // GLOWS_ENABLE + +class C_TeamTrainWatcher : public C_BaseEntity +{ + DECLARE_CLASS( C_TeamTrainWatcher, C_BaseEntity ); +public: + DECLARE_CLIENTCLASS(); + + C_TeamTrainWatcher(); + ~C_TeamTrainWatcher(); + + virtual void OnPreDataChanged( DataUpdateType_t updateType ); + virtual void OnDataChanged( DataUpdateType_t updateType ); + + virtual void Spawn( void ); + virtual void UpdateOnRemove( void ); + + float GetTotalProgress( void ) { return m_flTotalProgress; } + int GetSpeedLevel( void ) { return m_iTrainSpeedLevel; } + + // IClientThinkable overrides. +public: + virtual void ClientThink(); + +#ifdef GLOWS_ENABLE +private: + void UpdateGlowEffect( void ); + void DestroyGlowEffect( void ); +#endif // GLOWS_ENABLE + +private: + + // === Networked Data === + + // percent distance to cp1, distance to cp2, etc + // adds up to 1.0 + //CNetworkArray( float, m_flDistances, MAX_CONTROL_POINTS ); + + // current total progress, percentage + CNetworkVar( float, m_flTotalProgress ); + float m_flOldProgress; + + CNetworkVar( int, m_iTrainSpeedLevel ); + int m_iOldTrainSpeedLevel; + + CNetworkVar( float, m_flRecedeTime ); + float m_flOldRecedeTime; + + CNetworkVar( int, m_nNumCappers ); + int m_nOldNumCappers; + +#ifdef GLOWS_ENABLE + EHANDLE m_hGlowEnt; + EHANDLE m_hOldGlowEnt; + CGlowObject *m_pGlowEffect; +#endif // GLOWS_ENABLE +}; + +extern CUtlVector< CHandle<C_TeamTrainWatcher> > g_hTrainWatchers; + +#endif //C_TEAM_TRAIN_WATCHER_H
\ No newline at end of file |