summaryrefslogtreecommitdiff
path: root/game/server/portal/PhysicsCloneArea.h
blob: e09b5c2d6324b68fa68724c14425266240bdcde1 (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
48
49
50
51
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef PHYSICSCLONEAREA_H
#define PHYSICSCLONEAREA_H

#ifdef _WIN32
#pragma once
#endif

#include "baseentity.h"

class CProp_Portal;
class CPortalSimulator;

class CPhysicsCloneArea : public CBaseEntity
{
public:
	DECLARE_CLASS( CPhysicsCloneArea, CBaseEntity );

	static const Vector		vLocalMins;
	static const Vector		vLocalMaxs;

	virtual void			StartTouch( CBaseEntity *pOther );
	virtual void			Touch( CBaseEntity *pOther ); 
	virtual void			EndTouch( CBaseEntity *pOther );

	virtual void			Spawn( void );
	virtual void			Activate( void );

	virtual int				ObjectCaps( void );
	void					UpdatePosition( void );

	void					CloneTouchingEntities( void );
	void					CloneNearbyEntities( void );
	static CPhysicsCloneArea *CreatePhysicsCloneArea( CProp_Portal *pFollowPortal );	
private:

	CProp_Portal			*m_pAttachedPortal;
	CPortalSimulator		*m_pAttachedSimulator;
	bool					m_bActive;


};

#endif //#ifndef PHYSICSCLONEAREA_H