You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
997 B
40 lines
997 B
//========= 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
|
|
|