diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/server/ai_behavior_fear.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/server/ai_behavior_fear.h')
| -rw-r--r-- | mp/src/game/server/ai_behavior_fear.h | 196 |
1 files changed, 98 insertions, 98 deletions
diff --git a/mp/src/game/server/ai_behavior_fear.h b/mp/src/game/server/ai_behavior_fear.h index 6c3ed665..b13848cb 100644 --- a/mp/src/game/server/ai_behavior_fear.h +++ b/mp/src/game/server/ai_behavior_fear.h @@ -1,98 +1,98 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Deal intelligently with an enemy that we're afraid of
-//
-// $Workfile: $
-// $Date: $
-//
-//-----------------------------------------------------------------------------
-// $Log: $
-//
-// $NoKeywords: $
-//=============================================================================//
-
-
-#ifndef AI_BEHAVIOR_FEAR_H
-#define AI_BEHAVIOR_FEAR_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "ai_behavior.h"
-
-class CAI_FearBehavior : public CAI_SimpleBehavior
-{
- DECLARE_CLASS( CAI_FearBehavior, CAI_SimpleBehavior );
-
-public:
- CAI_FearBehavior();
-
- void Precache( void );
- virtual const char *GetName() { return "Fear"; }
-
- virtual bool CanSelectSchedule();
- void GatherConditions();
-
- virtual void BeginScheduleSelection();
- virtual void EndScheduleSelection();
-
- void StartTask( const Task_t *pTask );
- void RunTask( const Task_t *pTask );
-
- //void BuildScheduleTestBits();
- //int TranslateSchedule( int scheduleType );
- //void OnStartSchedule( int scheduleType );
-
- //void InitializeBehavior();
-
- bool EnemyDislikesMe();
-
- void MarkAsUnsafe();
- bool IsInASafePlace();
- void SpoilSafePlace();
- void ReleaseAllHints();
-
- CAI_Hint *FindFearWithdrawalDest();
- void BuildScheduleTestBits();
- int TranslateSchedule( int scheduleType );
-
-
- enum
- {
- SCHED_FEAR_MOVE_TO_SAFE_PLACE = BaseClass::NEXT_SCHEDULE,
- SCHED_FEAR_MOVE_TO_SAFE_PLACE_RETRY,
- SCHED_FEAR_STAY_IN_SAFE_PLACE,
- NEXT_SCHEDULE,
-
- TASK_FEAR_GET_PATH_TO_SAFETY_HINT = BaseClass::NEXT_TASK,
- TASK_FEAR_WAIT_FOR_SAFETY,
- TASK_FEAR_IN_SAFE_PLACE,
- NEXT_TASK,
-
- COND_FEAR_ENEMY_CLOSE = BaseClass::NEXT_CONDITION, // within 30 feet
- COND_FEAR_ENEMY_TOO_CLOSE, // within 5 feet
- COND_FEAR_SEPARATED_FROM_PLAYER,
- NEXT_CONDITION,
- };
-
- DEFINE_CUSTOM_SCHEDULE_PROVIDER;
-
-public:
-
-private:
- virtual int SelectSchedule();
-
- float m_flTimeToSafety;
- float m_flTimePlayerLastVisible;
- float m_flDeferUntil;
-
- CAI_MoveMonitor m_SafePlaceMoveMonitor;
- CHandle<CAI_Hint> m_hSafePlaceHint;
- CHandle<CAI_Hint> m_hMovingToHint;
-
- DECLARE_DATADESC();
-};
-
-#endif // AI_BEHAVIOR_FEAR_H
-
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Deal intelligently with an enemy that we're afraid of +// +// $Workfile: $ +// $Date: $ +// +//----------------------------------------------------------------------------- +// $Log: $ +// +// $NoKeywords: $ +//=============================================================================// + + +#ifndef AI_BEHAVIOR_FEAR_H +#define AI_BEHAVIOR_FEAR_H +#ifdef _WIN32 +#pragma once +#endif + +#include "ai_behavior.h" + +class CAI_FearBehavior : public CAI_SimpleBehavior +{ + DECLARE_CLASS( CAI_FearBehavior, CAI_SimpleBehavior ); + +public: + CAI_FearBehavior(); + + void Precache( void ); + virtual const char *GetName() { return "Fear"; } + + virtual bool CanSelectSchedule(); + void GatherConditions(); + + virtual void BeginScheduleSelection(); + virtual void EndScheduleSelection(); + + void StartTask( const Task_t *pTask ); + void RunTask( const Task_t *pTask ); + + //void BuildScheduleTestBits(); + //int TranslateSchedule( int scheduleType ); + //void OnStartSchedule( int scheduleType ); + + //void InitializeBehavior(); + + bool EnemyDislikesMe(); + + void MarkAsUnsafe(); + bool IsInASafePlace(); + void SpoilSafePlace(); + void ReleaseAllHints(); + + CAI_Hint *FindFearWithdrawalDest(); + void BuildScheduleTestBits(); + int TranslateSchedule( int scheduleType ); + + + enum + { + SCHED_FEAR_MOVE_TO_SAFE_PLACE = BaseClass::NEXT_SCHEDULE, + SCHED_FEAR_MOVE_TO_SAFE_PLACE_RETRY, + SCHED_FEAR_STAY_IN_SAFE_PLACE, + NEXT_SCHEDULE, + + TASK_FEAR_GET_PATH_TO_SAFETY_HINT = BaseClass::NEXT_TASK, + TASK_FEAR_WAIT_FOR_SAFETY, + TASK_FEAR_IN_SAFE_PLACE, + NEXT_TASK, + + COND_FEAR_ENEMY_CLOSE = BaseClass::NEXT_CONDITION, // within 30 feet + COND_FEAR_ENEMY_TOO_CLOSE, // within 5 feet + COND_FEAR_SEPARATED_FROM_PLAYER, + NEXT_CONDITION, + }; + + DEFINE_CUSTOM_SCHEDULE_PROVIDER; + +public: + +private: + virtual int SelectSchedule(); + + float m_flTimeToSafety; + float m_flTimePlayerLastVisible; + float m_flDeferUntil; + + CAI_MoveMonitor m_SafePlaceMoveMonitor; + CHandle<CAI_Hint> m_hSafePlaceHint; + CHandle<CAI_Hint> m_hMovingToHint; + + DECLARE_DATADESC(); +}; + +#endif // AI_BEHAVIOR_FEAR_H + + |