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.

93 lines
2.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef C_OBJ_TELEPORTER_H
  8. #define C_OBJ_TELEPORTER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "c_baseobject.h"
  13. #include "ObjectControlPanel.h"
  14. class C_ObjectTeleporter : public C_BaseObject
  15. {
  16. DECLARE_CLASS( C_ObjectTeleporter, C_BaseObject );
  17. public:
  18. DECLARE_CLIENTCLASS();
  19. C_ObjectTeleporter();
  20. virtual void OnPreDataChanged( DataUpdateType_t updateType );
  21. virtual void OnDataChanged( DataUpdateType_t updateType );
  22. virtual void GetTargetIDDataString( OUT_Z_BYTECAP(iMaxLenInBytes) wchar_t *sDataString, int iMaxLenInBytes );
  23. virtual void ClientThink( void );
  24. virtual void UpdateOnRemove();
  25. virtual CStudioHdr *OnNewModel( void );
  26. virtual bool IsPlacementPosValid( void );
  27. float GetChargeTime( void );
  28. float GetCurrentRechargeDuration( void ) { return m_flCurrentRechargeDuration; }
  29. int GetState( void ) { return m_iState; }
  30. int GetTimesUsed( void );
  31. void StartChargedEffects( void );
  32. void StopChargedEffects( void );
  33. void StartActiveEffects( void );
  34. void StopActiveEffects( void );
  35. void StartBuildingEffects( void );
  36. void StopBuildingEffects( void );
  37. virtual void SetInvisibilityLevel( float flValue );
  38. void UpdateTeleporterEffects( void );
  39. virtual void UpdateDamageEffects( BuildingDamageLevel_t damageLevel );
  40. virtual int GetUpgradeLevel( void ) { return m_iUpgradeLevel; }
  41. int GetUpgradeMetal( void ) { return m_iUpgradeMetal; }
  42. //virtual int GetUpgradeMetalRequired( void ) { return GetObjectInfo( GetType() )->m_UpgradeCost; }
  43. virtual void UpgradeLevelChanged( void );
  44. virtual void OnGoInactive( void ) OVERRIDE;
  45. private:
  46. int m_iState;
  47. int m_iOldState;
  48. float m_flRechargeTime;
  49. float m_flCurrentRechargeDuration;
  50. int m_iTimesUsed;
  51. float m_flYawToExit;
  52. bool m_bMatchBuilding;
  53. bool m_bOldMatchBuilding;
  54. int m_iDirectionArrowPoseParam;
  55. HPARTICLEFFECT m_hChargedEffect;
  56. HPARTICLEFFECT m_hDirectionEffect;
  57. HPARTICLEFFECT m_hChargedLeftArmEffect;
  58. HPARTICLEFFECT m_hChargedRightArmEffect;
  59. HPARTICLEFFECT m_hBuildingLeftArmEffect;
  60. HPARTICLEFFECT m_hBuildingRightArmEffect;
  61. CSoundPatch *m_pSpinSound;
  62. private:
  63. C_ObjectTeleporter( const C_ObjectTeleporter & ); // not defined, not accessible
  64. };
  65. #endif //C_OBJ_TELEPORTER_H