blob: 6b36b33f42025dc0dce13ba21dcae4220c4125eb (
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
// tf_bot_use_teleporter.h
// Ride a friendly teleporter
// Michael Booth, May 2010
#ifndef TF_BOT_USE_TELEPORTER_H
#define TF_BOT_USE_TELEPORTER_H
#include "tf_obj_teleporter.h"
#include "Path/NextBotPathFollow.h"
class CTFBotUseTeleporter : public Action< CTFBot >
{
public:
enum UseHowType
{
USE_IF_READY,
ALWAYS_USE
};
CTFBotUseTeleporter( CObjectTeleporter *teleporter, UseHowType how = USE_IF_READY );
virtual ActionResult< CTFBot > OnStart( CTFBot *me, Action< CTFBot > *priorAction );
virtual ActionResult< CTFBot > Update( CTFBot *me, float interval );
virtual const char *GetName( void ) const { return "UseTeleporter"; };
private:
CHandle< CObjectTeleporter > m_teleporter; // the teleporter we're trying to use
UseHowType m_how;
PathFollower m_path;
CountdownTimer m_repathTimer;
bool m_isInTransit;
bool IsTeleporterAvailable( void ) const;
};
#endif // TF_BOT_USE_TELEPORTER_H
|