FS2_Open
Open source remastering of the Freespace 2 engine
multi_options.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 
13 #include "cmdline/cmdline.h"
14 #include "osapi/osregistry.h"
15 #include "network/multi.h"
16 #include "network/multimsgs.h"
17 #include "network/multi_obj.h"
18 #include "freespace2/freespace.h"
19 #include "network/stand_gui.h"
20 #include "network/multiutil.h"
21 #include "network/multi_voice.h"
22 #include "network/multi_options.h"
23 #include "network/multi_team.h"
25 #include "mission/missionparse.h"
26 #include "parse/parselo.h"
27 #include "playerman/player.h"
28 #include "cfile/cfile.h"
29 #include "fs2netd/fs2netd_client.h"
30 
31 #include <limits.h>
32 
33 
34 
35 // ----------------------------------------------------------------------------------
36 // MULTI OPTIONS DEFINES/VARS
37 //
38 
39 // packet codes
40 #define MULTI_OPTION_SERVER 0 // server update follows
41 #define MULTI_OPTION_LOCAL 1 // local netplayer options follow
42 #define MULTI_OPTION_START_GAME 2 // host's start game options on the standalone server
43 #define MULTI_OPTION_MISSION 3 // host's mission selection stuff on a standalone server
44 
45 // global options
46 #define MULTI_CFG_FILE NOX("multi.cfg")
48 
49 char Multi_options_proxy[512] = "";
51 
52 // ----------------------------------------------------------------------------------
53 // MULTI OPTIONS FUNCTIONS
54 //
55 
56 // load in the config file
57 #define NEXT_TOKEN() do { tok = strtok(NULL, "\n"); if(tok != NULL){ drop_leading_white_space(tok); drop_trailing_white_space(tok); } } while(0);
58 #define SETTING(s) ( !stricmp(tok, s) )
60 {
61  CFILE *in;
62  char str[512];
63  char *tok = NULL;
64 
65  // set default value for the global multi options
66  Multi_options_g.reset();
67 
68  ushort forced_port = (ushort)os_config_read_uint(NULL, "ForcePort", 0);
69  Multi_options_g.port = (Cmdline_network_port >= 0) ? (ushort)Cmdline_network_port : forced_port == 0 ? (ushort)DEFAULT_GAME_PORT : forced_port;
70  Multi_options_g.log = (Cmdline_multi_log) ? 1 : 0;
71 
72 
73  // read in the config file
75 
76  // if we failed to open the config file, user default settings
77  if (in == NULL) {
78  nprintf(("Network","Failed to open network config file, using default settings\n"));
79  } else {
80  while ( !cfeof(in) ) {
81  // read in the game info
82  memset(str, 0, 512);
83  cfgets(str, 512, in);
84 
85  // parse the first line
86  tok = strtok(str, " \t");
87 
88  // check the token
89  if (tok != NULL) {
92  } else {
93  continue;
94  }
95 
96  // all possible options
97 
98  // only standalone cares about the following options
99  if (Is_standalone) {
100  // setup PXO mode
101  if ( SETTING("+pxo") ) {
102  NEXT_TOKEN();
103  if (tok != NULL) {
104  strncpy(Multi_fs_tracker_channel, tok, MAX_PATH-1);
105  }
106  } else
107  // set the standalone server's permanent name
108  if ( SETTING("+name") ) {
109  NEXT_TOKEN();
110  if (tok != NULL) {
111  strncpy(Multi_options_g.std_pname, tok, STD_NAME_LEN);
112  }
113  } else
114  // standalone won't allow voice transmission
115  if ( SETTING("+no_voice") ) {
116  Multi_options_g.std_voice = 0;
117  } else
118  // set the max # of players on the standalone
119  if ( SETTING("+max_players") ) {
120  NEXT_TOKEN();
121  if (tok != NULL) {
122  if ( !((atoi(tok) < 1) || (atoi(tok) > MAX_PLAYERS)) ) {
123  Multi_options_g.std_max_players = atoi(tok);
124  }
125  }
126  } else
127  // ban a player
128  if ( SETTING("+ban") ) {
129  NEXT_TOKEN();
130  if (tok != NULL) {
131  std_add_ban(tok);
132  }
133  } else
134  // set the standalone host password
135  if ( SETTING("+passwd") ) {
136  NEXT_TOKEN();
137  if (tok != NULL) {
138  strncpy(Multi_options_g.std_passwd, tok, STD_PASSWD_LEN);
139 #ifdef _WIN32
140  // yuck
142  SetWindowText(Multi_std_host_passwd, Multi_options_g.std_passwd);
143 #else
144  // TODO: get password ?
145  // argh, gonna have to figure out how to do this - mharris 07/07/2002
146 #endif
147  }
148  } else
149  // set standalone to low updates
150  if ( SETTING("+low_update") ) {
151  Multi_options_g.std_datarate = OBJ_UPDATE_LOW;
152  } else
153  // set standalone to medium updates
154  if ( SETTING("+med_update") ) {
155  Multi_options_g.std_datarate = OBJ_UPDATE_MEDIUM;
156  } else
157  // set standalone to high updates
158  if ( SETTING("+high_update") ) {
159  Multi_options_g.std_datarate = OBJ_UPDATE_HIGH;
160  } else
161  // set standalone to high updates
162  if ( SETTING("+lan_update") ) {
163  Multi_options_g.std_datarate = OBJ_UPDATE_LAN;
164  } else
165  // use pxo flag
166  if ( SETTING("+use_pxo") ) {
167  Om_tracker_flag = 1;
168  } else
169  // standalone pxo login user
170  if ( SETTING("+pxo_login") ) {
171  NEXT_TOKEN();
172  if (tok != NULL) {
173  strncpy(Multi_options_g.std_pxo_login, tok, MULTI_TRACKER_STRING_LEN);
174  }
175  } else
176  // standalone pxo login password
177  if ( SETTING("+pxo_password") ) {
178  NEXT_TOKEN();
179  if (tok != NULL) {
180  strncpy(Multi_options_g.std_pxo_password, tok, MULTI_TRACKER_STRING_LEN);
181  }
182  } else
183  if ( SETTING("+webui_root") ) {
184  NEXT_TOKEN();
185  if (tok != NULL) {
186  Multi_options_g.webuiRootDirectory = SCP_string(tok);
187  }
188  } else
189  if ( SETTING("+webapi_username") ) {
190  NEXT_TOKEN();
191  if (tok != NULL) {
192  Multi_options_g.webapiUsername = SCP_string(tok);
193  }
194  } else
195  if ( SETTING("+webapi_password") ) {
196  NEXT_TOKEN();
197  if (tok != NULL) {
198  Multi_options_g.webapiPassword = SCP_string(tok);
199  }
200  } else
201  if ( SETTING("+webapi_server_port") ) {
202  NEXT_TOKEN();
203  if (tok != NULL) {
204  long int result = strtol(tok, NULL, 10);
205  if(result <= 0 || result > USHRT_MAX) {
206  mprintf(("ERROR: Invalid or out of range webapi_server_port '%s' specified in multi.cfg, must be integer between 1024 and %i.\n", tok, USHRT_MAX));
207  }
208  else if(result < 1024) {
209  mprintf(("ERROR: webapi_server_port '%ld' in multi.cfg is too low, must be between 1024 and %d.\n", result, USHRT_MAX));
210  }
211  else {
212  mprintf(("Using webapi_server_port '%ld' from multi.cfg.\n", result));
213  Multi_options_g.webapiPort = (ushort) result;
214  }
215  }
216  }
217  }
218 
219  // ... common to all modes ...
220 
221  // ip addr of user tracker
222  if ( SETTING("+user_server") ) {
223  NEXT_TOKEN();
224  if (tok != NULL) {
225  strcpy_s(Multi_options_g.user_tracker_ip, tok);
226  }
227  } else
228  // ip addr of game tracker
229  if ( SETTING("+game_server") ) {
230  NEXT_TOKEN();
231  if (tok != NULL) {
232  strcpy_s(Multi_options_g.game_tracker_ip, tok);
233  }
234  } else
235  // port to use for the game/user tracker (FS2NetD)
236  if ( SETTING("+server_port") ) {
237  NEXT_TOKEN();
238  if (tok != NULL) {
239  strcpy_s(Multi_options_g.tracker_port, tok);
240  }
241  } else
242  // ip addr of pxo chat server
243  if ( SETTING("+chat_server") ) {
244  NEXT_TOKEN();
245  if (tok != NULL) {
246  strcpy_s(Multi_options_g.pxo_ip, tok);
247  }
248  } else
249  // url of pilot rankings page
250  if ( SETTING("+rank_url") ) {
251  NEXT_TOKEN();
252  if (tok != NULL) {
253  strcpy_s(Multi_options_g.pxo_rank_url, tok);
254  }
255  } else
256  // url of pxo account create page
257  if ( SETTING("+create_url") ) {
258  NEXT_TOKEN();
259  if (tok != NULL) {
260  strcpy_s(Multi_options_g.pxo_create_url, tok);
261  }
262  } else
263  // url of pxo account verify page
264  if ( SETTING("+verify_url") ) {
265  NEXT_TOKEN();
266  if (tok != NULL) {
267  strcpy_s(Multi_options_g.pxo_verify_url, tok);
268  }
269  } else
270  // url of pxo banners
271  if ( SETTING("+banner_url") ) {
272  NEXT_TOKEN();
273  if (tok != NULL) {
274  strcpy_s(Multi_options_g.pxo_banner_url, tok);
275  }
276  } else
277  // set the max datarate for high updates
278  if ( SETTING("+datarate") ) {
279  NEXT_TOKEN();
280  if (tok != NULL) {
281  if ( atoi(tok) >= 4000 ) {
282  Multi_options_g.datarate_cap = atoi(tok);
283  }
284  }
285  } else
286  // get the proxy server
287  if ( SETTING("+http_proxy") ) {
288  NEXT_TOKEN();
289  if (tok != NULL) {
290  char *ip = strtok(tok, ":");
291 
292  if (ip != NULL) {
294  }
295 
296  ip = strtok(NULL, "");
297 
298  if (ip != NULL) {
299  Multi_options_proxy_port = (ushort)atoi(ip);
300  } else {
302  }
303  }
304  }
305  }
306 
307  // close the config file
308  cfclose(in);
309  in = NULL;
310  }
311 
312 #ifndef _WIN32
313  if (Is_standalone) {
314  std_configLoaded(&Multi_options_g);
315  }
316 #endif
317 }
318 
319 // set netgame defaults
320 // NOTE : should be used when creating a newpilot
322 {
323  // any player can do squadmate messaging
324  options->squad_set = MSO_SQUAD_ANY;
325 
326  // only the host can end the game
327  options->endgame_set = MSO_END_HOST;
328 
329  // allow ingame file xfer and custom pilot pix
331 
332  // set the default time limit to be -1 (no limit)
333  options->mission_time_limit = fl2f(-1.0f);
334 
335  // set the default max kills for a mission
336  options->kill_limit = 9999;
337 
338  // set the default # of respawns
339  options->respawn = 2;
340 
341  // set the default # of max observers
342  options->max_observers = 2;
343 
344  // set the default netgame qos
345  options->voice_qos = 10;
346 
347  // set the default token timeout
348  options->voice_token_wait = 2000; // he must wait 2 seconds between voice gets
349 
350  // set the default max voice record time
351  options->voice_record_time = 5000;
352 }
353 
354 // set local netplayer defaults
355 // NOTE : should be used when creating a newpilot
357 {
358  // accept pix by default and broadcast on the local subnet
360 
361  // set the object update level based on the type of network connection specified by the user
362  // at install (or launcher) time.
364  options->obj_update_level = OBJ_UPDATE_LOW;
365  } else {
367  }
368 }
369 
370 // fill in the passed netgame options struct with the data from my player file data (only host/server should do this)
372 {
373  if(options != NULL){
374  memcpy(options,&Player->m_server_options,sizeof(multi_server_options));
375  }
376 }
377 
378 // fill in the passed local options struct with the data from my player file data (all machines except standalone should do this)
380 {
381  if(options != NULL){
382  memcpy(options,&Player->m_local_options,sizeof(multi_local_options));
383  }
384 
385  // stuff pxo squad info
386  if(pxo_pl != NULL){
388  }
389 }
390 
391 // add data from a multi_server_options struct
393 {
394  int packet_size = *size;
395  multi_server_options mso_tmp;
396 
397  memcpy(&mso_tmp, mso, sizeof(multi_server_options));
398 
399  mso_tmp.flags = INTEL_INT(mso->flags);
400  mso_tmp.respawn = INTEL_INT(mso->respawn);
403 // mso_tmp.mission_time_limit = INTEL_INT(mso->mission_time_limit);
404  mso_tmp.kill_limit = INTEL_INT(mso->kill_limit);
405 
406  ADD_DATA(mso_tmp);
407 
408  *size = packet_size;
409 }
410 
411 // add data from a multi_local_options struct
413 {
414  int packet_size = *size;
415  multi_local_options mlo_tmp;
416 
417  memcpy(&mlo_tmp, mlo, sizeof(multi_local_options));
418 
419  mlo_tmp.flags = INTEL_INT(mlo->flags);
421 
422  ADD_DATA(mlo_tmp);
423 
424  *size = packet_size;
425 }
426 
427 // get data from multi_server_options struct
429 {
430  int offset = *size;
431 
432  GET_DATA(*mso);
433 
434  mso->flags = INTEL_INT(mso->flags); //-V570
435  mso->respawn = INTEL_INT(mso->respawn); //-V570
436  mso->voice_token_wait = INTEL_INT(mso->voice_token_wait); //-V570
437  mso->voice_record_time = INTEL_INT(mso->voice_record_time); //-V570
438 // mso->mission_time_limit = INTEL_INT(mso->mission_time_limit);
439  mso->kill_limit = INTEL_INT(mso->kill_limit); //-V570
440 
441  *size = offset;
442 }
443 
444 // get data from multi_local_options struct
446 {
447  int offset = *size;
448 
449  GET_DATA(*mlo);
450 
451  mlo->flags = INTEL_INT(mlo->flags); //-V570
452  mlo->obj_update_level = INTEL_INT(mlo->obj_update_level); //-V570
453 
454  *size = offset;
455 }
456 
457 // update everyone on the current netgame options
459 {
461  int packet_size = 0;
462 
464 
465  // build the header and add the opcode
467  code = MULTI_OPTION_SERVER;
468  ADD_DATA(code);
469 
470  // add the netgame options
471  add_server_options(data, &packet_size, &Netgame.options);
472 
473  // send the packet
475  multi_io_send_to_all_reliable(data, packet_size);
476  } else {
477  multi_io_send_reliable(Net_player, data, packet_size);
478  }
479 }
480 
481 // update everyone with my local settings
483 {
485  int packet_size = 0;
486 
487  // if i'm the server, don't do anything
489  return;
490  }
491 
492  // build the header and add the opcode
494  code = MULTI_OPTION_LOCAL;
495  ADD_DATA(code);
496 
497  // add the netgame options
498  add_local_options(data, &packet_size, &Net_player->p_info.options);
499 
500  // send the packet
501  multi_io_send_reliable(Net_player, data, packet_size);
502 }
503 
504 // update the standalone with the settings I have picked at the "start game" screen
506 {
508  int packet_size = 0;
509 
510  // should be a host on a standalone
512 
513  // build the header
516  ADD_DATA(code);
517 
518  // add the start game options
519  ADD_STRING(ng->name);
520  ADD_INT(ng->mode);
521  ADD_INT(ng->security);
522 
523  // add mode-specific data
524  switch(ng->mode){
525  case NG_MODE_PASSWORD:
526  ADD_STRING(ng->passwd);
527  break;
528  case NG_MODE_RANK_ABOVE:
529  case NG_MODE_RANK_BELOW:
530  ADD_INT(ng->rank_base);
531  break;
532  }
533 
534  // send to the standalone server
535  multi_io_send_reliable(Net_player, data, packet_size);
536 }
537 
538 // update the standalone with the mission settings I have picked (mission filename, etc)
539 void multi_options_update_mission(netgame_info *ng, int campaign_mode)
540 {
542  int packet_size = 0;
543 
544  // should be a host on a standalone
546 
547  // build the header
549  code = MULTI_OPTION_MISSION;
550  ADD_DATA(code);
551 
552  // type (coop or team vs. team)
553  ADD_INT(ng->type_flags);
554 
555  // respawns
556  ADD_UINT(ng->respawn);
557 
558  // add the mission/campaign filename
559  code = (ubyte)campaign_mode;
560  ADD_DATA(code);
561  if(campaign_mode){
563  } else {
565  }
566 
567  // send to the server
568  multi_io_send_reliable(Net_player, data, packet_size);
569 }
570 
571 
572 // ----------------------------------------------------------------------------------
573 // MULTI OPTIONS FUNCTIONS
574 //
575 
576 // process an incoming multi options packet
577 void multi_options_process_packet(unsigned char *data, header *hinfo)
578 {
579  ubyte code;
580  multi_local_options bogus;
581  int idx,player_index;
582  char str[255];
583  int offset = HEADER_LENGTH;
584 
585  // find out who is sending this data
586  player_index = find_player_id(hinfo->id);
587 
588  if (player_index < 0) {
589  nprintf(("Network", "Received packet from unknown player!\n"));
590  return;
591  }
592 
593  // get the packet code
594  GET_DATA(code);
595  switch(code){
596  // get the start game options
599 
600  // get the netgame name
602 
603  // get the netgame mode
605 
606  // get the security #
608 
609  // get mode specific data
610  switch(Netgame.mode){
611  case NG_MODE_PASSWORD:
613  break;
614  case NG_MODE_RANK_ABOVE:
615  case NG_MODE_RANK_BELOW:
617  break;
618  }
619 
620  // update standalone stuff
623  break;
624 
625  // get mission choice options
627  netgame_info ng;
628  char title[NAME_LENGTH+1];
629  int campaign_type,max_players;
630 
631  memset(&ng,0,sizeof(netgame_info));
632 
633  Assert(Game_mode & GM_STANDALONE_SERVER);
634 
635  // coop or team vs. team mode
636  GET_INT(ng.type_flags);
639  }
640  // if squad war was switched on
642  mprintf(("STANDALONE TURNED ON SQUAD WAR!!\n"));
643  }
645 
646  // new respawn count
648 
649  // name string
650  memset(str,0,255);
651 
652  GET_DATA(code);
653  // campaign mode
654  if(code){
656 
657  // set the netgame max players here if the filename has changed
658  if(strcmp(Netgame.campaign_name,ng.campaign_name)){
659  memset(title,0,NAME_LENGTH+1);
660  if(!mission_campaign_get_info(ng.campaign_name,title,&campaign_type,&max_players)){
661  Netgame.max_players = 0;
662  } else {
663  Netgame.max_players = max_players;
664  }
665 
667  }
668 
670 
671  // put brackets around the campaign name
672  if(Game_mode & GM_STANDALONE_SERVER){
673  strcpy_s(str,"(");
675  strcat_s(str,")");
677  }
678  }
679  // non-campaign mode
680  else {
682 
683  if(strcmp(Netgame.mission_name,ng.mission_name)){
684  if(strlen(ng.mission_name)){
686  } else {
687  // setting this to -1 will prevent us from being seen on the network
688  Netgame.max_players = -1;
689  }
692  }
693 
695 
696  // set the mission name
697  if(Game_mode & GM_STANDALONE_SERVER){
699  }
700  }
701 
702  // update FS2NetD as well
703  if (MULTI_IS_TRACKER_GAME) {
705  }
706 
708  break;
709 
710  // get the netgame options
711  case MULTI_OPTION_SERVER:
712  get_server_options(data, &offset, &Netgame.options);
713 
714  // if we're a standalone set for no sound, do so here
715  if((Game_mode & GM_STANDALONE_SERVER) && !Multi_options_g.std_voice){
717  } else {
718  // maybe update the quality of sound
720  }
721 
722  // set the skill level
724 
725  if((Game_mode & GM_STANDALONE_SERVER) && !(Game_mode & GM_CAMPAIGN_MODE)){
727  }
728 
729  // if we have the "temp closed" flag toggle
732  }
734 
735  // if i'm the standalone server, I should rebroadcast to all other players
736  if(Game_mode & GM_STANDALONE_SERVER){
737  for(idx=0;idx<MAX_PLAYERS;idx++){
738  if(MULTI_CONNECTED(Net_players[idx]) && (Net_player != &Net_players[idx]) && (&Net_players[idx] != &Net_players[player_index]) ){
739  multi_io_send_reliable(&Net_players[idx], data, offset);
740  }
741  }
742 
744  }
745  break;
746 
747  // local netplayer options
748  case MULTI_OPTION_LOCAL:
749  if(player_index == -1){
750  get_local_options(data, &offset, &bogus);
751  } else {
752  get_local_options(data, &offset, &Net_players[player_index].p_info.options);
753 
754  //If the client has sent an object update higher than that which the server allows, reset it
758  }
759  }
760  }
761  break;
762  }
763  PACKET_SET_SIZE();
764 }
#define MULTI_TRACKER_STRING_LEN
Definition: multi.h:791
#define NG_MODE_RANK_BELOW
Definition: multi.h:635
GLuint64EXT * result
Definition: Glext.h:10775
uint respawn
Definition: multi.h:507
char pxo_squad_name[LOGIN_LEN]
Definition: multi.h:454
char pxo_banner_url[MULTI_OPTIONS_STRING_LEN]
Definition: multi_options.h:45
#define CFILE_NORMAL
Definition: cfile.h:89
void * HWND
Definition: config.h:104
uint os_config_read_uint(const char *section, const char *name, uint default_value)
Definition: osregistry.cpp:372
#define MSO_END_HOST
#define GET_DATA(d)
Definition: multimsgs.h:47
HWND Multi_std_host_passwd
Definition: stand_gui.cpp:197
char Multi_tracker_squad_name[MULTI_TRACKER_STRING_LEN+1]
Definition: multi.cpp:145
char Multi_fs_tracker_channel[MAX_PATH]
#define NEXT_TOKEN()
void multi_options_update_mission(netgame_info *ng, int campaign_mode)
int Game_mode
Definition: systemvars.cpp:24
void multi_options_set_local_defaults(multi_local_options *options)
char Game_current_mission_filename[MAX_FILENAME_LEN]
Definition: fredstubs.cpp:26
char tracker_port[STD_NAME_LEN]
Definition: multi_options.h:39
net_player * Net_player
Definition: multi.cpp:94
void drop_trailing_white_space(char *str)
Definition: parselo.cpp:93
#define PACKET_SET_SIZE()
Definition: multimsgs.h:57
multi_server_options m_server_options
Definition: player.h:193
#define MAX_PATH
int security
Definition: multi.h:499
int mode
Definition: multi.h:494
void multi_options_update_local()
#define ADD_DATA(d)
Definition: multimsgs.h:37
void std_multi_update_netgame_info_controls()
Assert(pm!=NULL)
char pxo_verify_url[MULTI_OPTIONS_STRING_LEN]
Definition: multi_options.h:44
#define ADD_STRING(s)
Definition: multimsgs.h:43
#define mprintf(args)
Definition: pstypes.h:238
void multi_io_send_to_all_reliable(ubyte *data, int length, net_player *ignore)
Definition: multimsgs.cpp:496
#define MULTI_OPTION_SERVER
void multi_io_send_reliable(net_player *pl, ubyte *data, int len)
Definition: multimsgs.cpp:459
int find_player_id(short player_id)
Definition: multiutil.cpp:465
GLclampf f
Definition: Glext.h:7097
#define MLO_FLAG_TEMP_CLOSED
ushort Multi_options_proxy_port
Definition: cfile.h:28
#define OPTIONS_UPDATE
Definition: multi.h:192
void send_netgame_update_packet(net_player *pl)
Definition: multimsgs.cpp:2008
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
Definition: vmallocator.h:21
int flags
Definition: multi.h:463
int mission_campaign_get_info(const char *filename, char *name, int *type, int *max_players, char **desc)
GLsizeiptr size
Definition: Glext.h:5496
#define OBJ_UPDATE_LAN
Definition: multi_options.h:20
GLuint in
Definition: Glext.h:9087
int packet_size
Definition: multi_sexp.cpp:41
char std_pxo_password[MULTI_OPTIONS_STRING_LEN]
Definition: multi_options.h:54
#define MSO_SQUAD_ANY
void std_multi_set_standalone_mission_name(char *mission_name)
#define MULTI_CFG_FILE
#define ADD_INT(d)
Definition: multimsgs.h:40
HWND DWORD code
Definition: vddraw.h:425
void get_local_options(ubyte *data, int *size, multi_local_options *mlo)
#define MULTI_OPTION_START_GAME
#define MAX_PACKET_SIZE
Definition: psnet2.h:34
void multi_options_read_config()
#define NG_MODE_RANK_ABOVE
Definition: multi.h:634
GLintptr offset
Definition: Glext.h:5497
net_player_info p_info
Definition: multi.h:473
int type_flags
Definition: multi.h:493
#define NETINFO_FLAG_AM_MASTER
Definition: multi.h:599
void multi_options_process_packet(unsigned char *data, header *hinfo)
void multi_options_update_start_game(netgame_info *ng)
#define cfopen(...)
Definition: cfile.h:134
SCP_string webapiPassword
Definition: multi_options.h:59
#define nprintf(args)
Definition: pstypes.h:239
multi_server_options options
Definition: multi.h:514
int Psnet_connection
Definition: psnet2.cpp:65
#define BUILD_HEADER(t)
Definition: multimsgs.h:36
char name[MAX_GAMENAME_LEN+1]
Definition: multi.h:487
#define MSO_FLAG_INGAME_XFER
char * cfgets(char *buf, int n, CFILE *cfile)
Definition: cfile.cpp:1571
#define DEFAULT_GAME_PORT
Definition: psnet2.h:36
#define ADD_UINT(d)
Definition: multimsgs.h:41
netgame_info Netgame
Definition: multi.cpp:97
void multi_team_reset()
Definition: multi_team.cpp:128
#define SETTING(s)
char game_tracker_ip[MULTI_OPTIONS_STRING_LEN]
Definition: multi_options.h:38
void add_local_options(ubyte *data, int *size, multi_local_options *mlo)
#define MULTI_OPTION_LOCAL
#define NG_TYPE_TEAM
Definition: multi.h:650
void multi_voice_maybe_update_vars(int new_qos, int new_duration)
void std_configLoaded(multi_global_options *options)
char * tok
Definition: fred.cpp:120
multi_local_options m_local_options
Definition: player.h:192
void multi_options_netgame_load(multi_server_options *options)
SCP_string webapiUsername
Definition: multi_options.h:58
#define MAX_PLAYERS
Definition: pstypes.h:32
char mission_name[NAME_LENGTH+1]
Definition: multi.h:488
#define NETINFO_FLAG_GAME_HOST
Definition: multi.h:603
char passwd[MAX_PASSWD_LEN+1]
Definition: multi.h:491
#define NG_MODE_PASSWORD
Definition: multi.h:632
int Cmdline_objupd
Definition: cmdline.cpp:412
int Cmdline_network_port
Definition: cmdline.cpp:277
int idx
Definition: multiui.cpp:761
char campaign_name[NAME_LENGTH+1]
Definition: multi.h:490
int mission_parse_get_multi_mission_info(const char *filename)
unsigned char ubyte
Definition: pstypes.h:62
int rank_base
Definition: multi.h:496
int cfeof(CFILE *cfile)
void std_add_ban(const char *name)
#define GM_STANDALONE_SERVER
Definition: systemvars.h:27
void add_server_options(ubyte *data, int *size, multi_server_options *mso)
#define INTEL_INT(x)
Definition: pstypes.h:388
#define STD_NAME_LEN
Definition: multi_options.h:28
void multi_options_local_load(multi_local_options *options, net_player *pxo_pl)
#define CF_TYPE_DATA
Definition: cfile.h:46
char pxo_create_url[MULTI_OPTIONS_STRING_LEN]
Definition: multi_options.h:43
#define STD_PASSWD_LEN
Definition: multi_options.h:27
#define MSO_FLAG_NO_VOICE
void multi_options_update_netgame()
int campaign_mode
Definition: multi.h:509
#define strcat_s(...)
Definition: safe_strings.h:68
#define NG_FLAG_TEMP_CLOSED
Definition: multi.h:638
#define NAME_LENGTH
Definition: globals.h:15
int Cmdline_multi_log
Definition: cmdline.cpp:275
#define MULTI_CONNECTED(np)
Definition: multi.h:136
#define OBJ_UPDATE_MEDIUM
Definition: multi_options.h:18
player * Player
Definition: multi.h:385
unsigned short ushort
Definition: pstypes.h:63
#define GET_UINT(d)
Definition: multimsgs.h:51
char user_tracker_ip[MULTI_OPTIONS_STRING_LEN]
Definition: multi_options.h:37
void std_connect_set_gamename(char *name)
int HEADER_LENGTH
Definition: multi.cpp:106
#define OBJ_UPDATE_HIGH
Definition: multi_options.h:19
char std_pname[STD_NAME_LEN+1]
Definition: multi_options.h:52
GLenum GLsizei GLenum GLenum const GLvoid * data
Definition: Gl.h:1509
#define MLO_FLAG_LOCAL_BROADCAST
#define MSO_FLAG_ACCEPT_PIX
short id
Definition: multi.h:390
int Game_skill_level
Definition: fredstubs.cpp:170
#define MLO_FLAG_ACCEPT_PIX
Definition: multi_options.h:99
void drop_leading_white_space(char *str)
Definition: parselo.cpp:115
#define OBJ_UPDATE_LOW
Definition: multi_options.h:17
void get_server_options(ubyte *data, int *size, multi_server_options *mso)
char pxo_rank_url[MULTI_OPTIONS_STRING_LEN]
Definition: multi_options.h:42
void fs2netd_gameserver_update(bool force)
#define MULTI_OPTION_MISSION
char Multi_options_proxy[512]
char pxo_ip[MULTI_OPTIONS_STRING_LEN]
Definition: multi_options.h:41
#define GET_INT(d)
Definition: multimsgs.h:50
#define NG_TYPE_SW
Definition: multi.h:649
int Om_tracker_flag
int cfclose(CFILE *cfile)
Definition: cfile.cpp:895
char std_pxo_login[MULTI_OPTIONS_STRING_LEN]
Definition: multi_options.h:53
SCP_string webuiRootDirectory
Definition: multi_options.h:60
#define MULTI_IS_TRACKER_GAME
Definition: multi.h:146
net_player Net_players[MAX_PLAYERS]
Definition: multi.cpp:93
int max_players
Definition: multi.h:497
#define GET_STRING(s)
Definition: multimsgs.h:53
#define GM_CAMPAIGN_MODE
Definition: systemvars.h:29
multi_global_options Multi_options_g
int flags
Definition: multi.h:495
#define fl2f(fl)
Definition: floating.h:38
multi_local_options options
Definition: multi.h:452
#define strcpy_s(...)
Definition: safe_strings.h:67
int Is_standalone
Definition: systemvars.cpp:59
void multi_options_set_netgame_defaults(multi_server_options *options)
#define NETWORK_CONNECTION_DIALUP
Definition: psnet2.cpp:71
char std_passwd[STD_PASSWD_LEN+1]
Definition: multi_options.h:51