diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/server/sdk/sdk_player.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/server/sdk/sdk_player.h')
| -rw-r--r-- | mp/src/game/server/sdk/sdk_player.h | 202 |
1 files changed, 101 insertions, 101 deletions
diff --git a/mp/src/game/server/sdk/sdk_player.h b/mp/src/game/server/sdk/sdk_player.h index efac7ec1..cb93a037 100644 --- a/mp/src/game/server/sdk/sdk_player.h +++ b/mp/src/game/server/sdk/sdk_player.h @@ -1,101 +1,101 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Player for SDK Game
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#ifndef SDK_PLAYER_H
-#define SDK_PLAYER_H
-#pragma once
-
-
-#include "player.h"
-#include "server_class.h"
-#include "sdk_playeranimstate.h"
-#include "sdk_shareddefs.h"
-
-
-//=============================================================================
-// >> SDK Game player
-//=============================================================================
-class CSDKPlayer : public CBasePlayer, public ISDKPlayerAnimStateHelpers
-{
-public:
- DECLARE_CLASS( CSDKPlayer, CBasePlayer );
- DECLARE_SERVERCLASS();
- DECLARE_PREDICTABLE();
- DECLARE_DATADESC();
-
- CSDKPlayer();
- ~CSDKPlayer();
-
- static CSDKPlayer *CreatePlayer( const char *className, edict_t *ed );
- static CSDKPlayer* Instance( int iEnt );
-
- // This passes the event to the client's and server's CPlayerAnimState.
- void DoAnimationEvent( PlayerAnimEvent_t event, int nData = 0 );
-
- virtual void FlashlightTurnOn( void );
- virtual void FlashlightTurnOff( void );
- virtual int FlashlightIsOn( void );
-
- virtual void PreThink();
- virtual void PostThink();
- virtual void Spawn();
- virtual void InitialSpawn();
- virtual void Precache();
- virtual void Event_Killed( const CTakeDamageInfo &info );
- virtual void LeaveVehicle( const Vector &vecExitPoint, const QAngle &vecExitAngles );
-
- CWeaponSDKBase* GetActiveSDKWeapon() const;
- virtual void CreateViewModel( int viewmodelindex = 0 );
-
- virtual void CheatImpulseCommands( int iImpulse );
-
- CNetworkVar( int, m_iThrowGrenadeCounter ); // used to trigger grenade throw animations.
- CNetworkQAngle( m_angEyeAngles ); // Copied from EyeAngles() so we can send it to the client.
- CNetworkVar( int, m_iShotsFired ); // number of shots fired recently
-
- // Tracks our ragdoll entity.
- CNetworkHandle( CBaseEntity, m_hRagdoll ); // networked entity handle
-
-// In shared code.
-public:
- // ISDKPlayerAnimState overrides.
- virtual CWeaponSDKBase* SDKAnim_GetActiveWeapon();
- virtual bool SDKAnim_CanMove();
-
-
- void FireBullet(
- Vector vecSrc,
- const QAngle &shootAngles,
- float vecSpread,
- int iDamage,
- int iBulletType,
- CBaseEntity *pevAttacker,
- bool bDoEffects,
- float x,
- float y );
-
-private:
-
- void CreateRagdollEntity();
-
- ISDKPlayerAnimState *m_PlayerAnimState;
-};
-
-
-inline CSDKPlayer *ToSDKPlayer( CBaseEntity *pEntity )
-{
- if ( !pEntity || !pEntity->IsPlayer() )
- return NULL;
-
-#ifdef _DEBUG
- Assert( dynamic_cast<CSDKPlayer*>( pEntity ) != 0 );
-#endif
- return static_cast< CSDKPlayer* >( pEntity );
-}
-
-
-#endif // SDK_PLAYER_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Player for SDK Game +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef SDK_PLAYER_H +#define SDK_PLAYER_H +#pragma once + + +#include "player.h" +#include "server_class.h" +#include "sdk_playeranimstate.h" +#include "sdk_shareddefs.h" + + +//============================================================================= +// >> SDK Game player +//============================================================================= +class CSDKPlayer : public CBasePlayer, public ISDKPlayerAnimStateHelpers +{ +public: + DECLARE_CLASS( CSDKPlayer, CBasePlayer ); + DECLARE_SERVERCLASS(); + DECLARE_PREDICTABLE(); + DECLARE_DATADESC(); + + CSDKPlayer(); + ~CSDKPlayer(); + + static CSDKPlayer *CreatePlayer( const char *className, edict_t *ed ); + static CSDKPlayer* Instance( int iEnt ); + + // This passes the event to the client's and server's CPlayerAnimState. + void DoAnimationEvent( PlayerAnimEvent_t event, int nData = 0 ); + + virtual void FlashlightTurnOn( void ); + virtual void FlashlightTurnOff( void ); + virtual int FlashlightIsOn( void ); + + virtual void PreThink(); + virtual void PostThink(); + virtual void Spawn(); + virtual void InitialSpawn(); + virtual void Precache(); + virtual void Event_Killed( const CTakeDamageInfo &info ); + virtual void LeaveVehicle( const Vector &vecExitPoint, const QAngle &vecExitAngles ); + + CWeaponSDKBase* GetActiveSDKWeapon() const; + virtual void CreateViewModel( int viewmodelindex = 0 ); + + virtual void CheatImpulseCommands( int iImpulse ); + + CNetworkVar( int, m_iThrowGrenadeCounter ); // used to trigger grenade throw animations. + CNetworkQAngle( m_angEyeAngles ); // Copied from EyeAngles() so we can send it to the client. + CNetworkVar( int, m_iShotsFired ); // number of shots fired recently + + // Tracks our ragdoll entity. + CNetworkHandle( CBaseEntity, m_hRagdoll ); // networked entity handle + +// In shared code. +public: + // ISDKPlayerAnimState overrides. + virtual CWeaponSDKBase* SDKAnim_GetActiveWeapon(); + virtual bool SDKAnim_CanMove(); + + + void FireBullet( + Vector vecSrc, + const QAngle &shootAngles, + float vecSpread, + int iDamage, + int iBulletType, + CBaseEntity *pevAttacker, + bool bDoEffects, + float x, + float y ); + +private: + + void CreateRagdollEntity(); + + ISDKPlayerAnimState *m_PlayerAnimState; +}; + + +inline CSDKPlayer *ToSDKPlayer( CBaseEntity *pEntity ) +{ + if ( !pEntity || !pEntity->IsPlayer() ) + return NULL; + +#ifdef _DEBUG + Assert( dynamic_cast<CSDKPlayer*>( pEntity ) != 0 ); +#endif + return static_cast< CSDKPlayer* >( pEntity ); +} + + +#endif // SDK_PLAYER_H |