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.

53 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "prediction.h"
  9. #include "c_baseplayer.h"
  10. #include "igamemovement.h"
  11. static CMoveData g_MoveData;
  12. CMoveData *g_pMoveData = &g_MoveData;
  13. class CTFCPrediction : public CPrediction
  14. {
  15. DECLARE_CLASS( CTFCPrediction, CPrediction );
  16. public:
  17. virtual void SetupMove( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move );
  18. virtual void FinishMove( C_BasePlayer *player, CUserCmd *ucmd, CMoveData *move );
  19. };
  20. //-----------------------------------------------------------------------------
  21. // Purpose:
  22. //-----------------------------------------------------------------------------
  23. void CTFCPrediction::SetupMove( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper,
  24. CMoveData *move )
  25. {
  26. // Call the default SetupMove code.
  27. BaseClass::SetupMove( player, ucmd, pHelper, move );
  28. }
  29. //-----------------------------------------------------------------------------
  30. // Purpose:
  31. //-----------------------------------------------------------------------------
  32. void CTFCPrediction::FinishMove( C_BasePlayer *player, CUserCmd *ucmd, CMoveData *move )
  33. {
  34. // Call the default FinishMove code.
  35. BaseClass::FinishMove( player, ucmd, move );
  36. }
  37. // Expose interface to engine
  38. // Expose interface to engine
  39. static CTFCPrediction g_Prediction;
  40. EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CTFCPrediction, IPrediction, VCLIENT_PREDICTION_INTERFACE_VERSION, g_Prediction );
  41. CPrediction *prediction = &g_Prediction;