blob: 7e01c0f205c5768ace37e194005b29f9b75e5cb1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
|