1 /* 2 Copyright (C) 1997-2001 Id Software, Inc. 3 4 This program is free software; you can redistribute it and/or 5 modify it under the terms of the GNU General Public License 6 as published by the Free Software Foundation; either version 2 7 of the License, or (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 13 See the GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 -------------------------------------------------------------- 19 The ACE Bot is a product of Steve Yeager, and is available from 20 the ACE Bot homepage, at http://www.axionfx.com/ace. 21 22 This program is a modification of the ACE Bot, and is therefore 23 in NO WAY supported by Steve Yeager. 24 */ 25 26 27 //============================================================= 28 // 29 // NODES SHARED (game/cgame) 30 // 31 //============================================================= 32 33 #define MAX_NODES 2048 //jalToDo: needs dynamic alloc (big terrain maps) 34 #define NODE_DENSITY 128 // Density setting for nodes 35 #define INVALID -1 36 #define NODES_MAX_PLINKS 16 37 #define NAV_FILE_VERSION 11 38 #define NAV_FILE_EXTENSION "nav" 39 #define AI_MOD_FOLDER "jabot" 40 #define AI_NODES_FOLDER "navigation" 41 42 #define MASK_NODESOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_MONSTERCLIP|CONTENTS_WINDOW) 43 #define MASK_AISOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_MONSTER|CONTENTS_DEADMONSTER|CONTENTS_MONSTERCLIP) 44 45 #define AI_STEPSIZE 18 46 #define AI_JUMPABLE_HEIGHT 34 47 #define AI_JUMPABLE_DISTANCE 140 48 49 // node flags 50 #define NODEFLAGS_WATER 0x00000001 51 #define NODEFLAGS_LADDER 0x00000002 52 #define NODEFLAGS_SERVERLINK 0x00000004 //plats, doors, teles. Only server can link 2 nodes with this flag 53 #define NODEFLAGS_FLOAT 0x00000008 //don't drop node to floor ( air & water ) 54 //#define NODEFLAGS_ITEM 0x00000010 //jal remove me 55 #define NODEFLAGS_BOTROAM 0x00000020 56 #define NODEFLAGS_JUMPPAD 0x00000040 // jalfixme: add NODEFLAGS_REACHATTOUCH 57 #define NODEFLAGS_JUMPPAD_LAND 0x00000080 58 #define NODEFLAGS_PLATFORM 0x00000100 59 #define NODEFLAGS_TELEPORTER_IN 0x00000200 // jalfixme: add NODEFLAGS_REACHATTOUCH 60 #define NODEFLAGS_TELEPORTER_OUT 0x00000400 61 #define NODEFLAGS_REACHATTOUCH 0x00000800 62 63 #define NODE_ALL 0x00001000 64 65 // links types (movetypes required to run node links) 66 #define LINK_MOVE 0x00000001 67 #define LINK_STAIRS 0x00000002 68 #define LINK_FALL 0x00000004 69 #define LINK_CLIMB 0x00000008 70 #define LINK_TELEPORT 0x00000010 71 #define LINK_PLATFORM 0x00000020 72 #define LINK_JUMPPAD 0x00000040 73 #define LINK_WATER 0x00000080 74 #define LINK_WATERJUMP 0x00000100 75 #define LINK_LADDER 0x00000200 76 #define LINK_JUMP 0x00000400 77 #define LINK_CROUCH 0x00000800 78 79 #define LINK_INVALID 0x00001000 80 81 82 typedef struct nav_plink_s 83 { 84 int numLinks; 85 int nodes[NODES_MAX_PLINKS]; 86 int dist[NODES_MAX_PLINKS]; 87 int moveType[NODES_MAX_PLINKS]; 88 89 } nav_plink_t; 90 91 92 typedef struct nav_node_s 93 { 94 vec3_t origin; 95 int flags; 96 int area; 97 98 } nav_node_t; 99 100