summaryrefslogtreecommitdiff
path: root/game/server/tf/bot/behavior/scenario/raid/tf_bot_wander.h
blob: 03649033519056205d345280c5b1d219ab82b924 (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. ============//
// tf_bot_wander.h
// Wanderering/idle enemies for Squad Co-op mode
// Michael Booth, October 2009

#ifndef TF_BOT_WANDER_H
#define TF_BOT_WANDER_H

#ifdef TF_RAID_MODE

//-----------------------------------------------------------------------------
class CTFBotWander : public Action< CTFBot >
{
public:
	CTFBotWander( void );

	virtual ActionResult< CTFBot >	OnStart( CTFBot *me, Action< CTFBot > *priorAction );
	virtual ActionResult< CTFBot >	Update( CTFBot *me, float interval );

	virtual EventDesiredResult< CTFBot > OnContact( CTFBot *me, CBaseEntity *other, CGameTrace *result = NULL );
	virtual EventDesiredResult< CTFBot > OnInjured( CTFBot *me, const CTakeDamageInfo &info );
	virtual EventDesiredResult< CTFBot > OnOtherKilled( CTFBot *me, CBaseCombatCharacter *victim, const CTakeDamageInfo &info );

	virtual EventDesiredResult< CTFBot > OnCommandAttack( CTFBot *me, CBaseEntity *victim );

	virtual QueryResultType ShouldHurry( const INextBot *me ) const;					// are we in a hurry?
	virtual QueryResultType	ShouldRetreat( const INextBot *me ) const;							// is it time to retreat?

	virtual const char *GetName( void ) const	{ return "Wander"; };

private:
	CountdownTimer m_visionTimer;
	CountdownTimer m_vocalizeTimer;
};


inline QueryResultType CTFBotWander::ShouldHurry( const INextBot *me ) const
{
	return ANSWER_YES;
}


inline QueryResultType CTFBotWander::ShouldRetreat( const INextBot *me ) const
{
	return ANSWER_NO;
}


#endif TF_RAID_MODE

#endif // TF_BOT_WANDER_H