]> icculus.org git repositories - btb/d2x.git/blob - main/multi.h
got rid of most warnings issued by cpp-precomp of gcc of Mac OS X
[btb/d2x.git] / main / multi.h
1 /* $Id: multi.h,v 1.11 2003-10-08 17:09:48 schaffner Exp $ */
2 /*
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
13 */
14
15 /*
16  *
17  * Defines and exported variables for multi.c
18  *
19  * Old Log:
20  * Revision 2.3  1995/04/03  08:49:50  john
21  * Added code to get someone's player struct.
22  *
23  * Revision 2.2  1995/03/27  12:59:17  john
24  * Initial version of multiplayer save games.
25  *
26  * Revision 2.1  1995/03/21  14:39:06  john
27  * Ifdef'd out the NETWORK code.
28  *
29  * Revision 2.0  1995/02/27  11:28:34  john
30  * New version 2.0, which has no anonymous unions, builds with
31  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
32  *
33  * Revision 1.74  1995/02/11  11:36:42  rob
34  * Added new var.
35  *
36  * Revision 1.73  1995/02/08  18:17:41  rob
37  * Added prototype for reset function.
38  *
39  * Revision 1.72  1995/02/05  14:37:42  rob
40  * Made object mapping more efficient.
41  *
42  * Revision 1.71  1995/02/01  18:07:36  rob
43  * Change object mapping to int functions.
44  *
45  * Revision 1.70  1995/02/01  12:55:00  rob
46  * Changed message type.
47  *
48  * Revision 1.69  1995/01/31  12:46:12  rob
49  * Fixed a bug with object overflow handling.
50  *
51  * Revision 1.68  1995/01/27  11:15:13  rob
52  * removed extern of variable no longer in multi.c
53  *
54  * Revision 1.67  1995/01/24  11:53:13  john
55  * Added better macro defining code.
56  *
57  * Revision 1.66  1995/01/24  11:32:03  john
58  * Added new defining macro method.
59  *
60  * Revision 1.65  1995/01/23  17:17:06  john
61  * Added multi_sending_message.
62  *
63  * Revision 1.64  1995/01/23  16:02:42  rob
64  * Added prototype for mission select function.
65  *
66  * Revision 1.63  1995/01/18  19:01:21  rob
67  * Added new message for hostage door sync.
68  *
69  * Revision 1.62  1995/01/14  18:39:57  rob
70  * Added new message type for dropping robot powerups.
71  *
72  * Revision 1.61  1995/01/12  21:41:13  rob
73  * Fixed incompat. with 1.0 and 1.1.
74  *
75  * Revision 1.60  1995/01/04  21:40:55  rob
76  * Added new type for boss actions in coop.
77  *
78  * Revision 1.59  1995/01/04  11:38:09  rob
79  * Fixed problem with lost character in messages.
80  *
81  * Revision 1.58  1995/01/03  20:12:44  rob
82  * Made max message length in shareware = 40.
83  *
84  * Revision 1.57  1995/01/03  14:27:25  rob
85  * ADded trigger messages.
86  *
87  * Revision 1.56  1995/01/02  20:08:21  rob
88  * Added robot creation.
89  *
90  * Revision 1.55  1995/01/02  14:41:30  rob
91  * Added score syncing.
92  *
93  * Revision 1.54  1994/12/21  21:02:01  rob
94  * Added new message type for ROBOT_FIRE
95  *
96  * Revision 1.53  1994/12/21  17:27:25  rob
97  * Changed the format for send_create_powerup messages.
98  *
99  *
100  * Revision 1.52  1994/12/20  20:41:39  rob
101  * ADded robot release message type.
102  *
103  * Revision 1.51  1994/12/19  19:00:12  rob
104  * Changed buf to multibuf so it can be safely externed.
105  *
106  * Revision 1.50  1994/12/19  16:41:14  rob
107  * Added new message types for robot support.
108  * Added prototype for external use of multi_send_data (from multibot.c)
109  *
110  * Revision 1.49  1994/12/11  13:30:13  rob
111  * Added new variables to get players out of nested menus.
112  *
113  * Revision 1.48  1994/12/11  01:58:57  rob
114  * Added variable to track menu deth..
115  *
116  * Revision 1.47  1994/12/08  12:41:17  rob
117  * Added audio taunts.
118  *
119  * Revision 1.46  1994/12/07  21:53:12  rob
120  * Fixing sequencing bugginess in modem/serial.
121  *
122  * Revision 1.45  1994/12/07  16:46:58  rob
123  * Added prototype.
124  *
125  * Revision 1.44  1994/12/01  12:22:31  rob
126  * Added de-cloak message for demo.
127  *
128  * Revision 1.43  1994/12/01  00:54:14  rob
129  * Added variable for tracking homing missiles.
130  *
131  * Revision 1.42  1994/11/30  16:04:39  rob
132  * Added show reticle name variable for team games.
133  *
134  * Revision 1.41  1994/11/29  19:33:38  rob
135  * Team support.
136  *
137  * Revision 1.40  1994/11/29  12:49:37  rob
138  * Added more team support stuff.
139  *
140  * Revision 1.39  1994/11/28  21:20:49  rob
141  * Cleaned up the .h file, removed an unused function.
142  *
143  * Revision 1.38  1994/11/28  21:04:50  rob
144  * Added support for network sound-casting.
145  *
146  * Revision 1.37  1994/11/28  14:02:08  rob
147  * Added protocol versioning for registered versus shareware.
148  *
149  * Revision 1.36  1994/11/28  13:30:04  rob
150  * Added a define for protocol version.
151  *
152  * Revision 1.35  1994/11/22  19:19:48  rob
153  * remove unused function.
154  *
155  * Revision 1.34  1994/11/22  18:47:34  rob
156  * Added hooks for modem support for secret levels.
157  *
158  * Revision 1.33  1994/11/22  17:10:50  rob
159  * Fix for secret levels in network play mode.
160  *
161  * Revision 1.32  1994/11/21  16:00:28  rob
162  * Added secret-level hooks.
163  *
164  * Revision 1.31  1994/11/18  18:28:50  rob
165  * Added new function for multiplayer score screen.
166  *
167  * Revision 1.30  1994/11/18  16:31:05  rob
168  * Added kill list timer variable.
169  *
170  * Revision 1.29  1994/11/17  16:38:15  rob
171  * Added creation of net powerups.
172  *
173  * Revision 1.28  1994/11/17  13:37:33  rob
174  * Added prototype for multi_new_game.
175  *
176  * Revision 1.27  1994/11/17  12:58:45  rob
177  * Added kill matrix.
178  *
179  * Revision 1.26  1994/11/16  20:35:24  rob
180  * Changed explosion hook.
181  *
182  * Revision 1.25  1994/11/15  21:31:13  rob
183  * Bumped max message size, was giving modem.c fits.
184  *
185  * Revision 1.24  1994/11/15  19:28:37  matt
186  * Added prototypes
187  *
188  * Revision 1.23  1994/11/14  17:22:19  rob
189  * Added extern for message macros.
190  *
191  * Revision 1.22  1994/11/11  18:16:44  rob
192  * Made multi_menu_poll return a value to exit menus.
193  *
194  * Revision 1.21  1994/11/11  11:06:19  rob
195  * Added prototype for multi_menu_poll.
196  *
197  * Revision 1.20  1994/11/10  21:48:41  rob
198  * Changed multi_endlevel to return an int.
199  *
200  * Revision 1.19  1994/11/08  17:48:14  rob
201  * Fixing endlevel stuff.
202  *
203  * Revision 1.18  1994/11/07  17:49:07  rob
204  * Changed prototype for object mapping funcs.
205  *
206  * Revision 1.17  1994/11/07  15:46:32  rob
207  * Changed the way remote object number mapping works, and it was a real
208  * pain in the ass..  I think it will work more reliably now.
209  *
210  * Revision 1.16  1994/11/04  19:53:01  rob
211  * Added a new message type for Player_leave 'explosions'.
212  * Added a prototype for function moved over from network.c
213  *
214  * Revision 1.15  1994/11/02  18:02:33  rob
215  * Added message type for control center firing.
216  *
217  * Revision 1.14  1994/11/02  11:38:00  rob
218  * Added player-in-process-of-dying explosions to network game.
219  *
220  * Revision 1.13  1994/11/01  19:31:44  rob
221  * Bumped max_net_create_objects to 20 to accomodate a fully equipped
222  * character blowing up.
223  *
224  * Revision 1.12  1994/10/31  13:48:02  rob
225  * Fixed bug in opening doors over network/modem.  Added a new message
226  * type to multi.c that communicates door openings across the net.
227  * Changed includes in multi.c and wall.c to accomplish this.
228  *
229  * Revision 1.11  1994/10/09  20:08:20  rob
230  * Added some exported func prototypes.
231  * Changed max net message length to 25 (from 30).
232  * Removed some message types no longer used.
233  *
234  * Revision 1.10  1994/10/08  20:06:10  rob
235  * fixed a typo.
236  *
237  * Revision 1.9  1994/10/08  19:59:43  rob
238  * Moved MAX_MESSAGE_LEN to here.
239  *
240  * Revision 1.8  1994/10/07  23:09:54  rob
241  * Fixed some prototypes.
242  *
243  * Revision 1.7  1994/10/07  18:11:19  rob
244  * Added multi_do_death to multi.c.
245  *
246  * Revision 1.6  1994/10/07  16:14:32  rob
247  * Added new message type for player reappear
248  *
249  * Revision 1.5  1994/10/07  12:58:17  rob
250  * Added multi_leave_game.
251  *
252  * Revision 1.4  1994/10/07  12:17:17  rob
253  * Fixed some stuff in multi_do_frame and exported the message_length
254  * array.
255  *
256  * Revision 1.3  1994/10/07  11:10:17  john
257  * Added function to parse multiple messages into individual
258  * messages.
259  *
260  * Revision 1.2  1994/10/07  10:28:06  rob
261  * Headers and stuff for multi.c (obviously)
262  *
263  * Revision 1.1  1994/10/06  16:07:39  rob
264  * Initial revision
265  *
266  *
267  */
268
269 #ifndef _MULTI_H
270 #define _MULTI_H
271
272 #define MAX_MESSAGE_LEN 35
273
274 // Defines
275 #include "gameseq.h"
276 #include "piggy.h"
277
278 // What version of the multiplayer protocol is this?
279
280 #ifdef SHAREWARE
281 #define MULTI_PROTO_VERSION 3
282 #else
283 #define MULTI_PROTO_VERSION 4
284 #endif
285
286 // Protocol versions:
287 //   1 Descent Shareware
288 //   2 Descent Registered/Commercial
289 //   3 Descent II Shareware
290 //   4 Descent II Commercial
291
292 // Save multiplayer games?
293
294 #define MULTI_SAVE
295
296 // How many simultaneous network players do we support?
297
298 #define MAX_NUM_NET_PLAYERS     8
299
300 #define MULTI_POSITION          0
301 #define MULTI_REAPPEAR          1
302 #define MULTI_FIRE              2
303 #define MULTI_KILL              3
304 #define MULTI_REMOVE_OBJECT     4
305 #define MULTI_PLAYER_EXPLODE    5
306 #define MULTI_MESSAGE           6
307 #define MULTI_QUIT              7
308 #define MULTI_PLAY_SOUND        8
309 #define MULTI_BEGIN_SYNC        9
310 #define MULTI_CONTROLCEN        10
311 #define MULTI_ROBOT_CLAIM       11
312 #define MULTI_END_SYNC          12
313 #define MULTI_CLOAK             13
314 #define MULTI_ENDLEVEL_START    14
315 #define MULTI_DOOR_OPEN         15
316 #define MULTI_CREATE_EXPLOSION  16
317 #define MULTI_CONTROLCEN_FIRE   17
318 #define MULTI_PLAYER_DROP       18
319 #define MULTI_CREATE_POWERUP    19
320 #define MULTI_CONSISTENCY       20
321 #define MULTI_DECLOAK           21
322 #define MULTI_MENU_CHOICE       22
323 #define MULTI_ROBOT_POSITION    23
324 #define MULTI_ROBOT_EXPLODE     24
325 #define MULTI_ROBOT_RELEASE     25
326 #define MULTI_ROBOT_FIRE        26
327 #define MULTI_SCORE             27
328 #define MULTI_CREATE_ROBOT      28
329 #define MULTI_TRIGGER           29
330 #define MULTI_BOSS_ACTIONS      30
331 #define MULTI_CREATE_ROBOT_POWERUPS 31
332 #define MULTI_HOSTAGE_DOOR      32
333
334 #define MULTI_SAVE_GAME         33
335 #define MULTI_RESTORE_GAME      34
336
337 #define MULTI_REQ_PLAYER        35  // Someone requests my player structure
338 #define MULTI_SEND_PLAYER       36  // Sending someone my player structure
339 #define MULTI_MARKER            37
340 #define MULTI_DROP_WEAPON       38
341 #define MULTI_GUIDED            39
342 #define MULTI_STOLEN_ITEMS      40
343 #define MULTI_WALL_STATUS       41  // send to new players
344 #define MULTI_HEARTBEAT         42
345 #define MULTI_KILLGOALS         43
346 #define MULTI_SEISMIC           44
347 #define MULTI_LIGHT             45
348 #define MULTI_START_TRIGGER     46
349 #define MULTI_FLAGS             47
350 #define MULTI_DROP_BLOB         48
351 #define MULTI_POWERUP_UPDATE    49
352 #define MULTI_ACTIVE_DOOR       50
353 #define MULTI_SOUND_FUNCTION    51
354 #define MULTI_CAPTURE_BONUS     52
355 #define MULTI_GOT_FLAG          53
356 #define MULTI_DROP_FLAG         54
357 #define MULTI_ROBOT_CONTROLS    55
358 #define MULTI_FINISH_GAME       56
359 #define MULTI_RANK              57
360 #define MULTI_MODEM_PING        58
361 #define MULTI_MODEM_PING_RETURN 59
362 #define MULTI_ORB_BONUS         60
363 #define MULTI_GOT_ORB           61
364 #define MULTI_DROP_ORB          62
365 #define MULTI_PLAY_BY_PLAY      63
366
367 #define MULTI_MAX_TYPE          63
368
369 #define MAX_NET_CREATE_OBJECTS  40
370
371 #define MAX_MULTI_MESSAGE_LEN   120
372
373 // Exported functions
374
375 int objnum_remote_to_local(int remote_obj, int owner);
376 int objnum_local_to_remote(int local_obj, sbyte *owner);
377 void map_objnum_local_to_remote(int local, int remote, int owner);
378 void map_objnum_local_to_local(int objnum);
379
380 void multi_init_objects(void);
381 void multi_show_player_list(void);
382 void multi_do_frame(void);
383
384
385 void multi_send_flags(char);
386 void multi_send_fire(void);
387 void multi_send_destroy_controlcen(int objnum, int player);
388 void multi_send_endlevel_start(int);
389 void multi_send_player_explode(char type);
390 void multi_send_message(void);
391 void multi_send_position(int objnum);
392 void multi_send_reappear();
393 void multi_send_kill(int objnum);
394 void multi_send_remobj(int objnum);
395 void multi_send_quit(int why);
396 void multi_send_door_open(int segnum, int side,ubyte flag);
397 void multi_send_create_explosion(int player_num);
398 void multi_send_controlcen_fire(vms_vector *to_target, int gun_num, int objnum);
399 void multi_send_cloak(void);
400 void multi_send_decloak(void);
401 void multi_send_create_powerup(int powerup_type, int segnum, int objnum, vms_vector *pos);
402 void multi_send_play_sound(int sound_num, fix volume);
403 void multi_send_audio_taunt(int taunt_num);
404 void multi_send_score(void);
405 void multi_send_trigger(int trigger);
406 void multi_send_hostage_door_status(int wallnum);
407 void multi_send_netplayer_stats_request(ubyte player_num);
408 void multi_send_drop_weapon (int objnum,int seed);
409 void multi_send_drop_marker (int player,vms_vector position,char messagenum,char text[]);
410 void multi_send_guided_info (object *miss,char);
411
412
413 void multi_endlevel_score(void);
414 void multi_prep_level(void);
415 int multi_endlevel(int *secret);
416 int multi_menu_poll(void);
417 void multi_leave_game(void);
418 void multi_process_data(char *dat, int len);
419 void multi_process_bigdata(char *buf, int len);
420 void multi_do_death(int objnum);
421 void multi_send_message_dialog(void);
422 int multi_delete_extra_objects(void);
423 void multi_make_ghost_player(int objnum);
424 void multi_make_player_ghost(int objnum);
425 void multi_define_macro(int key);
426 void multi_send_macro(int key);
427 int multi_get_kill_list(int *plist);
428 void multi_new_game(void);
429 void multi_sort_kill_list(void);
430 int multi_choose_mission(int *anarchy_only);
431 void multi_reset_stuff(void);
432
433 void multi_send_data(char *buf, int len, int repeat);
434
435 int get_team(int pnum);
436
437 // Exported variables
438
439
440 extern int Network_active;
441 extern int Network_laser_gun;
442 extern int Network_laser_fired;
443 extern int Network_laser_level;
444 extern int Network_laser_flags;
445 extern int Netlife_kills,Netlife_killed;
446
447 extern int message_length[MULTI_MAX_TYPE+1];
448 extern char multibuf[MAX_MULTI_MESSAGE_LEN+4];
449 extern short Network_laser_track;
450
451 extern int who_killed_controlcen;
452
453 extern int Net_create_objnums[MAX_NET_CREATE_OBJECTS];
454 extern int Net_create_loc;
455
456 extern short kill_matrix[MAX_NUM_NET_PLAYERS][MAX_NUM_NET_PLAYERS];
457 extern short team_kills[2];
458
459 extern int multi_goto_secret;
460
461 //do we draw the kill list on the HUD?
462 extern int Show_kill_list;
463 extern int Show_reticle_name;
464 extern fix Show_kill_list_timer;
465
466 // Used to send network messages
467
468 extern char Network_message[MAX_MESSAGE_LEN];
469 extern char Network_message_macro[4][MAX_MESSAGE_LEN];
470 extern int Network_message_reciever;
471
472 // Used to map network to local object numbers
473
474 extern short remote_to_local[MAX_NUM_NET_PLAYERS][MAX_OBJECTS];  // Network object num for each 
475 extern short local_to_remote[MAX_OBJECTS];   // Local object num for each network objnum
476 extern sbyte object_owner[MAX_OBJECTS]; // Who 'owns' each local object for network purposes
477
478 extern int multi_in_menu; // Flag to tell if we're executing GameLoop from within a newmenu.
479 extern int multi_leave_menu;
480 extern int multi_quit_game;
481
482 extern int multi_sending_message;
483 extern int multi_defining_message;
484 extern void multi_message_input_sub( int key );
485 extern void multi_send_message_start();
486
487 extern int multi_powerup_is_4pack(int );
488 extern void multi_send_orb_bonus( char pnum );
489 extern void multi_send_got_orb( char pnum );
490 extern void multi_add_lifetime_kills(void);
491
492 extern int control_invul_time;
493
494 #define N_PLAYER_SHIP_TEXTURES 6
495
496 extern bitmap_index multi_player_textures[MAX_NUM_NET_PLAYERS][N_PLAYER_SHIP_TEXTURES];
497
498 #define NETGAME_FLAG_CLOSED             1
499 #define NETGAME_FLAG_SHOW_ID            2
500 #define NETGAME_FLAG_SHOW_MAP           4
501 #define NETGAME_FLAG_HOARD              8
502 #define NETGAME_FLAG_TEAM_HOARD         16
503 #define NETGAME_FLAG_REALLY_ENDLEVEL    32
504 #define NETGAME_FLAG_REALLY_FORMING     64
505
506 #define NETGAME_NAME_LEN                15
507
508 enum comp_type {DOS,WIN_32,WIN_95,MAC} __pack__ ;
509
510 // sigh...the socket structure member was moved away from it's friends.
511 // I'll have to create a union for appletalk network info with just
512 // the server and node members since I cannot change the order ot these
513 // members.
514
515 typedef struct netplayer_info {
516         char    callsign[CALLSIGN_LEN+1];
517         union {
518                 struct {
519                         ubyte   server[4];
520                         ubyte   node[6];
521                 } ipx;
522                 struct {
523                         ushort  net;
524                         ubyte   node;
525                         ubyte   socket;
526                 } appletalk;
527         } network;
528
529         ubyte   version_major;
530         ubyte   version_minor;
531         enum comp_type computer_type;
532         sbyte    connected;
533
534         ushort  socket;
535
536         ubyte   rank;
537
538 } __pack__ netplayer_info;
539
540 typedef struct AllNetPlayers_info
541 {
542         char    type;
543         int     Security;
544         struct netplayer_info players[MAX_PLAYERS+4];
545 } __pack__ AllNetPlayers_info;
546
547 typedef struct netgame_info {
548         ubyte   type;
549         int     Security;
550         char    game_name[NETGAME_NAME_LEN+1];
551         char    mission_title[MISSION_NAME_LEN+1];
552         char    mission_name[9];
553         int     levelnum;
554         ubyte   gamemode;
555         ubyte   RefusePlayers;
556         ubyte   difficulty;
557         ubyte   game_status;
558         ubyte   numplayers;
559         ubyte   max_numplayers;
560         ubyte   numconnected;
561         ubyte   game_flags;
562         ubyte   protocol_version;
563         ubyte   version_major;
564         ubyte   version_minor;
565         ubyte   team_vector;
566
567 // change the order of the bit fields for the mac compiler.
568 // doing so will mean I don't have to do screwy things to
569 // send this as network information
570
571 #ifndef WORDS_BIGENDIAN
572         short DoMegas:1;
573         short DoSmarts:1;
574         short DoFusions:1;
575         short DoHelix:1;
576         short DoPhoenix:1;
577         short DoAfterburner:1;
578         short DoInvulnerability:1;
579         short DoCloak:1;
580         short DoGauss:1;
581         short DoVulcan:1;
582         short DoPlasma:1;
583         short DoOmega:1;
584         short DoSuperLaser:1;
585         short DoProximity:1;
586         short DoSpread:1;
587         short DoSmartMine:1;
588         short DoFlash:1;
589         short DoGuided:1;
590         short DoEarthShaker:1;
591         short DoMercury:1;
592         short Allow_marker_view:1;
593         short AlwaysLighting:1;
594         short DoAmmoRack:1;
595         short DoConverter:1;
596         short DoHeadlight:1;
597         short DoHoming:1;
598         short DoLaserUpgrade:1;
599         short DoQuadLasers:1;
600         short ShowAllNames:1;
601         short BrightPlayers:1;
602         short invul:1;
603         short bitfield_not_used2:1;
604 #else
605         short DoSmartMine:1;
606         short DoSpread:1;
607         short DoProximity:1;
608         short DoSuperLaser:1;
609         short DoOmega:1;
610         short DoPlasma:1;
611         short DoVulcan:1;
612         short DoGauss:1;
613         short DoCloak:1;
614         short DoInvulnerability:1;
615         short DoAfterburner:1;
616         short DoPhoenix:1;
617         short DoHelix:1;
618         short DoFusions:1;
619         short DoSmarts:1;
620         short DoMegas:1;
621
622         short bitfield_not_used2:1;
623         short invul:1;
624         short BrightPlayers:1;
625         short ShowAllNames:1;
626         short DoQuadLasers:1;
627         short DoLaserUpgrade:1;
628         short DoHoming:1;
629         short DoHeadlight:1;
630         short DoConverter:1;
631         short DoAmmoRack:1;
632         short AlwaysLighting:1;
633         short Allow_marker_view:1;
634         short DoMercury:1;
635         short DoEarthShaker:1;
636         short DoGuided:1;
637         short DoFlash:1;
638 #endif
639
640         char    team_name[2][CALLSIGN_LEN+1];
641         int     locations[MAX_PLAYERS];
642         short   kills[MAX_PLAYERS][MAX_PLAYERS];
643         ushort  segments_checksum;
644         short   team_kills[2];
645         short   killed[MAX_PLAYERS];
646         short   player_kills[MAX_PLAYERS];
647         int     KillGoal;
648         fix     PlayTimeAllowed;
649         fix     level_time;
650         int     control_invul_time;
651         int     monitor_vector;
652         int     player_score[MAX_PLAYERS];
653         ubyte   player_flags[MAX_PLAYERS];
654         short   PacketsPerSec;
655         ubyte   ShortPackets;
656
657 } __pack__ netgame_info;
658
659 extern struct netgame_info Netgame;
660 extern struct AllNetPlayers_info NetPlayers;
661
662 int network_i_am_master(void);
663 void change_playernum_to(int new_pnum);
664
665 //how to encode missiles & flares in weapon packets
666 #define MISSILE_ADJUST  100
667 #define FLARE_ADJUST    127
668
669
670 #endif