Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef C_PROP_SFR_VEHICLE_H
- #define C_PROP_SFR_VEHICLE_H
- /*
- */
- #include "IClientVehicle.h"
- #include "c_physicsprop.h"
- #include "vehicle_viewblend_shared.h"
- #include "physpropclientside.h"
- class C_PropSFRVehicle : public C_BaseAnimating/*C_PhysicsPropMultiplayer*/, public IClientVehicle
- {
- DECLARE_CLASS( C_PropSFRVehicle, C_BaseAnimating/*C_PhysicsPropMultiplayer*/ );
- public:
- DECLARE_CLIENTCLASS();
- //DECLARE_DATADESC();
- C_PropSFRVehicle();
- // C_BaseEntity overrides.
- public:
- virtual ShadowType_t ShadowCastType();
- virtual void ClientThink( void );
- // IVehicle overrides.
- public:
- virtual IClientVehicle* GetClientVehicle() { return this; }
- virtual C_BaseCombatCharacter* GetPassenger( int nRole );
- virtual int GetPassengerRole( C_BaseCombatCharacter *pEnt );
- virtual bool IsPassengerUsingStandardWeapons( int nRole = VEHICLE_ROLE_DRIVER ) { return false; }
- virtual void SetupMove( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move ) { DriveVehicle( TICK_INTERVAL, ucmd, player->m_afButtonPressed, player->m_afButtonReleased ); }
- virtual void ProcessMovement( C_BasePlayer *pPlayer, CMoveData *pMoveData ) {}
- virtual void FinishMove( C_BasePlayer *player, CUserCmd *ucmd, CMoveData *move ) {}
- virtual void ItemPostFrame( C_BasePlayer *pPlayer ){}
- virtual void GetVehicleViewPosition( int nRole, Vector *pOrigin, QAngle *pAngles, float *pFOV = NULL );
- // IClientVehicle overrides.
- public:
- virtual void GetVehicleFOV( float &flFOV ) {flFOV = 75.0f;}
- virtual void UpdateViewAngles( C_BasePlayer *pLocalPlayer, CUserCmd *pCmd );
- virtual void DrawHudElements();
- virtual bool IsPredicted() const {return true;}
- virtual C_BaseEntity *GetVehicleEnt() { return this; }
- virtual void GetVehicleClipPlanes( float &flZNear, float &flZFar ) const;
- virtual int GetJoystickResponseCurve() const;
- //C_PropSFRVehicle
- protected:
- virtual void OnEnteredVehicle( C_BaseCombatCharacter *pPassenger );
- virtual void DriveVehicle( float flFrameTime, CUserCmd *ucmd, int iButtonsDown, int iButtonsReleased ){} // Driving Button handling
- //On/Off
- void TurnOn(){ m_bIsOn = true; }
- void TurnOff(){ m_bIsOn = false; }
- bool IsOn(){return m_bIsOn;}
- protected:
- CHandle<C_BasePlayer> m_hPlayer;
- bool m_bIsOn;
- };
- class C_PropSFRVehicleWithViewSmoothing : public C_PropSFRVehicle
- {
- public:
- DECLARE_CLASS( C_PropSFRVehicleWithViewSmoothing, C_PropSFRVehicle );
- DECLARE_DATADESC();
- C_PropSFRVehicleWithViewSmoothing();
- virtual void GetVehicleViewPosition( int nRole, Vector *pOrigin, QAngle *pAngles, float *pFOV = NULL );
- virtual void DampenEyePosition( Vector &vecVehicleEyePos, QAngle &vecVehicleEyeAngles );
- protected:
- ViewSmoothingData_t m_ViewSmoothingData;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment