diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/tf/bot/behavior/scenario/raid/tf_bot_companion.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/tf/bot/behavior/scenario/raid/tf_bot_companion.h')
| -rw-r--r-- | game/server/tf/bot/behavior/scenario/raid/tf_bot_companion.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/game/server/tf/bot/behavior/scenario/raid/tf_bot_companion.h b/game/server/tf/bot/behavior/scenario/raid/tf_bot_companion.h new file mode 100644 index 0000000..e379b0b --- /dev/null +++ b/game/server/tf/bot/behavior/scenario/raid/tf_bot_companion.h @@ -0,0 +1,57 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// tf_bot_companion.h +// Teammate bots for Raid mode +// Michael Booth, October 2009 + +#ifndef TF_BOT_COMPANION_H +#define TF_BOT_COMPANION_H + +#ifdef TF_RAID_MODE + +#include "Path/NextBotPathFollow.h" +#include "Path/NextBotChasePath.h" + +// +// Friendly teammate bots +// +class CTFBotCompanion : public Action< CTFBot > +{ +public: + virtual ActionResult< CTFBot > OnStart( CTFBot *me, Action< CTFBot > *priorAction ); + virtual ActionResult< CTFBot > Update( CTFBot *me, float interval ); + + virtual ActionResult< CTFBot > OnResume( CTFBot *me, Action< CTFBot > *interruptingAction ); + + virtual const char *GetName( void ) const { return "Companion"; }; + +private: + ChasePath m_path; + CTFPlayer *GetLeader( void ); +}; + + +// +// Friendly defenders of the base +// +class CTFBotGuardian : public Action< CTFBot > +{ +public: + virtual ActionResult< CTFBot > OnStart( CTFBot *me, Action< CTFBot > *priorAction ); + virtual ActionResult< CTFBot > Update( CTFBot *me, float interval ); + + virtual ActionResult< CTFBot > OnResume( CTFBot *me, Action< CTFBot > *interruptingAction ); + + virtual EventDesiredResult< CTFBot > OnStuck( CTFBot *me ); + virtual EventDesiredResult< CTFBot > OnMoveToSuccess( CTFBot *me, const Path *path ); + virtual EventDesiredResult< CTFBot > OnMoveToFailure( CTFBot *me, const Path *path, MoveToFailureType reason ); + + virtual const char *GetName( void ) const { return "Guardian"; }; + +private: + PathFollower m_path; + CountdownTimer m_repathTimer; +}; + +#endif // TF_RAID_MODE + +#endif // TF_BOT_COMPANION_H |