diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/positionwatcher.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/shared/positionwatcher.h')
| -rw-r--r-- | game/shared/positionwatcher.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/game/shared/positionwatcher.h b/game/shared/positionwatcher.h new file mode 100644 index 0000000..7e01c0f --- /dev/null +++ b/game/shared/positionwatcher.h @@ -0,0 +1,47 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef POSITIONWATCHER_H +#define POSITIONWATCHER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "ehandle.h" + +// inherit from this interface to be able to call WatchPositionChanges +abstract_class IWatcherCallback +{ +public: + virtual ~IWatcherCallback() {} +}; + +abstract_class IPositionWatcher : public IWatcherCallback +{ +public: + virtual void NotifyPositionChanged( CBaseEntity *pEntity ) = 0; +}; + +// NOTE: The table of watchers is NOT saved/loaded! Recreate these links on restore +void ReportPositionChanged( CBaseEntity *pMovedEntity ); +void WatchPositionChanges( CBaseEntity *pWatcher, CBaseEntity *pMovingEntity ); +void RemovePositionWatcher( CBaseEntity *pWatcher, CBaseEntity *pMovingEntity ); + + +// inherit from this interface to be able to call WatchPositionChanges +abstract_class IVPhysicsWatcher : public IWatcherCallback +{ +public: + virtual void NotifyVPhysicsStateChanged( IPhysicsObject *pPhysics, CBaseEntity *pEntity, bool bAwake ) = 0; +}; + +// NOTE: The table of watchers is NOT saved/loaded! Recreate these links on restore +void ReportVPhysicsStateChanged( IPhysicsObject *pPhysics, CBaseEntity *pEntity, bool bAwake ); +void WatchVPhysicsStateChanges( CBaseEntity *pWatcher, CBaseEntity *pPhysicsEntity ); +void RemoveVPhysicsStateWatcher( CBaseEntity *pWatcher, CBaseEntity *pPhysicsEntity ); + + +#endif // POSITIONWATCHER_H |