2 * $Logfile: /Freespace2/code/Network/multi_team.h $
8 * Revision 1.1 2002/05/03 03:28:12 root
12 * 5 9/04/99 1:54p Dave
13 * externed team scores.
15 * 4 4/09/99 2:21p Dave
16 * Multiplayer beta stuff. CD checking.
18 * 3 2/17/99 2:11p Dave
19 * First full run of squad war. All freespace and tracker side stuff
22 * 2 10/07/98 10:53a Dave
25 * 1 10/07/98 10:50a Dave
27 * 8 5/22/98 9:35p Dave
28 * Put in channel based support for PXO. Put in "shutdown" button for
29 * standalone. UI tweaks for TvT
31 * 7 5/15/98 5:16p Dave
32 * Fix a standalone resetting bug.Tweaked PXO interface. Display captaincy
33 * status for team vs. team. Put in asserts to check for invalid team vs.
36 * 6 4/08/98 2:51p Dave
37 * Fixed pilot image xfer once again. Solidify team selection process in
38 * pre-briefing multiplayer.
40 * 5 3/31/98 4:51p Dave
41 * Removed medals screen and multiplayer buttons from demo version. Put in
42 * new pilot popup screen. Make ships in mp team vs. team have proper team
43 * ids. Make mp respawns a permanent option saved in the player file.
45 * 4 3/10/98 4:26p Dave
46 * Second pass at furball mode. Fixed several team vs. team bugs.
48 * 3 3/09/98 5:54p Dave
49 * Fixed stats to take asteroid hits into account. Polished up UI stuff in
50 * team select. Finished up pilot info popup. Tracked down and fixed
53 * 2 3/03/98 8:55p Dave
54 * Finished pre-briefing team vs. team support.
56 * 1 3/03/98 5:09p Dave
61 #ifndef _MULTI_TEAMPLAY_HEADER_FILE
62 #define _MULTI_TEAMPLAY_HEADER_FILE
64 // ------------------------------------------------------------------------------------
65 // MULTIPLAYER TEAMPLAY DEFINES/VARS
73 // score for teams 0 and 1 for this mission
74 extern int Multi_team0_score;
75 extern int Multi_team1_score;
77 // ------------------------------------------------------------------------------------
78 // MULTIPLAYER TEAMPLAY FUNCTIONS
81 // call before level load (pre-sync)
82 void multi_team_level_init();
84 // call to determine who won the sw match, -1 == tie, 0 == team 0, 1 == team 1
85 int multi_team_winner();
87 // call to add score to a team
88 void multi_team_maybe_add_score(int points, int team);
90 // reset all players and assign them to default teams
91 void multi_team_reset();
93 // set the captaincy status of this player
94 void multi_team_set_captain(net_player *pl,int set);
96 // set the team of this given player (if called by the host, the player becomes locked, cnad only the host can modify him from thereon)
97 void multi_team_set_team(net_player *pl,int team);
99 // is it ok for the host to hit commit
100 int multi_team_ok_to_commit();
102 // handle a player drop
103 void multi_team_handle_drop();
105 // handle a player join
106 void multi_team_handle_join(net_player *pl);
108 // send a full update on a player-per-player basis (should call this to update all players after other relevant function calls)
109 void multi_team_send_update();
111 // set all ships in the mission to be marked as the proper team (TEAM_HOSTILE, TEAM_FRIENLY)
112 void multi_team_mark_all_ships();
114 // set the proper team for the passed in ship
115 void multi_team_mark_ship(ship *sp);
117 // host locks all players into their teams
118 void multi_team_host_lock_all();
120 // verify that we have valid team stuff
121 void multi_team_verify();
123 // get the player counts for team 0 and team 1 (NULL values are valid)
124 void multi_team_get_player_counts(int *team0,int *team1);
126 // report on the winner/loser of the game via chat text
127 void multi_team_report();
129 // ------------------------------------------------------------------------------------
130 // MULTIPLAYER TEAMPLAY PACKET HANDLERS
133 // process an incoming team update packet
134 void multi_team_process_packet(unsigned char *data,header *hinfo);