Counter Strike : Global Offensive Source Code
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.

46 lines
1.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef ILAGCOMPENSATIONMANAGER_H
  8. #define ILAGCOMPENSATIONMANAGER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. class CBasePlayer;
  13. class CUserCmd;
  14. enum LagCompensationType
  15. {
  16. LAG_COMPENSATE_BOUNDS,
  17. LAG_COMPENSATE_HITBOXES,
  18. LAG_COMPENSATE_HITBOXES_ALONG_RAY,
  19. };
  20. //-----------------------------------------------------------------------------
  21. // Purpose: This is also an IServerSystem
  22. //-----------------------------------------------------------------------------
  23. abstract_class ILagCompensationManager
  24. {
  25. public:
  26. // Called during player movement to set up/restore after lag compensation
  27. virtual void StartLagCompensation(
  28. CBasePlayer *player,
  29. LagCompensationType lagCompensationType,
  30. const Vector& weaponPos = vec3_origin,
  31. const QAngle &weaponAngles = vec3_angle,
  32. float weaponRange = 0.0f ) = 0;
  33. virtual void FinishLagCompensation( CBasePlayer *player ) = 0;
  34. // Mappers can flag certain additional entities to lag compensate, this handles them
  35. virtual void AddAdditionalEntity( CBaseEntity *pEntity ) = 0;
  36. virtual void RemoveAdditionalEntity( CBaseEntity *pEntity ) = 0;
  37. };
  38. extern ILagCompensationManager *lagcompensation;
  39. #endif // ILAGCOMPENSATIONMANAGER_H