blob: d8d6cde25440432b5c0f9295f4fc5756f115d1e9 (
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
////////////////////////////////////////////////////////////////////////////////////////////////////
// tf_bot_training.h
//
// Misc. training actions/behaviors. To be split up into separate files when we deem them "re-usable"
//
// Tom Bui, April 2010
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef TF_BOT_TRAINING_H
#define TF_BOT_TRAINING_H
////////////////////////////////////////////////////////////////////////////////////////////////////
// Attempts to kick/despawn the bot in the Update()
class CTFDespawn : public Action< CTFBot >
{
public:
virtual ActionResult< CTFBot > Update( CTFBot *me, float interval );
virtual const char *GetName( void ) const { return "Despawn"; };
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Simple behavior for training where the bot approaches action point and tries to fire at it (and anything there)
class CTFTrainingAttackSentryActionPoint : public Action< CTFBot >
{
public:
virtual ActionResult< CTFBot > Update( CTFBot *me, float interval );
virtual const char *GetName( void ) const { return "Despawn"; };
private:
CountdownTimer m_repathTimer;
PathFollower m_path;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Tells a bot to go an Action Point and run any command it has
class CTFGotoActionPoint : public Action< CTFBot >
{
public:
virtual ActionResult< CTFBot > OnStart( CTFBot *me, Action< CTFBot > *priorAction );
virtual ActionResult< CTFBot > Update( CTFBot *me, float interval );
virtual const char *GetName( void ) const { return "GotoActionPoint"; };
private:
CountdownTimer m_stayTimer;
CountdownTimer m_repathTimer;
PathFollower m_path;
bool m_wasTeleported;
};
#endif // TF_BOT_TRAINING_H
|