blob: 3d58bee98f702893de944d01acabf1871e3dd1fd (
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
#ifndef BOT_NPC_BODY_H
#define BOT_NPC_BODY_H
#include "animation.h"
#include "NextBotBodyInterface.h"
class INextBot;
//----------------------------------------------------------------------------------------------------------------
/**
* The interface for control and information about the bot's body state (posture, animation state, etc)
*/
class CBotNPCBody : public IBody
{
public:
CBotNPCBody( INextBot *bot );
virtual ~CBotNPCBody() { }
virtual void Update( void );
virtual bool StartActivity( Activity act, unsigned int flags = 0 );
virtual Activity GetActivity( void ) const; // return currently animating activity
virtual bool IsActivity( Activity act ) const; // return true if currently animating activity matches the given one
virtual void AimHeadTowards( const Vector &lookAtPos,
LookAtPriorityType priority = BORING,
float duration = 0.0f,
INextBotReply *replyWhenAimed = NULL,
const char *reason = NULL ); // aim the bot's head towards the given goal
virtual void AimHeadTowards( CBaseEntity *subject,
LookAtPriorityType priority = BORING,
float duration = 0.0f,
INextBotReply *replyWhenAimed = NULL,
const char *reason = NULL ); // continually aim the bot's head towards the given subject
virtual unsigned int GetSolidMask( void ) const; // return the bot's collision mask (hack until we get a general hull trace abstraction here or in the locomotion interface)
virtual unsigned int GetCollisionGroup( void ) const;
private:
int m_currentActivity;
int m_moveXPoseParameter;
int m_moveYPoseParameter;
QAngle m_desiredAimAngles;
};
inline Activity CBotNPCBody::GetActivity( void ) const
{
return (Activity)m_currentActivity;
}
inline bool CBotNPCBody::IsActivity( Activity act ) const
{
return act == m_currentActivity ? true : false;
}
inline unsigned int CBotNPCBody::GetCollisionGroup( void ) const
{
return COLLISION_GROUP_PLAYER_MOVEMENT;
}
#endif // BOT_NPC_BODY_H
|