blob: 22aaf5f3af6385d8cde789a9998328bf5be65921 (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: AI Utility classes for building the initial AI Networks
//
// $NoKeywords: $
//=============================================================================//
#ifndef AI_INITUTILS_H
#define AI_INITUTILS_H
#ifdef _WIN32
#pragma once
#endif
#include "ai_basenpc.h"
#include "ai_node.h"
//###########################################################
// >> HintNodeData
//
// This is a chunk of data that's passed to a hint node entity
// when it's created from a CNodeEnt.
//###########################################################
enum HintIgnoreFacing_t
{
HIF_NO,
HIF_YES,
HIF_DEFAULT,
};
struct HintNodeData
{
string_t strEntityName;
Vector vecPosition;
short nHintType;
int nNodeID;
string_t strGroup;
int iDisabled;
string_t iszActivityName;
int nTargetWCNodeID;
HintIgnoreFacing_t fIgnoreFacing;
NPC_STATE minState;
NPC_STATE maxState;
int nWCNodeID; // Node ID assigned by worldcraft (not same as engine!)
DECLARE_SIMPLE_DATADESC();
};
//###########################################################
// >> CNodeEnt
//
// This is the entity that is loaded in from worldcraft.
// It is only used to build the network and is deleted
// immediately
//###########################################################
class CNodeEnt : public CServerOnlyPointEntity
{
DECLARE_CLASS( CNodeEnt, CServerOnlyPointEntity );
public:
virtual void SetOwnerEntity( CBaseEntity* pOwner ) { BaseClass::SetOwnerEntity( NULL ); }
static int m_nNodeCount;
void Spawn( void );
int Spawn( const char *pMapData );
DECLARE_DATADESC();
CNodeEnt(void);
public:
HintNodeData m_NodeData;
};
//###########################################################
// >> CAI_TestHull
//
// a modelless clip hull that verifies reachable nodes by
// walking from every node to each of it's connections//
//###########################################################
class CAI_TestHull : public CAI_BaseNPC
{
DECLARE_CLASS( CAI_TestHull, CAI_BaseNPC );
private:
static CAI_TestHull* pTestHull; // Hull for testing connectivity
public:
static CAI_TestHull* GetTestHull(void); // Get the test hull
static void ReturnTestHull(void); // Return the test hull
bool bInUse;
virtual void Precache();
void Spawn(void);
virtual int ObjectCaps( void ) { return BaseClass::ObjectCaps() & ~(FCAP_ACROSS_TRANSITION|FCAP_DONT_SAVE); }
virtual bool IsJumpLegal(const Vector &startPos, const Vector &apex, const Vector &endPos) const;
~CAI_TestHull(void);
};
#endif // AI_INITUTILS_H
|