| 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 |
#define AASID (('S'<<24)+('A'<<16)+('A'<<8)+'E') |
| 28 |
#define AASVERSION_OLD 4 |
| 29 |
#define AASVERSION 5 |
| 30 |
|
| 31 |
|
| 32 |
#define PRESENCE_NONE 1 |
| 33 |
#define PRESENCE_NORMAL 2 |
| 34 |
#define PRESENCE_CROUCH 4 |
| 35 |
|
| 36 |
|
| 37 |
#define MAX_TRAVELTYPES 32 |
| 38 |
#define TRAVEL_INVALID 1 //temporary not possible |
| 39 |
#define TRAVEL_WALK 2 //walking |
| 40 |
#define TRAVEL_CROUCH 3 //crouching |
| 41 |
#define TRAVEL_BARRIERJUMP 4 //jumping onto a barrier |
| 42 |
#define TRAVEL_JUMP 5 //jumping |
| 43 |
#define TRAVEL_LADDER 6 //climbing a ladder |
| 44 |
#define TRAVEL_WALKOFFLEDGE 7 //walking of a ledge |
| 45 |
#define TRAVEL_SWIM 8 //swimming |
| 46 |
#define TRAVEL_WATERJUMP 9 //jump out of the water |
| 47 |
#define TRAVEL_TELEPORT 10 //teleportation |
| 48 |
#define TRAVEL_ELEVATOR 11 //travel by elevator |
| 49 |
#define TRAVEL_ROCKETJUMP 12 //rocket jumping required for travel |
| 50 |
#define TRAVEL_BFGJUMP 13 //bfg jumping required for travel |
| 51 |
#define TRAVEL_GRAPPLEHOOK 14 //grappling hook required for travel |
| 52 |
#define TRAVEL_DOUBLEJUMP 15 //double jump |
| 53 |
#define TRAVEL_RAMPJUMP 16 //ramp jump |
| 54 |
#define TRAVEL_STRAFEJUMP 17 //strafe jump |
| 55 |
#define TRAVEL_JUMPPAD 18 //jump pad |
| 56 |
#define TRAVEL_FUNCBOB 19 //func bob |
| 57 |
|
| 58 |
|
| 59 |
#define TRAVELTYPE_MASK 0xFFFFFF |
| 60 |
#define TRAVELFLAG_NOTTEAM1 (1 << 24) |
| 61 |
#define TRAVELFLAG_NOTTEAM2 (2 << 24) |
| 62 |
|
| 63 |
|
| 64 |
#define FACE_SOLID 1 //just solid at the other side |
| 65 |
#define FACE_LADDER 2 //ladder |
| 66 |
#define FACE_GROUND 4 //standing on ground when in this face |
| 67 |
#define FACE_GAP 8 //gap in the ground |
| 68 |
#define FACE_LIQUID 16 //face separating two areas with liquid |
| 69 |
#define FACE_LIQUIDSURFACE 32 //face separating liquid and air |
| 70 |
#define FACE_BRIDGE 64 //can walk over this face if bridge is closed |
| 71 |
|
| 72 |
|
| 73 |
#define AREACONTENTS_WATER 1 |
| 74 |
#define AREACONTENTS_LAVA 2 |
| 75 |
#define AREACONTENTS_SLIME 4 |
| 76 |
#define AREACONTENTS_CLUSTERPORTAL 8 |
| 77 |
#define AREACONTENTS_TELEPORTAL 16 |
| 78 |
#define AREACONTENTS_ROUTEPORTAL 32 |
| 79 |
#define AREACONTENTS_TELEPORTER 64 |
| 80 |
#define AREACONTENTS_JUMPPAD 128 |
| 81 |
#define AREACONTENTS_DONOTENTER 256 |
| 82 |
#define AREACONTENTS_VIEWPORTAL 512 |
| 83 |
#define AREACONTENTS_MOVER 1024 |
| 84 |
#define AREACONTENTS_NOTTEAM1 2048 |
| 85 |
#define AREACONTENTS_NOTTEAM2 4096 |
| 86 |
|
| 87 |
#define AREACONTENTS_MODELNUMSHIFT 24 |
| 88 |
#define AREACONTENTS_MAXMODELNUM 0xFF |
| 89 |
#define AREACONTENTS_MODELNUM (AREACONTENTS_MAXMODELNUM << AREACONTENTS_MODELNUMSHIFT) |
| 90 |
|
| 91 |
|
| 92 |
#define AREA_GROUNDED 1 //bot can stand on the ground |
| 93 |
#define AREA_LADDER 2 //area contains one or more ladder faces |
| 94 |
#define AREA_LIQUID 4 //area contains a liquid |
| 95 |
#define AREA_DISABLED 8 //area is disabled for routing when set |
| 96 |
#define AREA_BRIDGE 16 //area ontop of a bridge |
| 97 |
|
| 98 |
|
| 99 |
#define AAS_LUMPS 14 |
| 100 |
#define AASLUMP_BBOXES 0 |
| 101 |
#define AASLUMP_VERTEXES 1 |
| 102 |
#define AASLUMP_PLANES 2 |
| 103 |
#define AASLUMP_EDGES 3 |
| 104 |
#define AASLUMP_EDGEINDEX 4 |
| 105 |
#define AASLUMP_FACES 5 |
| 106 |
#define AASLUMP_FACEINDEX 6 |
| 107 |
#define AASLUMP_AREAS 7 |
| 108 |
#define AASLUMP_AREASETTINGS 8 |
| 109 |
#define AASLUMP_REACHABILITY 9 |
| 110 |
#define AASLUMP_NODES 10 |
| 111 |
#define AASLUMP_PORTALS 11 |
| 112 |
#define AASLUMP_PORTALINDEX 12 |
| 113 |
#define AASLUMP_CLUSTERS 13 |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
typedef struct aas_bbox_s |
| 119 |
{ |
| 120 |
int presencetype; |
| 121 |
int flags; |
| 122 |
vec3_t mins, maxs; |
| 123 |
} aas_bbox_t; |
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
typedef struct aas_reachability_s |
| 129 |
{ |
| 130 |
int areanum; |
| 131 |
int facenum; |
| 132 |
int edgenum; |
| 133 |
vec3_t start; |
| 134 |
vec3_t end; |
| 135 |
int traveltype; |
| 136 |
unsigned short int traveltime; |
| 137 |
} aas_reachability_t; |
| 138 |
|
| 139 |
|
| 140 |
typedef struct aas_areasettings_s |
| 141 |
{ |
| 142 |
|
| 143 |
int contents; |
| 144 |
int areaflags; |
| 145 |
int presencetype; |
| 146 |
int cluster; |
| 147 |
int clusterareanum; |
| 148 |
int numreachableareas; |
| 149 |
int firstreachablearea; |
| 150 |
} aas_areasettings_t; |
| 151 |
|
| 152 |
|
| 153 |
typedef struct aas_portal_s |
| 154 |
{ |
| 155 |
int areanum; |
| 156 |
int frontcluster; |
| 157 |
int backcluster; |
| 158 |
int clusterareanum[2]; |
| 159 |
} aas_portal_t; |
| 160 |
|
| 161 |
|
| 162 |
typedef int aas_portalindex_t; |
| 163 |
|
| 164 |
|
| 165 |
typedef struct aas_cluster_s |
| 166 |
{ |
| 167 |
int numareas; |
| 168 |
int numreachabilityareas; |
| 169 |
int numportals; |
| 170 |
int firstportal; |
| 171 |
} aas_cluster_t; |
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
typedef vec3_t aas_vertex_t; |
| 176 |
|
| 177 |
|
| 178 |
typedef struct aas_plane_s |
| 179 |
{ |
| 180 |
vec3_t normal; |
| 181 |
float dist; |
| 182 |
int type; |
| 183 |
} aas_plane_t; |
| 184 |
|
| 185 |
|
| 186 |
typedef struct aas_edge_s |
| 187 |
{ |
| 188 |
int v[2]; |
| 189 |
} aas_edge_t; |
| 190 |
|
| 191 |
|
| 192 |
typedef int aas_edgeindex_t; |
| 193 |
|
| 194 |
|
| 195 |
typedef struct aas_face_s |
| 196 |
{ |
| 197 |
int planenum; |
| 198 |
int faceflags; |
| 199 |
int numedges; |
| 200 |
int firstedge; |
| 201 |
int frontarea; |
| 202 |
int backarea; |
| 203 |
} aas_face_t; |
| 204 |
|
| 205 |
|
| 206 |
typedef int aas_faceindex_t; |
| 207 |
|
| 208 |
|
| 209 |
typedef struct aas_area_s |
| 210 |
{ |
| 211 |
int areanum; |
| 212 |
|
| 213 |
int numfaces; |
| 214 |
int firstface; |
| 215 |
vec3_t mins; |
| 216 |
vec3_t maxs; |
| 217 |
vec3_t center; |
| 218 |
} aas_area_t; |
| 219 |
|
| 220 |
|
| 221 |
typedef struct aas_node_s |
| 222 |
{ |
| 223 |
int planenum; |
| 224 |
int children[2]; |
| 225 |
|
| 226 |
} aas_node_t; |
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
typedef struct |
| 232 |
{ |
| 233 |
int fileofs; |
| 234 |
int filelen; |
| 235 |
} aas_lump_t; |
| 236 |
|
| 237 |
|
| 238 |
typedef struct aas_header_s |
| 239 |
{ |
| 240 |
int ident; |
| 241 |
int version; |
| 242 |
int bspchecksum; |
| 243 |
|
| 244 |
aas_lump_t lumps[AAS_LUMPS]; |
| 245 |
} aas_header_t; |
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|