| 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 |
#ifndef MAX_STRINGFIELD |
| 34 |
#define MAX_STRINGFIELD 80 |
| 35 |
#endif |
| 36 |
|
| 37 |
|
| 38 |
#define TFL_INVALID 0x00000001 //traveling temporary not possible |
| 39 |
#define TFL_WALK 0x00000002 //walking |
| 40 |
#define TFL_CROUCH 0x00000004 //crouching |
| 41 |
#define TFL_BARRIERJUMP 0x00000008 //jumping onto a barrier |
| 42 |
#define TFL_JUMP 0x00000010 //jumping |
| 43 |
#define TFL_LADDER 0x00000020 //climbing a ladder |
| 44 |
#define TFL_WALKOFFLEDGE 0x00000080 //walking of a ledge |
| 45 |
#define TFL_SWIM 0x00000100 //swimming |
| 46 |
#define TFL_WATERJUMP 0x00000200 //jumping out of the water |
| 47 |
#define TFL_TELEPORT 0x00000400 //teleporting |
| 48 |
#define TFL_ELEVATOR 0x00000800 //elevator |
| 49 |
#define TFL_ROCKETJUMP 0x00001000 //rocket jumping |
| 50 |
#define TFL_BFGJUMP 0x00002000 //bfg jumping |
| 51 |
#define TFL_GRAPPLEHOOK 0x00004000 //grappling hook |
| 52 |
#define TFL_DOUBLEJUMP 0x00008000 //double jump |
| 53 |
#define TFL_RAMPJUMP 0x00010000 //ramp jump |
| 54 |
#define TFL_STRAFEJUMP 0x00020000 //strafe jump |
| 55 |
#define TFL_JUMPPAD 0x00040000 //jump pad |
| 56 |
#define TFL_AIR 0x00080000 //travel through air |
| 57 |
#define TFL_WATER 0x00100000 //travel through water |
| 58 |
#define TFL_SLIME 0x00200000 //travel through slime |
| 59 |
#define TFL_LAVA 0x00400000 //travel through lava |
| 60 |
#define TFL_DONOTENTER 0x00800000 //travel through donotenter area |
| 61 |
#define TFL_FUNCBOB 0x01000000 //func bobbing |
| 62 |
#define TFL_FLIGHT 0x02000000 //flight |
| 63 |
#define TFL_BRIDGE 0x04000000 //move over a bridge |
| 64 |
|
| 65 |
#define TFL_NOTTEAM1 0x08000000 //not team 1 |
| 66 |
#define TFL_NOTTEAM2 0x10000000 //not team 2 |
| 67 |
|
| 68 |
|
| 69 |
#define TFL_DEFAULT TFL_WALK|TFL_CROUCH|TFL_BARRIERJUMP|\ |
| 70 |
TFL_JUMP|TFL_LADDER|\ |
| 71 |
TFL_WALKOFFLEDGE|TFL_SWIM|TFL_WATERJUMP|\ |
| 72 |
TFL_TELEPORT|TFL_ELEVATOR|\ |
| 73 |
TFL_AIR|TFL_WATER|TFL_JUMPPAD|TFL_FUNCBOB |
| 74 |
|
| 75 |
typedef enum |
| 76 |
{ |
| 77 |
SOLID_NOT, |
| 78 |
SOLID_TRIGGER, |
| 79 |
SOLID_BBOX, |
| 80 |
SOLID_BSP |
| 81 |
} solid_t; |
| 82 |
|
| 83 |
|
| 84 |
typedef struct aas_trace_s |
| 85 |
{ |
| 86 |
qboolean startsolid; |
| 87 |
float fraction; |
| 88 |
vec3_t endpos; |
| 89 |
int ent; |
| 90 |
int lastarea; |
| 91 |
int area; |
| 92 |
int planenum; |
| 93 |
} aas_trace_t; |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
typedef struct aas_entityinfo_s |
| 124 |
{ |
| 125 |
int valid; |
| 126 |
int type; |
| 127 |
int flags; |
| 128 |
float ltime; |
| 129 |
float update_time; |
| 130 |
int number; |
| 131 |
vec3_t origin; |
| 132 |
vec3_t angles; |
| 133 |
vec3_t old_origin; |
| 134 |
vec3_t lastvisorigin; |
| 135 |
vec3_t mins; |
| 136 |
vec3_t maxs; |
| 137 |
int groundent; |
| 138 |
int solid; |
| 139 |
int modelindex; |
| 140 |
int modelindex2; |
| 141 |
int frame; |
| 142 |
int event; |
| 143 |
int eventParm; |
| 144 |
int powerups; |
| 145 |
int weapon; |
| 146 |
int legsAnim; |
| 147 |
int torsoAnim; |
| 148 |
} aas_entityinfo_t; |
| 149 |
|
| 150 |
|
| 151 |
typedef struct aas_areainfo_s |
| 152 |
{ |
| 153 |
int contents; |
| 154 |
int flags; |
| 155 |
int presencetype; |
| 156 |
int cluster; |
| 157 |
vec3_t mins; |
| 158 |
vec3_t maxs; |
| 159 |
vec3_t center; |
| 160 |
} aas_areainfo_t; |
| 161 |
|
| 162 |
|
| 163 |
#define SE_NONE 0 |
| 164 |
#define SE_HITGROUND 1 // the ground is hit |
| 165 |
#define SE_LEAVEGROUND 2 // there's no ground |
| 166 |
#define SE_ENTERWATER 4 // water is entered |
| 167 |
#define SE_ENTERSLIME 8 // slime is entered |
| 168 |
#define SE_ENTERLAVA 16 // lava is entered |
| 169 |
#define SE_HITGROUNDDAMAGE 32 // the ground is hit with damage |
| 170 |
#define SE_GAP 64 // there's a gap |
| 171 |
#define SE_TOUCHJUMPPAD 128 // touching a jump pad area |
| 172 |
#define SE_TOUCHTELEPORTER 256 // touching teleporter |
| 173 |
#define SE_ENTERAREA 512 // the given stoparea is entered |
| 174 |
#define SE_HITGROUNDAREA 1024 // a ground face in the area is hit |
| 175 |
#define SE_HITBOUNDINGBOX 2048 // hit the specified bounding box |
| 176 |
#define SE_TOUCHCLUSTERPORTAL 4096 // touching a cluster portal |
| 177 |
|
| 178 |
typedef struct aas_clientmove_s |
| 179 |
{ |
| 180 |
vec3_t endpos; |
| 181 |
int endarea; |
| 182 |
vec3_t velocity; |
| 183 |
aas_trace_t trace; |
| 184 |
int presencetype; |
| 185 |
int stopevent; |
| 186 |
int endcontents; |
| 187 |
float time; |
| 188 |
int frames; |
| 189 |
} aas_clientmove_t; |
| 190 |
|
| 191 |
|
| 192 |
#define ALTROUTEGOAL_ALL 1 |
| 193 |
#define ALTROUTEGOAL_CLUSTERPORTALS 2 |
| 194 |
#define ALTROUTEGOAL_VIEWPORTALS 4 |
| 195 |
|
| 196 |
typedef struct aas_altroutegoal_s |
| 197 |
{ |
| 198 |
vec3_t origin; |
| 199 |
int areanum; |
| 200 |
unsigned short starttraveltime; |
| 201 |
unsigned short goaltraveltime; |
| 202 |
unsigned short extratraveltime; |
| 203 |
} aas_altroutegoal_t; |
| 204 |
|
| 205 |
|
| 206 |
#define RSE_NONE 0 |
| 207 |
#define RSE_NOROUTE 1 //no route to goal |
| 208 |
#define RSE_USETRAVELTYPE 2 //stop as soon as on of the given travel types is used |
| 209 |
#define RSE_ENTERCONTENTS 4 //stop when entering the given contents |
| 210 |
#define RSE_ENTERAREA 8 //stop when entering the given area |
| 211 |
|
| 212 |
typedef struct aas_predictroute_s |
| 213 |
{ |
| 214 |
vec3_t endpos; |
| 215 |
int endarea; |
| 216 |
int stopevent; |
| 217 |
int endcontents; |
| 218 |
int endtravelflags; |
| 219 |
int numareas; |
| 220 |
int time; |
| 221 |
} aas_predictroute_t; |