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.

65 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef C_VEHICLE_JEEP_H
  7. #define C_VEHICLE_JEEP_H
  8. #pragma once
  9. #include "cbase.h"
  10. #include "c_prop_vehicle.h"
  11. //#include "movevars_shared.h"
  12. //#include "view.h"
  13. #include "flashlighteffect.h"
  14. //#include "c_baseplayer.h"
  15. //#include "c_te_effect_dispatch.h"
  16. // memdbgon must be the last include file in a .cpp file!!!
  17. //#include "tier0/memdbgon.h"
  18. //=============================================================================
  19. //
  20. // Client-side Jeep Class
  21. //
  22. class C_PropJeep : public C_PropVehicleDriveable
  23. {
  24. DECLARE_CLASS( C_PropJeep, C_PropVehicleDriveable );
  25. public:
  26. DECLARE_CLIENTCLASS();
  27. DECLARE_INTERPOLATION();
  28. C_PropJeep();
  29. ~C_PropJeep();
  30. public:
  31. void UpdateViewAngles( C_BasePlayer *pLocalPlayer, CUserCmd *pCmd );
  32. void DampenEyePosition( Vector &vecVehicleEyePos, QAngle &vecVehicleEyeAngles );
  33. void OnEnteredVehicle( C_BasePlayer *pPlayer );
  34. bool Simulate( void );
  35. private:
  36. void DampenForwardMotion( Vector &vecVehicleEyePos, QAngle &vecVehicleEyeAngles, float flFrameTime );
  37. void DampenUpMotion( Vector &vecVehicleEyePos, QAngle &vecVehicleEyeAngles, float flFrameTime );
  38. void ComputePDControllerCoefficients( float *pCoefficientsOut, float flFrequency, float flDampening, float flDeltaTime );
  39. private:
  40. Vector m_vecLastEyePos;
  41. Vector m_vecLastEyeTarget;
  42. Vector m_vecEyeSpeed;
  43. Vector m_vecTargetSpeed;
  44. float m_flViewAngleDeltaTime;
  45. float m_flJeepFOV;
  46. CHeadlightEffect *m_pHeadlight;
  47. bool m_bHeadlightIsOn;
  48. };
  49. #endif // C_VEHICLE_JEEP_H