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/tf/clientmode_tf.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/tf/clientmode_tf.h')
| -rw-r--r-- | game/client/tf/clientmode_tf.h | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/game/client/tf/clientmode_tf.h b/game/client/tf/clientmode_tf.h new file mode 100644 index 0000000..fe98814 --- /dev/null +++ b/game/client/tf/clientmode_tf.h @@ -0,0 +1,161 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//============================================================================= + +#ifndef TF_CLIENTMODE_H +#define TF_CLIENTMODE_H +#ifdef _WIN32 +#pragma once +#endif + +#include "clientmode_shared.h" +#include "tf_viewport.h" +#include "GameUI/IGameUI.h" +#include "halloween/tf_weapon_spellbook.h" +#include "tf_hud_teamgoal_tournament.h" + +class CHudMenuEngyBuild; +class CHudMenuEngyDestroy; +class CHudMenuSpyDisguise; +class CTFFreezePanel; +class CItemQuickSwitchPanel; +class CHudEurekaEffectTeleportMenu; +class CHudMenuTauntSelection; +class CHudInspectPanel; +class CHudUpgradePanel; +#ifdef STAGING_ONLY +class CHudMenuSpyBuild; +#endif // STAGING_ONLY +#if defined( _X360 ) +class CTFClientScoreBoardDialog; +#endif + +class ClientModeTFNormal : public ClientModeShared +{ +DECLARE_CLASS( ClientModeTFNormal, ClientModeShared ); + +private: + +// IClientMode overrides. +public: + + ClientModeTFNormal(); + virtual ~ClientModeTFNormal(); + + virtual void Init(); + virtual void InitViewport(); + virtual void Shutdown(); + + virtual void LevelInit( const char *newmap ) OVERRIDE; + +// virtual int KeyInput( int down, ButtonCode_t keynum, const char *pszCurrentBinding ); + + virtual float GetViewModelFOV( void ); + virtual bool ShouldDrawViewModel(); + virtual bool ShouldDrawCrosshair( void ); + virtual bool ShouldBlackoutAroundHUD() OVERRIDE; + virtual HeadtrackMovementMode_t ShouldOverrideHeadtrackControl() OVERRIDE; + + int GetDeathMessageStartHeight( void ); + + virtual void FireGameEvent( IGameEvent *event ); + virtual void PostRenderVGui(); + + virtual bool CreateMove( float flInputSampleTime, CUserCmd *cmd ); + + virtual int HudElementKeyInput( int down, ButtonCode_t keynum, const char *pszCurrentBinding ); + virtual int HandleSpectatorKeyInput( int down, ButtonCode_t keynum, const char *pszCurrentBinding ); + + virtual bool DoPostScreenSpaceEffects( const CViewSetup *pSetup ); + virtual void Update(); + virtual void ComputeVguiResConditions( KeyValues *pkvConditions ) OVERRIDE; + + virtual bool IsInfoPanelAllowed() OVERRIDE; + virtual void InfoPanelDisplayed() OVERRIDE; + virtual bool IsHTMLInfoPanelAllowed() OVERRIDE; + + IGameUI *GameUI( void ) { return m_pGameUI; } + + const char *GetLastConnectedServerName( void ) const; // return the name of the last server we have connected to + uint32 GetLastConnectedServerIP( void ) const; // return the IP of the last server we have connected to + int GetLastConnectedServerPort( void ) const; // return the port of the last server we have connected to + + void PrintTextToChat( const char *pText, KeyValues *pKeyValues = NULL ); + void PrintTextToChatPlayer( int iPlayerIndex, const char *pText, KeyValues *pKeyValues = NULL ); + +#if !defined(NO_STEAM) + STEAM_CALLBACK_MANUAL( ClientModeTFNormal, OnScreenshotRequested, ScreenshotRequested_t, m_CallbackScreenshotRequested ); +#endif + + bool IsEngyBuildVisible() const; + bool IsEngyDestroyVisible() const; + bool IsEngyEurekaTeleportVisible() const; + bool IsSpyDisguiseVisible() const; + bool IsUpgradePanelVisible() const; + bool IsTauntSelectPanelVisible() const; + + virtual void OnDemoRecordStart( char const* pDemoBaseName ) OVERRIDE; + virtual void OnDemoRecordStop() OVERRIDE; + +private: + // void UpdateSpectatorMode( void ); + +private: + CHudMenuEngyBuild *m_pMenuEngyBuild; + CHudMenuEngyDestroy *m_pMenuEngyDestroy; + CHudMenuSpyDisguise *m_pMenuSpyDisguise; + CHudMenuTauntSelection *m_pMenuTauntSelection; + CHudUpgradePanel *m_pMenuUpgradePanel; +#ifdef STAGING_ONLY + CHudMenuSpyBuild *m_pMenuSpyBuild; +#endif // STAGING_ONLY + CHudSpellMenu *m_pMenuSpell; + CHudEurekaEffectTeleportMenu *m_pEurekaTeleportMenu; + CHudTeamGoalTournament *m_pTeamGoalTournament; + + CTFFreezePanel *m_pFreezePanel; + CItemQuickSwitchPanel *m_pQuickSwitch; + CHudInspectPanel *m_pInspectPanel; + IGameUI *m_pGameUI; + bool m_wasConnectedLastUpdate; + + char *m_lastServerName; + uint32 m_lastServerIP; + int m_lastServerPort; + uint32 m_lastServerConnectTime; + + float m_flNextAllowedHighFiveHintTime; + + bool m_bInfoPanelShown; + bool m_bRestrictInfoPanel; + + void AskFavoriteOrBlacklist() const; + +#if defined( _X360 ) + CTFClientScoreBoardDialog *m_pScoreboard; +#endif +}; + +inline const char *ClientModeTFNormal::GetLastConnectedServerName( void ) const +{ + return m_lastServerName; +} + +inline uint32 ClientModeTFNormal::GetLastConnectedServerIP( void ) const +{ + return m_lastServerIP; +} + +inline int ClientModeTFNormal::GetLastConnectedServerPort( void ) const +{ + return m_lastServerPort; +} + +extern IClientMode *GetClientModeNormal(); +extern ClientModeTFNormal* GetClientModeTFNormal(); + +void PlayOutOfGameSound( const char *pszSound ); +float PlaySoundEntry( const char* pszSoundEntryName ); // Returns the duration of the sound +#endif // TF_CLIENTMODE_H |