Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5 KiB

9 years ago
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
8 years ago
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
9 years ago
*
****/
//=========================================================
// nodes.h
//=========================================================
#pragma once
4 years ago
#if !defined(NODES_H)
8 years ago
#define NODES_H
#define NO_NODE -1
#define bits_NODE_GROUP_REALM 1
9 years ago
class CLink
{
public:
entvars_t *m_pLinkEnt;// the entity that blocks this connection (doors, etc)
};
class CGraph
{
public:
BOOL m_fGraphPresent;// is the graph in memory?
BOOL m_fGraphPointersSet;// are the entity pointers for the graph all set?
int m_cLinks;// total number of links
8 years ago
CLink *m_pLinkPool;// big list of all node connections
9 years ago
void InitGraph( void );
int AllocNodes ( void );
int CheckNODFile(const char *szMapName);
int FLoadGraph(const char *szMapName);
9 years ago
int FSetGraphPointers(void);
8 years ago
void ShowNodeConnections ( int iNode );
int FindNearestNode ( const Vector &vecOrigin, CBaseEntity *pEntity );
int FindNearestNode ( const Vector &vecOrigin, int afNodeTypes );
9 years ago
};
extern CGraph WorldGraph;
8 years ago
#endif // NODES_H