Debian Codegraph @

code/game/bg_public.h

raw symbols SCIP
1 /*
2 ===========================================================================
3 Copyright (C) 1999-2005 Id Software, Inc.
4
5 This file is part of Quake III Arena source code.
6
7 Quake III Arena source code is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the License,
10 or (at your option) any later version.
11
12 Quake III Arena source code is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Quake III Arena source code; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 ===========================================================================
21 */
22 //
23 // bg_public.h -- definitions shared by both the server game and client game modules
24
25 // because games can change separately from the main system version, we need a
26 // second version that must match between game and cgame
27
28 #define GAME_VERSION BASEGAME "-1"
29
30 #define DEFAULT_GRAVITY 800
31 #define GIB_HEALTH -40
32 #define ARMOR_PROTECTION 0.66
33
34 #define MAX_ITEMS 256
35
36 #define RANK_TIED_FLAG 0x4000
37
38 #define DEFAULT_SHOTGUN_SPREAD 700
39 #define DEFAULT_SHOTGUN_COUNT 11
40
41 #define ITEM_RADIUS 15 // item sizes are needed for client side pickup detection
42
43 #define LIGHTNING_RANGE 768
44
45 #define SCORE_NOT_PRESENT -9999 // for the CS_SCORES[12] when only one player is present
46
47 #define VOTE_TIME 30000 // 30 seconds before vote times out
48
49 #define PLAYER_WIDTH 15
50 #define MINS_Z -24
51 #define DEFAULT_HEIGHT 32
52 #define DEFAULT_VIEWHEIGHT 26
53 #define CROUCH_HEIGHT 16
54 #define CROUCH_VIEWHEIGHT 12
55 #define DEAD_HEIGHT -8
56 #define DEAD_VIEWHEIGHT -16
57 #define INVUL_RADIUS 42
58
59 //
60 // config strings are a general means of communicating variable length strings
61 // from the server to all connected clients.
62 //
63
64 // CS_SERVERINFO and CS_SYSTEMINFO are defined in q_shared.h
65 #define CS_MUSIC 2
66 #define CS_MESSAGE 3 // from the map worldspawn's message field
67 #define CS_MOTD 4 // g_motd string for server message of the day
68 #define CS_WARMUP 5 // server time when the match will be restarted
69 #define CS_SCORES1 6
70 #define CS_SCORES2 7
71 #define CS_VOTE_TIME 8
72 #define CS_VOTE_STRING 9
73 #define CS_VOTE_YES 10
74 #define CS_VOTE_NO 11
75
76 #define CS_TEAMVOTE_TIME 12
77 #define CS_TEAMVOTE_STRING 14
78 #define CS_TEAMVOTE_YES 16
79 #define CS_TEAMVOTE_NO 18
80
81 #define CS_GAME_VERSION 20
82 #define CS_LEVEL_START_TIME 21 // so the timer only shows the current level
83 #define CS_INTERMISSION 22 // when 1, fraglimit/timelimit has been hit and intermission will start in a second or two
84 #define CS_FLAGSTATUS 23 // string indicating flag status in CTF
85 #define CS_SHADERSTATE 24
86 #define CS_BOTINFO 25
87
88 #define CS_ITEMS 27 // string of 0's and 1's that tell which items are present
89
90 #define CS_MODELS 32
91 #define CS_SOUNDS (CS_MODELS+MAX_MODELS)
92 #define CS_PLAYERS (CS_SOUNDS+MAX_SOUNDS)
93 #define CS_LOCATIONS (CS_PLAYERS+MAX_CLIENTS)
94 #define CS_PARTICLES (CS_LOCATIONS+MAX_LOCATIONS)
95
96 #define CS_MAX (CS_PARTICLES+MAX_LOCATIONS)
97
98 #if (CS_MAX) > MAX_CONFIGSTRINGS
99 #error overflow: (CS_MAX) > MAX_CONFIGSTRINGS
100 #endif
101
102 typedef enum {
103 GT_FFA, // free for all
104 GT_TOURNAMENT, // one on one tournament
105 GT_SINGLE_PLAYER, // single player ffa
106
107 //-- team games go after this --
108
109 GT_TEAM, // team deathmatch
110 GT_CTF, // capture the flag
111 GT_1FCTF,
112 GT_OBELISK,
113 GT_HARVESTER,
114 GT_MAX_GAME_TYPE
115 } gametype_t;
116
117 typedef enum { GENDER_MALE, GENDER_FEMALE, GENDER_NEUTER } gender_t;
118
119 /*
120 ===================================================================================
121
122 PMOVE MODULE
123
124 The pmove code takes a player_state_t and a usercmd_t and generates a new player_state_t
125 and some other output data. Used for local prediction on the client game and true
126 movement on the server game.
127 ===================================================================================
128 */
129
130 typedef enum {
131 PM_NORMAL, // can accelerate and turn
132 PM_NOCLIP, // noclip movement
133 PM_SPECTATOR, // still run into walls
134 PM_DEAD, // no acceleration or turning, but free falling
135 PM_FREEZE, // stuck in place with no control
136 PM_INTERMISSION, // no movement or status bar
137 PM_SPINTERMISSION // no movement or status bar
138 } pmtype_t;
139
140 typedef enum {
141 WEAPON_READY,
142 WEAPON_RAISING,
143 WEAPON_DROPPING,
144 WEAPON_FIRING
145 } weaponstate_t;
146
147 // pmove->pm_flags
148 #define PMF_DUCKED 1
149 #define PMF_JUMP_HELD 2
150 #define PMF_BACKWARDS_JUMP 8 // go into backwards land
151 #define PMF_BACKWARDS_RUN 16 // coast down to backwards run
152 #define PMF_TIME_LAND 32 // pm_time is time before rejump
153 #define PMF_TIME_KNOCKBACK 64 // pm_time is an air-accelerate only time
154 #define PMF_TIME_WATERJUMP 256 // pm_time is waterjump
155 #define PMF_RESPAWNED 512 // clear after attack and jump buttons come up
156 #define PMF_USE_ITEM_HELD 1024
157 #define PMF_GRAPPLE_PULL 2048 // pull towards grapple location
158 #define PMF_FOLLOW 4096 // spectate following another player
159 #define PMF_SCOREBOARD 8192 // spectate as a scoreboard
160 #define PMF_INVULEXPAND 16384 // invulnerability sphere set to full size
161
162 #define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK)
163
164 #define MAXTOUCH 32
165 typedef struct {
166 // state (in / out)
167 playerState_t *ps;
168
169 // command (in)
170 usercmd_t cmd;
171 int tracemask; // collide against these types of surfaces
172 int debugLevel; // if set, diagnostic output will be printed
173 qboolean noFootsteps; // if the game is setup for no footsteps by the server
174 qboolean gauntletHit; // true if a gauntlet attack would actually hit something
175
176 int framecount;
177
178 // results (out)
179 int numtouch;
180 int touchents[MAXTOUCH];
181
182 vec3_t mins, maxs; // bounding box size
183
184 int watertype;
185 int waterlevel;
186
187 float xyspeed;
188
189 // for fixed msec Pmove
190 int pmove_fixed;
191 int pmove_msec;
192
193 // callbacks to test the world
194 // these will be different functions during game and cgame
195 void (*trace)( trace_t *results, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int passEntityNum, int contentMask );
196 int (*pointcontents)( const vec3_t point, int passEntityNum );
197 } pmove_t;
198
199 // if a full pmove isn't done on the client, you can just update the angles
200 void PM_UpdateViewAngles( playerState_t *ps, const usercmd_t *cmd );
201 void Pmove (pmove_t *pmove);
202
203 //===================================================================================
204
205
206 // player_state->stats[] indexes
207 // NOTE: may not have more than 16
208 typedef enum {
209 STAT_HEALTH,
210 STAT_HOLDABLE_ITEM,
211 #ifdef MISSIONPACK
212 STAT_PERSISTANT_POWERUP,
213 #endif
214 STAT_WEAPONS, // 16 bit fields
215 STAT_ARMOR,
216 STAT_DEAD_YAW, // look this direction when dead (FIXME: get rid of?)
217 STAT_CLIENTS_READY, // bit mask of clients wishing to exit the intermission (FIXME: configstring?)
218 STAT_MAX_HEALTH // health / armor limit, changeable by handicap
219 } statIndex_t;
220
221
222 // player_state->persistant[] indexes
223 // these fields are the only part of player_state that isn't
224 // cleared on respawn
225 // NOTE: may not have more than 16
226 typedef enum {
227 PERS_SCORE, // !!! MUST NOT CHANGE, SERVER AND GAME BOTH REFERENCE !!!
228 PERS_HITS, // total points damage inflicted so damage beeps can sound on change
229 PERS_RANK, // player rank or team rank
230 PERS_TEAM, // player team
231 PERS_SPAWN_COUNT, // incremented every respawn
232 PERS_PLAYEREVENTS, // 16 bits that can be flipped for events
233 PERS_ATTACKER, // clientnum of last damage inflicter
234 PERS_ATTACKEE_ARMOR, // health/armor of last person we attacked
235 PERS_KILLED, // count of the number of times you died
236 // player awards tracking
237 PERS_IMPRESSIVE_COUNT, // two railgun hits in a row
238 PERS_EXCELLENT_COUNT, // two successive kills in a short amount of time
239 PERS_DEFEND_COUNT, // defend awards
240 PERS_ASSIST_COUNT, // assist awards
241 PERS_GAUNTLET_FRAG_COUNT, // kills with the guantlet
242 PERS_CAPTURES // captures
243 } persEnum_t;
244
245
246 // entityState_t->eFlags
247 #define EF_DEAD 0x00000001 // don't draw a foe marker over players with EF_DEAD
248 #ifdef MISSIONPACK
249 #define EF_TICKING 0x00000002 // used to make players play the prox mine ticking sound
250 #endif
251 #define EF_TELEPORT_BIT 0x00000004 // toggled every time the origin abruptly changes
252 #define EF_AWARD_EXCELLENT 0x00000008 // draw an excellent sprite
253 #define EF_PLAYER_EVENT 0x00000010
254 #define EF_BOUNCE 0x00000010 // for missiles
255 #define EF_BOUNCE_HALF 0x00000020 // for missiles
256 #define EF_AWARD_GAUNTLET 0x00000040 // draw a gauntlet sprite
257 #define EF_NODRAW 0x00000080 // may have an event, but no model (unspawned items)
258 #define EF_FIRING 0x00000100 // for lightning gun
259 #define EF_KAMIKAZE 0x00000200
260 #define EF_MOVER_STOP 0x00000400 // will push otherwise
261 #define EF_AWARD_CAP 0x00000800 // draw the capture sprite
262 #define EF_TALK 0x00001000 // draw a talk balloon
263 #define EF_CONNECTION 0x00002000 // draw a connection trouble sprite
264 #define EF_VOTED 0x00004000 // already cast a vote
265 #define EF_AWARD_IMPRESSIVE 0x00008000 // draw an impressive sprite
266 #define EF_AWARD_DEFEND 0x00010000 // draw a defend sprite
267 #define EF_AWARD_ASSIST 0x00020000 // draw a assist sprite
268 #define EF_AWARD_DENIED 0x00040000 // denied
269 #define EF_TEAMVOTED 0x00080000 // already cast a team vote
270
271 // NOTE: may not have more than 16
272 typedef enum {
273 PW_NONE,
274
275 PW_QUAD,
276 PW_BATTLESUIT,
277 PW_HASTE,
278 PW_INVIS,
279 PW_REGEN,
280 PW_FLIGHT,
281
282 PW_REDFLAG,
283 PW_BLUEFLAG,
284 PW_NEUTRALFLAG,
285
286 PW_SCOUT,
287 PW_GUARD,
288 PW_DOUBLER,
289 PW_AMMOREGEN,
290 PW_INVULNERABILITY,
291
292 PW_NUM_POWERUPS
293
294 } powerup_t;
295
296 typedef enum {
297 HI_NONE,
298
299 HI_TELEPORTER,
300 HI_MEDKIT,
301 HI_KAMIKAZE,
302 HI_PORTAL,
303 HI_INVULNERABILITY,
304
305 HI_NUM_HOLDABLE
306 } holdable_t;
307
308
309 typedef enum {
310 WP_NONE,
311
312 WP_GAUNTLET,
313 WP_MACHINEGUN,
314 WP_SHOTGUN,
315 WP_GRENADE_LAUNCHER,
316 WP_ROCKET_LAUNCHER,
317 WP_LIGHTNING,
318 WP_RAILGUN,
319 WP_PLASMAGUN,
320 WP_BFG,
321 WP_GRAPPLING_HOOK,
322 #ifdef MISSIONPACK
323 WP_NAILGUN,
324 WP_PROX_LAUNCHER,
325 WP_CHAINGUN,
326 #endif
327
328 WP_NUM_WEAPONS
329 } weapon_t;
330
331
332 // reward sounds (stored in ps->persistant[PERS_PLAYEREVENTS])
333 #define PLAYEREVENT_DENIEDREWARD 0x0001
334 #define PLAYEREVENT_GAUNTLETREWARD 0x0002
335 #define PLAYEREVENT_HOLYSHIT 0x0004
336
337 // entityState_t->event values
338 // entity events are for effects that take place relative
339 // to an existing entities origin. Very network efficient.
340
341 // two bits at the top of the entityState->event field
342 // will be incremented with each change in the event so
343 // that an identical event started twice in a row can
344 // be distinguished. And off the value with ~EV_EVENT_BITS
345 // to retrieve the actual event number
346 #define EV_EVENT_BIT1 0x00000100
347 #define EV_EVENT_BIT2 0x00000200
348 #define EV_EVENT_BITS (EV_EVENT_BIT1|EV_EVENT_BIT2)
349
350 #define EVENT_VALID_MSEC 300
351
352 typedef enum {
353 EV_NONE,
354
355 EV_FOOTSTEP,
356 EV_FOOTSTEP_METAL,
357 EV_FOOTSPLASH,
358 EV_FOOTWADE,
359 EV_SWIM,
360
361 EV_STEP_4,
362 EV_STEP_8,
363 EV_STEP_12,
364 EV_STEP_16,
365
366 EV_FALL_SHORT,
367 EV_FALL_MEDIUM,
368 EV_FALL_FAR,
369
370 EV_JUMP_PAD, // boing sound at origin, jump sound on player
371
372 EV_JUMP,
373 EV_WATER_TOUCH, // foot touches
374 EV_WATER_LEAVE, // foot leaves
375 EV_WATER_UNDER, // head touches
376 EV_WATER_CLEAR, // head leaves
377
378 EV_ITEM_PICKUP, // normal item pickups are predictable
379 EV_GLOBAL_ITEM_PICKUP, // powerup / team sounds are broadcast to everyone
380
381 EV_NOAMMO,
382 EV_CHANGE_WEAPON,
383 EV_FIRE_WEAPON,
384
385 EV_USE_ITEM0,
386 EV_USE_ITEM1,
387 EV_USE_ITEM2,
388 EV_USE_ITEM3,
389 EV_USE_ITEM4,
390 EV_USE_ITEM5,
391 EV_USE_ITEM6,
392 EV_USE_ITEM7,
393 EV_USE_ITEM8,
394 EV_USE_ITEM9,
395 EV_USE_ITEM10,
396 EV_USE_ITEM11,
397 EV_USE_ITEM12,
398 EV_USE_ITEM13,
399 EV_USE_ITEM14,
400 EV_USE_ITEM15,
401
402 EV_ITEM_RESPAWN,
403 EV_ITEM_POP,
404 EV_PLAYER_TELEPORT_IN,
405 EV_PLAYER_TELEPORT_OUT,
406
407 EV_GRENADE_BOUNCE, // eventParm will be the soundindex
408
409 EV_GENERAL_SOUND,
410 EV_GLOBAL_SOUND, // no attenuation
411 EV_GLOBAL_TEAM_SOUND,
412
413 EV_BULLET_HIT_FLESH,
414 EV_BULLET_HIT_WALL,
415
416 EV_MISSILE_HIT,
417 EV_MISSILE_MISS,
418 EV_MISSILE_MISS_METAL,
419 EV_RAILTRAIL,
420 EV_SHOTGUN,
421 EV_BULLET, // otherEntity is the shooter
422
423 EV_PAIN,
424 EV_DEATH1,
425 EV_DEATH2,
426 EV_DEATH3,
427 EV_OBITUARY,
428
429 EV_POWERUP_QUAD,
430 EV_POWERUP_BATTLESUIT,
431 EV_POWERUP_REGEN,
432
433 EV_GIB_PLAYER, // gib a previously living player
434 EV_SCOREPLUM, // score plum
435
436 //#ifdef MISSIONPACK
437 EV_PROXIMITY_MINE_STICK,
438 EV_PROXIMITY_MINE_TRIGGER,
439 EV_KAMIKAZE, // kamikaze explodes
440 EV_OBELISKEXPLODE, // obelisk explodes
441 EV_OBELISKPAIN, // obelisk is in pain
442 EV_INVUL_IMPACT, // invulnerability sphere impact
443 EV_JUICED, // invulnerability juiced effect
444 EV_LIGHTNINGBOLT, // lightning bolt bounced of invulnerability sphere
445 //#endif
446
447 EV_DEBUG_LINE,
448 EV_STOPLOOPINGSOUND,
449 EV_TAUNT,
450 EV_TAUNT_YES,
451 EV_TAUNT_NO,
452 EV_TAUNT_FOLLOWME,
453 EV_TAUNT_GETFLAG,
454 EV_TAUNT_GUARDBASE,
455 EV_TAUNT_PATROL
456
457 } entity_event_t;
458
459
460 typedef enum {
461 GTS_RED_CAPTURE,
462 GTS_BLUE_CAPTURE,
463 GTS_RED_RETURN,
464 GTS_BLUE_RETURN,
465 GTS_RED_TAKEN,
466 GTS_BLUE_TAKEN,
467 GTS_REDOBELISK_ATTACKED,
468 GTS_BLUEOBELISK_ATTACKED,
469 GTS_REDTEAM_SCORED,
470 GTS_BLUETEAM_SCORED,
471 GTS_REDTEAM_TOOK_LEAD,
472 GTS_BLUETEAM_TOOK_LEAD,
473 GTS_TEAMS_ARE_TIED,
474 GTS_KAMIKAZE
475 } global_team_sound_t;
476
477 // animations
478 typedef enum {
479 BOTH_DEATH1,
480 BOTH_DEAD1,
481 BOTH_DEATH2,
482 BOTH_DEAD2,
483 BOTH_DEATH3,
484 BOTH_DEAD3,
485
486 TORSO_GESTURE,
487
488 TORSO_ATTACK,
489 TORSO_ATTACK2,
490
491 TORSO_DROP,
492 TORSO_RAISE,
493
494 TORSO_STAND,
495 TORSO_STAND2,
496
497 LEGS_WALKCR,
498 LEGS_WALK,
499 LEGS_RUN,
500 LEGS_BACK,
501 LEGS_SWIM,
502
503 LEGS_JUMP,
504 LEGS_LAND,
505
506 LEGS_JUMPB,
507 LEGS_LANDB,
508
509 LEGS_IDLE,
510 LEGS_IDLECR,
511
512 LEGS_TURN,
513
514 TORSO_GETFLAG,
515 TORSO_GUARDBASE,
516 TORSO_PATROL,
517 TORSO_FOLLOWME,
518 TORSO_AFFIRMATIVE,
519 TORSO_NEGATIVE,
520
521 MAX_ANIMATIONS,
522
523 LEGS_BACKCR,
524 LEGS_BACKWALK,
525 FLAG_RUN,
526 FLAG_STAND,
527 FLAG_STAND2RUN,
528
529 MAX_TOTALANIMATIONS
530 } animNumber_t;
531
532
533 typedef struct animation_s {
534 int firstFrame;
535 int numFrames;
536 int loopFrames; // 0 to numFrames
537 int frameLerp; // msec between frames
538 int initialLerp; // msec to get to first frame
539 int reversed; // true if animation is reversed
540 int flipflop; // true if animation should flipflop back to base
541 } animation_t;
542
543
544 // flip the togglebit every time an animation
545 // changes so a restart of the same anim can be detected
546 #define ANIM_TOGGLEBIT 128
547
548
549 typedef enum {
550 TEAM_FREE,
551 TEAM_RED,
552 TEAM_BLUE,
553 TEAM_SPECTATOR,
554
555 TEAM_NUM_TEAMS
556 } team_t;
557
558 // Time between location updates
559 #define TEAM_LOCATION_UPDATE_TIME 1000
560
561 // How many players on the overlay
562 #define TEAM_MAXOVERLAY 32
563
564 //team task
565 typedef enum {
566 TEAMTASK_NONE,
567 TEAMTASK_OFFENSE,
568 TEAMTASK_DEFENSE,
569 TEAMTASK_PATROL,
570 TEAMTASK_FOLLOW,
571 TEAMTASK_RETRIEVE,
572 TEAMTASK_ESCORT,
573 TEAMTASK_CAMP
574 } teamtask_t;
575
576 // means of death
577 typedef enum {
578 MOD_UNKNOWN,
579 MOD_SHOTGUN,
580 MOD_GAUNTLET,
581 MOD_MACHINEGUN,
582 MOD_GRENADE,
583 MOD_GRENADE_SPLASH,
584 MOD_ROCKET,
585 MOD_ROCKET_SPLASH,
586 MOD_PLASMA,
587 MOD_PLASMA_SPLASH,
588 MOD_RAILGUN,
589 MOD_LIGHTNING,
590 MOD_BFG,
591 MOD_BFG_SPLASH,
592 MOD_WATER,
593 MOD_SLIME,
594 MOD_LAVA,
595 MOD_CRUSH,
596 MOD_TELEFRAG,
597 MOD_FALLING,
598 MOD_SUICIDE,
599 MOD_TARGET_LASER,
600 MOD_TRIGGER_HURT,
601 #ifdef MISSIONPACK
602 MOD_NAIL,
603 MOD_CHAINGUN,
604 MOD_PROXIMITY_MINE,
605 MOD_KAMIKAZE,
606 MOD_JUICED,
607 #endif
608 MOD_GRAPPLE
609 } meansOfDeath_t;
610
611
612 //---------------------------------------------------------
613
614 // gitem_t->type
615 typedef enum {
616 IT_BAD,
617 IT_WEAPON, // EFX: rotate + upscale + minlight
618 IT_AMMO, // EFX: rotate
619 IT_ARMOR, // EFX: rotate + minlight
620 IT_HEALTH, // EFX: static external sphere + rotating internal
621 IT_POWERUP, // instant on, timer based
622 // EFX: rotate + external ring that rotates
623 IT_HOLDABLE, // single use, holdable item
624 // EFX: rotate + bob
625 IT_PERSISTANT_POWERUP,
626 IT_TEAM
627 } itemType_t;
628
629 #define MAX_ITEM_MODELS 4
630
631 typedef struct gitem_s {
632 char *classname; // spawning name
633 char *pickup_sound;
634 char *world_model[MAX_ITEM_MODELS];
635
636 char *icon;
637 char *pickup_name; // for printing on pickup
638
639 int quantity; // for ammo how much, or duration of powerup
640 itemType_t giType; // IT_* flags
641
642 int giTag;
643
644 char *precaches; // string of all models and images this item will use
645 char *sounds; // string of all sounds this item will use
646 } gitem_t;
647
648 // included in both the game dll and the client
649 extern gitem_t bg_itemlist[];
650 extern int bg_numItems;
651
652 gitem_t *BG_FindItem( const char *pickupName );
653 gitem_t *BG_FindItemForWeapon( weapon_t weapon );
654 gitem_t *BG_FindItemForPowerup( powerup_t pw );
655 gitem_t *BG_FindItemForHoldable( holdable_t pw );
656 #define ITEM_INDEX(x) ((x)-bg_itemlist)
657
658 qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const playerState_t *ps );
659
660
661 // g_dmflags->integer flags
662 #define DF_NO_FALLING 8
663 #define DF_FIXED_FOV 16
664 #define DF_NO_FOOTSTEPS 32
665
666 // content masks
667 #define MASK_ALL (-1)
668 #define MASK_SOLID (CONTENTS_SOLID)
669 #define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY)
670 #define MASK_DEADSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP)
671 #define MASK_WATER (CONTENTS_WATER|CONTENTS_LAVA|CONTENTS_SLIME)
672 #define MASK_OPAQUE (CONTENTS_SOLID|CONTENTS_SLIME|CONTENTS_LAVA)
673 #define MASK_SHOT (CONTENTS_SOLID|CONTENTS_BODY|CONTENTS_CORPSE)
674
675
676 //
677 // entityState_t->eType
678 //
679 typedef enum {
680 ET_GENERAL,
681 ET_PLAYER,
682 ET_ITEM,
683 ET_MISSILE,
684 ET_MOVER,
685 ET_BEAM,
686 ET_PORTAL,
687 ET_SPEAKER,
688 ET_PUSH_TRIGGER,
689 ET_TELEPORT_TRIGGER,
690 ET_INVISIBLE,
691 ET_GRAPPLE, // grapple hooked on wall
692 ET_TEAM,
693
694 ET_EVENTS // any of the EV_* events can be added freestanding
695 // by setting eType to ET_EVENTS + eventNum
696 // this avoids having to set eFlags and eventNum
697 } entityType_t;
698
699
700
701 void BG_EvaluateTrajectory( const trajectory_t *tr, int atTime, vec3_t result );
702 void BG_EvaluateTrajectoryDelta( const trajectory_t *tr, int atTime, vec3_t result );
703
704 void BG_AddPredictableEventToPlayerstate( int newEvent, int eventParm, playerState_t *ps );
705
706 void BG_TouchJumpPad( playerState_t *ps, entityState_t *jumppad );
707
708 void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean snap );
709 void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s, int time, qboolean snap );
710
711 qboolean BG_PlayerTouchesItem( playerState_t *ps, entityState_t *item, int atTime );
712
713
714 #define ARENAS_PER_TIER 4
715 #define MAX_ARENAS 1024
716 #define MAX_ARENAS_TEXT 8192
717
718 #define MAX_BOTS 1024
719 #define MAX_BOTS_TEXT 8192
720
721
722 // Kamikaze
723
724 // 1st shockwave times
725 #define KAMI_SHOCKWAVE_STARTTIME 0
726 #define KAMI_SHOCKWAVEFADE_STARTTIME 1500
727 #define KAMI_SHOCKWAVE_ENDTIME 2000
728 // explosion/implosion times
729 #define KAMI_EXPLODE_STARTTIME 250
730 #define KAMI_IMPLODE_STARTTIME 2000
731 #define KAMI_IMPLODE_ENDTIME 2250
732 // 2nd shockwave times
733 #define KAMI_SHOCKWAVE2_STARTTIME 2000
734 #define KAMI_SHOCKWAVE2FADE_STARTTIME 2500
735 #define KAMI_SHOCKWAVE2_ENDTIME 3000
736 // radius of the models without scaling
737 #define KAMI_SHOCKWAVEMODEL_RADIUS 88
738 #define KAMI_BOOMSPHEREMODEL_RADIUS 72
739 // maximum radius of the models during the effect
740 #define KAMI_SHOCKWAVE_MAXRADIUS 1320
741 #define KAMI_BOOMSPHERE_MAXRADIUS 720
742 #define KAMI_SHOCKWAVE2_MAXRADIUS 704
743