diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/hl2/c_vehicle_crane.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/hl2/c_vehicle_crane.h')
| -rw-r--r-- | game/client/hl2/c_vehicle_crane.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/game/client/hl2/c_vehicle_crane.h b/game/client/hl2/c_vehicle_crane.h new file mode 100644 index 0000000..81ca6d1 --- /dev/null +++ b/game/client/hl2/c_vehicle_crane.h @@ -0,0 +1,80 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#include "iclientvehicle.h" +#include "vehicle_viewblend_shared.h" + +#ifndef C_VEHICLE_CRANE_H +#define C_VEHICLE_CRANE_H +#pragma once + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +class C_PropCrane : public C_BaseAnimating, public IClientVehicle +{ + + DECLARE_CLASS( C_PropCrane, C_BaseAnimating ); + +public: + + DECLARE_CLIENTCLASS(); + DECLARE_DATADESC(); + + C_PropCrane(); + + void PreDataUpdate( DataUpdateType_t updateType ); + void PostDataUpdate( DataUpdateType_t updateType ); + + bool IsMagnetOn( void ) { return m_bMagnetOn; } + +public: + + // IClientVehicle overrides. + virtual void GetVehicleViewPosition( int nRole, Vector *pOrigin, QAngle *pAngles, float *pFOV =NULL ); + virtual void GetVehicleFOV( float &flFOV ) { flFOV = 0.0f; } + virtual void DrawHudElements(); + virtual bool IsPassengerUsingStandardWeapons( int nRole = VEHICLE_ROLE_DRIVER ) { return false; } + virtual void UpdateViewAngles( C_BasePlayer *pLocalPlayer, CUserCmd *pCmd ) {} + virtual C_BaseCombatCharacter* GetPassenger( int nRole ); + virtual int GetPassengerRole( C_BaseCombatCharacter *pPassenger ); + virtual void GetVehicleClipPlanes( float &flZNear, float &flZFar ) const; + virtual int GetPrimaryAmmoType() const { return -1; } + virtual int GetPrimaryAmmoCount() const { return -1; } + virtual int GetPrimaryAmmoClip() const { return -1; } + virtual bool PrimaryAmmoUsesClips() const { return false; } + virtual int GetJoystickResponseCurve() const { return 0; } + +public: + + // C_BaseEntity overrides. + virtual IClientVehicle* GetClientVehicle() { return this; } + virtual C_BaseEntity *GetVehicleEnt() { return this; } + virtual void SetupMove( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move ) {} + virtual void ProcessMovement( C_BasePlayer *pPlayer, CMoveData *pMoveData ) {} + virtual void FinishMove( C_BasePlayer *player, CUserCmd *ucmd, CMoveData *move ) {} + virtual bool IsPredicted() const { return false; } + virtual void ItemPostFrame( C_BasePlayer *pPlayer ) {} + virtual bool IsSelfAnimating() { return false; }; + virtual void GetRenderBounds( Vector& theMins, Vector& theMaxs ); + +private: + + CHandle<C_BasePlayer> m_hPlayer; + CHandle<C_BasePlayer> m_hPrevPlayer; + + bool m_bEnterAnimOn; + bool m_bExitAnimOn; + Vector m_vecEyeExitEndpoint; + + bool m_bMagnetOn; + + Vector m_vecOldShadowDir; + + ViewSmoothingData_t m_ViewSmoothingData; +}; + +#endif // C_VEHICLE_CRANE_H |