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/missions/tf_bot_mission_reprogrammed.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/missions/tf_bot_mission_reprogrammed.h')
| -rw-r--r-- | game/server/tf/bot/behavior/missions/tf_bot_mission_reprogrammed.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/game/server/tf/bot/behavior/missions/tf_bot_mission_reprogrammed.h b/game/server/tf/bot/behavior/missions/tf_bot_mission_reprogrammed.h new file mode 100644 index 0000000..7c63c7e --- /dev/null +++ b/game/server/tf/bot/behavior/missions/tf_bot_mission_reprogrammed.h @@ -0,0 +1,53 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// tf_bot_mission_suicide_bomber.h +// Move to target and explode +// Michael Booth, October 2011 + +#ifndef TF_BOT_MISSION_REPROGRAMMED_H +#define TF_BOT_MISSION_REPROGRAMMED_H + +#include "Path/NextBotPathFollow.h" + +class CTFBotMissionReprogrammed : public Action< CTFBot > +{ +#ifdef STAGING_ONLY +public: + CTFBotMissionReprogrammed( void ); + + virtual ActionResult< CTFBot > OnStart( CTFBot *me, Action< CTFBot > *priorAction ); + virtual ActionResult< CTFBot > Update( CTFBot *me, float interval ); + virtual void OnEnd( CTFBot *me, Action< CTFBot > *nextAction ); + + virtual EventDesiredResult< CTFBot > OnStuck( CTFBot *me ); + virtual EventDesiredResult< CTFBot > OnKilled( CTFBot *me, const CTakeDamageInfo &info ); + + virtual QueryResultType ShouldAttack( const INextBot *me, const CKnownEntity *them ) const; // should we attack "them"? + + virtual const char *GetName( void ) const { return "MissionReprogrammed"; }; + +private: + CHandle< CBaseEntity > m_victim; // the victim we are trying to destroy + Vector m_lastKnownVictimPosition; + + PathFollower m_path; + CountdownTimer m_repathTimer; + + CountdownTimer m_talkTimer; + CountdownTimer m_detonateTimer; + CountdownTimer m_detonateSeekTimer; + CountdownTimer m_reprogrammedTimer; + + void StartDetonate( CTFBot *me, bool wasSuccessful = false ); + void Detonate( CTFBot *me ); + CTFPlayer *FindNearestEnemy( CTFBot *me ); + bool m_hasDetonated; + bool m_wasSuccessful; + + int m_consecutivePathFailures; + + Vector m_vecDetLocation; +#endif // STAGING_ONLY +}; + + +#endif // TF_BOT_MISSION_REPROGRAMMED_H |