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. //=============================================================================//
  6. #ifndef POSITIONWATCHER_H
  7. #define POSITIONWATCHER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "ehandle.h"
  12. // inherit from this interface to be able to call WatchPositionChanges
  13. abstract_class IWatcherCallback
  14. {
  15. public:
  16. virtual ~IWatcherCallback() {}
  17. };
  18. abstract_class IPositionWatcher : public IWatcherCallback
  19. {
  20. public:
  21. virtual void NotifyPositionChanged( CBaseEntity *pEntity ) = 0;
  22. };
  23. // NOTE: The table of watchers is NOT saved/loaded! Recreate these links on restore
  24. void ReportPositionChanged( CBaseEntity *pMovedEntity );
  25. void WatchPositionChanges( CBaseEntity *pWatcher, CBaseEntity *pMovingEntity );
  26. void RemovePositionWatcher( CBaseEntity *pWatcher, CBaseEntity *pMovingEntity );
  27. // inherit from this interface to be able to call WatchPositionChanges
  28. abstract_class IVPhysicsWatcher : public IWatcherCallback
  29. {
  30. public:
  31. virtual void NotifyVPhysicsStateChanged( IPhysicsObject *pPhysics, CBaseEntity *pEntity, bool bAwake ) = 0;
  32. };
  33. // NOTE: The table of watchers is NOT saved/loaded! Recreate these links on restore
  34. void ReportVPhysicsStateChanged( IPhysicsObject *pPhysics, CBaseEntity *pEntity, bool bAwake );
  35. void WatchVPhysicsStateChanges( CBaseEntity *pWatcher, CBaseEntity *pPhysicsEntity );
  36. void RemoveVPhysicsStateWatcher( CBaseEntity *pWatcher, CBaseEntity *pPhysicsEntity );
  37. #endif // POSITIONWATCHER_H