diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/client/hl2/c_basehlplayer.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/client/hl2/c_basehlplayer.h')
| -rw-r--r-- | mp/src/game/client/hl2/c_basehlplayer.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/mp/src/game/client/hl2/c_basehlplayer.h b/mp/src/game/client/hl2/c_basehlplayer.h new file mode 100644 index 00000000..78839389 --- /dev/null +++ b/mp/src/game/client/hl2/c_basehlplayer.h @@ -0,0 +1,81 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $NoKeywords: $
+//=============================================================================//
+
+#if !defined( C_BASEHLPLAYER_H )
+#define C_BASEHLPLAYER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "c_baseplayer.h"
+#include "c_hl2_playerlocaldata.h"
+
+class C_BaseHLPlayer : public C_BasePlayer
+{
+public:
+ DECLARE_CLASS( C_BaseHLPlayer, C_BasePlayer );
+ DECLARE_CLIENTCLASS();
+ DECLARE_PREDICTABLE();
+
+ C_BaseHLPlayer();
+
+ virtual void OnDataChanged( DataUpdateType_t updateType );
+
+ void Weapon_DropPrimary( void );
+
+ float GetFOV();
+ void Zoom( float FOVOffset, float time );
+ float GetZoom( void );
+ bool IsZoomed( void ) { return m_HL2Local.m_bZooming; }
+
+ bool IsSprinting( void ) { return m_HL2Local.m_bitsActiveDevices & bits_SUIT_DEVICE_SPRINT; }
+ bool IsFlashlightActive( void ) { return m_HL2Local.m_bitsActiveDevices & bits_SUIT_DEVICE_FLASHLIGHT; }
+ bool IsBreatherActive( void ) { return m_HL2Local.m_bitsActiveDevices & bits_SUIT_DEVICE_BREATHER; }
+
+ virtual int DrawModel( int flags );
+ virtual void BuildTransformations( CStudioHdr *hdr, Vector *pos, Quaternion q[], const matrix3x4_t& cameraTransform, int boneMask, CBoneBitList &boneComputed );
+
+ LadderMove_t *GetLadderMove() { return &m_HL2Local.m_LadderMove; }
+ virtual void ExitLadder();
+ bool IsSprinting() const { return m_fIsSprinting; }
+
+ // Input handling
+ virtual bool CreateMove( float flInputSampleTime, CUserCmd *pCmd );
+ void PerformClientSideObstacleAvoidance( float flFrameTime, CUserCmd *pCmd );
+ void PerformClientSideNPCSpeedModifiers( float flFrameTime, CUserCmd *pCmd );
+
+ bool IsWeaponLowered( void ) { return m_HL2Local.m_bWeaponLowered; }
+
+public:
+
+ C_HL2PlayerLocalData m_HL2Local;
+ EHANDLE m_hClosestNPC;
+ float m_flSpeedModTime;
+ bool m_fIsSprinting;
+
+private:
+ C_BaseHLPlayer( const C_BaseHLPlayer & ); // not defined, not accessible
+
+ bool TestMove( const Vector &pos, float fVertDist, float radius, const Vector &objPos, const Vector &objDir );
+
+ float m_flZoomStart;
+ float m_flZoomEnd;
+ float m_flZoomRate;
+ float m_flZoomStartTime;
+
+ bool m_bPlayUseDenySound; // Signaled by PlayerUse, but can be unset by HL2 ladder code...
+ float m_flSpeedMod;
+ float m_flExitSpeedMod;
+
+
+friend class CHL2GameMovement;
+};
+
+
+#endif
|