Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IVEHICLE_H
  8. #define IVEHICLE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "baseplayer_shared.h"
  13. class CUserCmd;
  14. class IMoveHelper;
  15. class CMoveData;
  16. class CBaseCombatCharacter;
  17. // This is used by the player to access vehicles. It's an interface so the
  18. // vehicles are not restricted in what they can derive from.
  19. abstract_class IVehicle
  20. {
  21. public:
  22. // Get and set the current driver. Use PassengerRole_t enum in shareddefs.h for adding passengers
  23. virtual CBaseCombatCharacter* GetPassenger( int nRole = VEHICLE_ROLE_DRIVER ) = 0;
  24. virtual int GetPassengerRole( CBaseCombatCharacter *pPassenger ) = 0;
  25. // Where is the passenger seeing from?
  26. virtual void GetVehicleViewPosition( int nRole, Vector *pOrigin, QAngle *pAngles, float *pFOV = NULL ) = 0;
  27. // Does the player use his normal weapons while in this mode?
  28. virtual bool IsPassengerUsingStandardWeapons( int nRole = VEHICLE_ROLE_DRIVER ) = 0;
  29. // Process movement
  30. virtual void SetupMove( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move ) = 0;
  31. virtual void ProcessMovement( CBasePlayer *pPlayer, CMoveData *pMoveData ) = 0;
  32. virtual void FinishMove( CBasePlayer *player, CUserCmd *ucmd, CMoveData *move ) = 0;
  33. // Process input
  34. virtual void ItemPostFrame( CBasePlayer *pPlayer ) = 0;
  35. };
  36. #endif // IVEHICLE_H