blob: 6b7973ba665d7176aaca0c6d5463c7775af95ba0 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
//========= Copyright Valve Corporation, All rights reserved. ============//
// bot_npc_archer.h
// A NextBot non-player derived archer
// Michael Booth, November 2010
#ifndef BOT_NPC_ARCHER_H
#define BOT_NPC_ARCHER_H
#include "NextBot.h"
#include "NextBotBehavior.h"
#include "NextBotGroundLocomotion.h"
#include "Path/NextBotPathFollow.h"
#include "bot_npc.h"
#include "bot_npc_body.h"
class CTFPlayer;
//----------------------------------------------------------------------------
class CBotNPCArcher : public NextBotCombatCharacter
{
public:
DECLARE_CLASS( CBotNPCArcher, NextBotCombatCharacter );
CBotNPCArcher();
virtual ~CBotNPCArcher();
virtual void Precache();
virtual void Spawn( void );
// INextBot
DECLARE_INTENTION_INTERFACE( CBotNPCArcher );
virtual NextBotGroundLocomotion *GetLocomotionInterface( void ) const { return m_locomotor; }
virtual CBotNPCBody *GetBodyInterface( void ) const { return m_body; }
virtual Vector EyePosition( void );
virtual unsigned int PhysicsSolidMaskForEntity( void ) const;
virtual bool ShouldCollide( int collisionGroup, int contentsMask ) const;
CBaseAnimating *GetBow( void ) const;
void SetHomePosition( const Vector &pos );
const Vector &GetHomePosition( void ) const;
private:
NextBotGroundLocomotion *m_locomotor;
CBotNPCBody *m_body;
CBaseAnimating *m_bow;
Vector m_eyeOffset;
Vector m_homePos;
};
inline void CBotNPCArcher::SetHomePosition( const Vector &pos )
{
m_homePos = pos;
}
inline const Vector &CBotNPCArcher::GetHomePosition( void ) const
{
return m_homePos;
}
inline Vector CBotNPCArcher::EyePosition( void )
{
return GetAbsOrigin() + m_eyeOffset;
}
inline CBaseAnimating *CBotNPCArcher::GetBow( void ) const
{
return m_bow;
}
#endif // BOT_NPC_ARCHER_H
|