- make cl_punkbuster method usable for any game, make it configurable for wolf
- use protocol 60 by default for RTCW git-svn-id: http://svn.code.sf.net/p/xqf/code/trunk@376 d2ac09be-c843-0410-8b1f-f8a84130e0ec
This commit is contained in:
parent
b10878127a
commit
3a5e061453
@ -1,3 +1,7 @@
|
|||||||
|
Nov 07, 2002: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||||
|
- make cl_punkbuster method usable for any game, make it configurable for wolf
|
||||||
|
- use protocol 60 by default for RTCW
|
||||||
|
|
||||||
Nov 06, 2002: Ludwig Nussel <l-n@users.sourceforge.net>
|
Nov 06, 2002: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||||
- added protocol 60 for RTCW 1.4 to preferences
|
- added protocol 60 for RTCW 1.4 to preferences
|
||||||
- added -lncurses to readline check
|
- added -lncurses to readline check
|
||||||
|
@ -2652,7 +2652,8 @@ static int q3_exec (const struct condef *con, int forkit) {
|
|||||||
argv[argi++] = con->custom_cfg;
|
argv[argi++] = con->custom_cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g->type == Q3_SERVER)
|
// useful for wolf too, ef doesn't have it
|
||||||
|
// if(g->type == Q3_SERVER)
|
||||||
{
|
{
|
||||||
/* The 1.32 release of Q3A needs +set cl_punkbuster 1 on the command line. */
|
/* The 1.32 release of Q3A needs +set cl_punkbuster 1 on the command line. */
|
||||||
punkbuster = find_server_setting_for_key ("sv_punkbuster", con->s->info);
|
punkbuster = find_server_setting_for_key ("sv_punkbuster", con->s->info);
|
||||||
@ -2666,12 +2667,14 @@ static int q3_exec (const struct condef *con, int forkit) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
char* option = g_strdup_printf("/" CONFIG_FILE "/Game: %s/punkbuster dialog shown",type2id(g->type));
|
||||||
debug( 1, "Got %s for punkbuster\n", punkbuster );
|
debug( 1, "Got %s for punkbuster\n", punkbuster );
|
||||||
if(!config_get_bool ("/" CONFIG_FILE "/Game: Q3S/punkbuster dialog shown"))
|
if(!config_get_bool (option))
|
||||||
{
|
{
|
||||||
dialog_ok (NULL, _("The server has Punkbuster enabled but it is not going\nto be set on the command line.\nYou may have problems connecting.\nYou can fix this in the game preferences."));
|
dialog_ok (NULL, _("The server has Punkbuster enabled but it is not going\nto be set on the command line.\nYou may have problems connecting.\nYou can fix this in the game preferences."));
|
||||||
config_set_bool ("/" CONFIG_FILE "/Game: Q3S/punkbuster dialog shown",TRUE);
|
config_set_bool (option,TRUE);
|
||||||
}
|
}
|
||||||
|
g_free(option);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -237,6 +237,7 @@ static GtkWidget *cg_precachedmodels_spinner;
|
|||||||
/* Wolfenstein */
|
/* Wolfenstein */
|
||||||
static GtkWidget *wo_proto_entry;
|
static GtkWidget *wo_proto_entry;
|
||||||
static GtkWidget *wo_setfs_gamebutton;
|
static GtkWidget *wo_setfs_gamebutton;
|
||||||
|
static GtkWidget *wo_set_punkbusterbutton;
|
||||||
|
|
||||||
/* Voyager Elite Force */
|
/* Voyager Elite Force */
|
||||||
static GtkWidget *ef_proto_entry;
|
static GtkWidget *ef_proto_entry;
|
||||||
@ -270,6 +271,7 @@ char* q3_masterprotocols[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// change config_get_string below too!
|
||||||
char* wo_masterprotocols[] = {
|
char* wo_masterprotocols[] = {
|
||||||
"60 - v1.4",
|
"60 - v1.4",
|
||||||
"59 - v1.32",
|
"59 - v1.32",
|
||||||
@ -666,7 +668,6 @@ static void get_new_defaults (void) {
|
|||||||
game_set_attribute(Q3_SERVER,"setfs_game",g_strdup(bool2str(i)));
|
game_set_attribute(Q3_SERVER,"setfs_game",g_strdup(bool2str(i)));
|
||||||
|
|
||||||
i = GTK_TOGGLE_BUTTON (set_punkbusterbutton)->active;
|
i = GTK_TOGGLE_BUTTON (set_punkbusterbutton)->active;
|
||||||
// if (i != q3_opts.setfs_game)
|
|
||||||
config_set_bool ("set_punkbuster", i);
|
config_set_bool ("set_punkbuster", i);
|
||||||
game_set_attribute(Q3_SERVER,"set_punkbuster",g_strdup(bool2str(i)));
|
game_set_attribute(Q3_SERVER,"set_punkbuster",g_strdup(bool2str(i)));
|
||||||
|
|
||||||
@ -711,6 +712,10 @@ static void get_new_defaults (void) {
|
|||||||
config_set_bool ("setfs_game", i);
|
config_set_bool ("setfs_game", i);
|
||||||
game_set_attribute(WO_SERVER,"setfs_game",g_strdup(bool2str(i)));
|
game_set_attribute(WO_SERVER,"setfs_game",g_strdup(bool2str(i)));
|
||||||
|
|
||||||
|
i = GTK_TOGGLE_BUTTON (wo_set_punkbusterbutton)->active;
|
||||||
|
config_set_bool ("set_punkbuster", i);
|
||||||
|
game_set_attribute(WO_SERVER,"set_punkbuster",g_strdup(bool2str(i)));
|
||||||
|
|
||||||
config_pop_prefix ();
|
config_pop_prefix ();
|
||||||
|
|
||||||
/* Voyager Elite Force */
|
/* Voyager Elite Force */
|
||||||
@ -3018,6 +3023,12 @@ static GtkWidget *wolf_options_page (void) {
|
|||||||
gtk_box_pack_start (GTK_BOX (page_vbox), wo_setfs_gamebutton, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (page_vbox), wo_setfs_gamebutton, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (wo_setfs_gamebutton);
|
gtk_widget_show (wo_setfs_gamebutton);
|
||||||
|
|
||||||
|
wo_set_punkbusterbutton = gtk_check_button_new_with_label (_("set cl_punkbuster on connect"));
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wo_set_punkbusterbutton),
|
||||||
|
str2bool(game_get_attribute(WO_SERVER,"set_punkbuster")));
|
||||||
|
gtk_box_pack_start (GTK_BOX (page_vbox), wo_set_punkbusterbutton, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (wo_set_punkbusterbutton);
|
||||||
|
|
||||||
gtk_widget_show (page_vbox);
|
gtk_widget_show (page_vbox);
|
||||||
|
|
||||||
return page_vbox;
|
return page_vbox;
|
||||||
@ -4499,7 +4510,7 @@ int prefs_load (void) {
|
|||||||
/* Wolfenstein */
|
/* Wolfenstein */
|
||||||
config_push_prefix ("/" CONFIG_FILE "/Game: WOS");
|
config_push_prefix ("/" CONFIG_FILE "/Game: WOS");
|
||||||
|
|
||||||
tmp = config_get_string ("protocol=59");
|
tmp = config_get_string ("protocol=60");
|
||||||
if ( strlen( tmp ) == 0 )
|
if ( strlen( tmp ) == 0 )
|
||||||
{
|
{
|
||||||
g_free(tmp);
|
g_free(tmp);
|
||||||
@ -4529,7 +4540,6 @@ int prefs_load (void) {
|
|||||||
|
|
||||||
game_set_attribute(EF_SERVER,"masterprotocol",tmp);
|
game_set_attribute(EF_SERVER,"masterprotocol",tmp);
|
||||||
game_set_attribute(EF_SERVER,"setfs_game",g_strdup(bool2str(config_get_bool ("setfs_game=true"))));
|
game_set_attribute(EF_SERVER,"setfs_game",g_strdup(bool2str(config_get_bool ("setfs_game=true"))));
|
||||||
game_set_attribute(EF_SERVER,"set_punkbuster",g_strdup(bool2str(config_get_bool ("set_punkbuster=true"))));
|
|
||||||
|
|
||||||
config_pop_prefix ();
|
config_pop_prefix ();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user