diff options
Diffstat (limited to 'game/shared/dod/dod_viewmodel.h')
| -rw-r--r-- | game/shared/dod/dod_viewmodel.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/game/shared/dod/dod_viewmodel.h b/game/shared/dod/dod_viewmodel.h new file mode 100644 index 0000000..4192a78 --- /dev/null +++ b/game/shared/dod/dod_viewmodel.h @@ -0,0 +1,60 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//============================================================================= + +#ifndef DOD_VIEWMODEL_H +#define DOD_VIEWMODEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include "predictable_entity.h" +#include "utlvector.h" +#include "baseplayer_shared.h" +#include "shared_classnames.h" + +#if defined( CLIENT_DLL ) +#define CDODViewModel C_DODViewModel +#endif + +class CDODViewModel : public CBaseViewModel +{ + DECLARE_CLASS( CDODViewModel, CBaseViewModel ); +public: + + DECLARE_NETWORKCLASS(); + + CDODViewModel( void ); + ~CDODViewModel( void ); + + virtual void CalcViewModelLag( Vector& origin, QAngle& angles, QAngle& original_angles ); + virtual void CalcViewModelView( CBasePlayer *owner, const Vector& eyePosition, const QAngle& eyeAngles ); + +#if defined( CLIENT_DLL ) + virtual bool ShouldPredict( void ) + { + if ( GetOwner() && GetOwner() == C_BasePlayer::GetLocalPlayer() ) + return true; + + return BaseClass::ShouldPredict(); + } +#endif + +private: + +#if defined( CLIENT_DLL ) + + // This is used to lag the angles. + CInterpolatedVar<QAngle> m_LagAnglesHistory; + QAngle m_vLagAngles; + + CDODViewModel( const CDODViewModel & ); // not defined, not accessible + + QAngle m_vLoweredWeaponOffset; +#endif +}; + +#endif // DOD_VIEWMODEL_H |