blob: bcc23f6e11c416a7269671a3babb8eddcd5ee59d (
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
52
53
54
55
56
|
//========= Copyright Valve Corporation, All rights reserved. ============//
// NextBot paths that go through this entity must fulfill the given prerequisites to pass
// Michael Booth, August 2009
#ifndef FUNC_NAV_PREREQUISITE_H
#define FUNC_NAV_PREREQUISITE_H
#include "triggers.h"
/**
* NextBot paths that pass through this entity must fulfill the given prerequisites to pass
*/
DECLARE_AUTO_LIST( IFuncNavPrerequisiteAutoList );
class CFuncNavPrerequisite : public CBaseTrigger, public IFuncNavPrerequisiteAutoList
{
DECLARE_CLASS( CFuncNavPrerequisite, CBaseTrigger );
public:
CFuncNavPrerequisite();
DECLARE_DATADESC();
virtual void Spawn( void );
enum TaskType
{
TASK_NONE = 0,
TASK_DESTROY_ENTITY = 1,
TASK_MOVE_TO_ENTITY = 2,
TASK_WAIT = 3,
};
bool IsTask( TaskType type ) const;
CBaseEntity *GetTaskEntity( void );
float GetTaskValue( void ) const;
void InputEnable( inputdata_t &inputdata );
void InputDisable( inputdata_t &inputdata );
bool IsEnabled( void ) const { return !m_isDisabled; }
protected:
int m_task;
string_t m_taskEntityName;
float m_taskValue;
bool m_isDisabled;
EHANDLE m_hTaskEntity;
};
inline float CFuncNavPrerequisite::GetTaskValue( void ) const
{
return m_taskValue;
}
#endif // FUNC_NAV_PREREQUISITE_H
|