mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Use MAX_PATHNODES rather than a constant number
This commit is contained in:
parent
19e12701f3
commit
f8f9d2f65c
2 changed files with 5 additions and 5 deletions
|
@ -1001,7 +1001,7 @@ PathNode *PathSearch::FindCornerNodeForWall(
|
|||
|
||||
PathNode *PathSearch::FindCornerNodeForExactPath(Entity *pSelf, Sentient *enemy, float fMaxPath)
|
||||
{
|
||||
PathNode *pPathNode[4096];
|
||||
PathNode *pPathNode[MAX_PATHNODES];
|
||||
PathNode *pParentNode;
|
||||
size_t i, iDepth;
|
||||
Vector vEnd;
|
||||
|
@ -1554,7 +1554,7 @@ void DrawNode(int iNodeCount)
|
|||
Vector aStart;
|
||||
Vector aEnd;
|
||||
PathNode *node;
|
||||
PathNode *nodelist[4096];
|
||||
PathNode *nodelist[MAX_PATHNODES];
|
||||
Vector end;
|
||||
Vector start;
|
||||
Vector p;
|
||||
|
@ -1562,8 +1562,8 @@ void DrawNode(int iNodeCount)
|
|||
|
||||
playerorigin = g_entities[0].client->ps.origin;
|
||||
|
||||
if (iNodeCount > 4096) {
|
||||
iNodeCount = 4096;
|
||||
if (iNodeCount > MAX_PATHNODES) {
|
||||
iNodeCount = MAX_PATHNODES;
|
||||
}
|
||||
|
||||
if (ai_showallnode->integer) {
|
||||
|
|
|
@ -252,7 +252,7 @@ private:
|
|||
static int m_LoadIndex;
|
||||
|
||||
public:
|
||||
static PathNode *pathnodes[4096];
|
||||
static PathNode *pathnodes[MAX_PATHNODES];
|
||||
static int nodecount;
|
||||
static float total_dist;
|
||||
static const char *last_error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue