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.

80 lines
2.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "iclientvehicle.h"
  7. #include "vehicle_viewblend_shared.h"
  8. #ifndef C_VEHICLE_CRANE_H
  9. #define C_VEHICLE_CRANE_H
  10. #pragma once
  11. //-----------------------------------------------------------------------------
  12. // Purpose:
  13. //-----------------------------------------------------------------------------
  14. class C_PropCrane : public C_BaseAnimating, public IClientVehicle
  15. {
  16. DECLARE_CLASS( C_PropCrane, C_BaseAnimating );
  17. public:
  18. DECLARE_CLIENTCLASS();
  19. DECLARE_DATADESC();
  20. C_PropCrane();
  21. void PreDataUpdate( DataUpdateType_t updateType );
  22. void PostDataUpdate( DataUpdateType_t updateType );
  23. bool IsMagnetOn( void ) { return m_bMagnetOn; }
  24. public:
  25. // IClientVehicle overrides.
  26. virtual void GetVehicleViewPosition( int nRole, Vector *pOrigin, QAngle *pAngles, float *pFOV =NULL );
  27. virtual void GetVehicleFOV( float &flFOV ) { flFOV = 0.0f; }
  28. virtual void DrawHudElements();
  29. virtual bool IsPassengerUsingStandardWeapons( int nRole = VEHICLE_ROLE_DRIVER ) { return false; }
  30. virtual void UpdateViewAngles( C_BasePlayer *pLocalPlayer, CUserCmd *pCmd ) {}
  31. virtual C_BaseCombatCharacter* GetPassenger( int nRole );
  32. virtual int GetPassengerRole( C_BaseCombatCharacter *pPassenger );
  33. virtual void GetVehicleClipPlanes( float &flZNear, float &flZFar ) const;
  34. virtual int GetPrimaryAmmoType() const { return -1; }
  35. virtual int GetPrimaryAmmoCount() const { return -1; }
  36. virtual int GetPrimaryAmmoClip() const { return -1; }
  37. virtual bool PrimaryAmmoUsesClips() const { return false; }
  38. virtual int GetJoystickResponseCurve() const { return 0; }
  39. public:
  40. // C_BaseEntity overrides.
  41. virtual IClientVehicle* GetClientVehicle() { return this; }
  42. virtual C_BaseEntity *GetVehicleEnt() { return this; }
  43. virtual void SetupMove( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move ) {}
  44. virtual void ProcessMovement( C_BasePlayer *pPlayer, CMoveData *pMoveData ) {}
  45. virtual void FinishMove( C_BasePlayer *player, CUserCmd *ucmd, CMoveData *move ) {}
  46. virtual bool IsPredicted() const { return false; }
  47. virtual void ItemPostFrame( C_BasePlayer *pPlayer ) {}
  48. virtual bool IsSelfAnimating() { return false; };
  49. virtual void GetRenderBounds( Vector& theMins, Vector& theMaxs );
  50. private:
  51. CHandle<C_BasePlayer> m_hPlayer;
  52. CHandle<C_BasePlayer> m_hPrevPlayer;
  53. bool m_bEnterAnimOn;
  54. bool m_bExitAnimOn;
  55. Vector m_vecEyeExitEndpoint;
  56. bool m_bMagnetOn;
  57. Vector m_vecOldShadowDir;
  58. ViewSmoothingData_t m_ViewSmoothingData;
  59. };
  60. #endif // C_VEHICLE_CRANE_H