summaryrefslogtreecommitdiff
path: root/game/server/tf/bot/map_entities/tf_bot_hint_entity.h
blob: af0df70c717377e110d61573458b4e0ef036d8a7 (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
57
58
59
//========= Copyright Valve Corporation, All rights reserved. ============//
//
//
//
//=============================================================================
#ifndef TF_BOT_HINT_ENTITY_H
#define TF_BOT_HINT_ENTITY_H

DECLARE_AUTO_LIST( ITFBotHintEntityAutoList );

class CBaseTFBotHintEntity : public CPointEntity, public ITFBotHintEntityAutoList
{
	DECLARE_CLASS( CBaseTFBotHintEntity, CPointEntity );
public:
	DECLARE_DATADESC();

	CBaseTFBotHintEntity( void );
	virtual ~CBaseTFBotHintEntity() { }

	enum HintType
	{
		HINT_INVALID = -1,
		HINT_TELEPORTER_EXIT,
		HINT_SENTRYGUN,
		HINT_ENGINEER_NEST,
	};
	virtual HintType GetHintType() const = 0;
	bool IsHintType( HintType hintType ) { return GetHintType() == hintType; }

	bool OwnerObjectHasNoOwner() const;
	bool OwnerObjectFinishBuilding() const;

	bool IsEnabled() const;
	void InputEnable( inputdata_t &inputdata );
	void InputDisable( inputdata_t &inputdata );

private:

	bool m_isDisabled;
	HintType m_hintType;
};


inline void CBaseTFBotHintEntity::InputEnable( inputdata_t &inputdata )
{
	m_isDisabled = false;
}

inline void CBaseTFBotHintEntity::InputDisable( inputdata_t &inputdata )
{
	m_isDisabled = true;
}

inline bool CBaseTFBotHintEntity::IsEnabled() const
{
	return !m_isDisabled;
}

#endif // TF_BOT_HINT_ENTITY_H