- Tremulous support
- don't pass -steam option to hl2 - strip newline when reading the doom3 version file git-svn-id: http://svn.code.sf.net/p/xqf/code/trunk@779 d2ac09be-c843-0410-8b1f-f8a84130e0ec
This commit is contained in:
parent
73c645ed5e
commit
b089d7460c
@ -1,3 +1,8 @@
|
|||||||
|
Apr 08, 2006: <l-n@users.sourceforge.net>
|
||||||
|
- Tremulous support
|
||||||
|
- don't pass -steam option to hl2
|
||||||
|
- strip newline when reading the doom3 version file
|
||||||
|
|
||||||
Jan 05, 2006: <l-n@users.sourceforge.net>
|
Jan 05, 2006: <l-n@users.sourceforge.net>
|
||||||
- fix cursor navigation in server list (thanks Simon Philips)
|
- fix cursor navigation in server list (thanks Simon Philips)
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ extern void qw_cmd_or_dir_changed(struct game* g);
|
|||||||
extern void q2_cmd_or_dir_changed(struct game* g);
|
extern void q2_cmd_or_dir_changed(struct game* g);
|
||||||
extern void ut2004_cmd_or_dir_changed(struct game* g);
|
extern void ut2004_cmd_or_dir_changed(struct game* g);
|
||||||
extern void doom3_cmd_or_dir_changed(struct game* g);
|
extern void doom3_cmd_or_dir_changed(struct game* g);
|
||||||
|
extern void tremulous_cmd_or_dir_changed(struct game* g);
|
||||||
|
|
||||||
static struct player *poqs_parse_player(char *tokens[], int num, struct server *s);
|
static struct player *poqs_parse_player(char *tokens[], int num, struct server *s);
|
||||||
static struct player *qw_parse_player(char *tokens[], int num, struct server *s);
|
static struct player *qw_parse_player(char *tokens[], int num, struct server *s);
|
||||||
@ -162,6 +163,7 @@ static struct quake_private jk3_private;
|
|||||||
static struct quake_private doom3_private;
|
static struct quake_private doom3_private;
|
||||||
static struct quake_private quake4_private;
|
static struct quake_private quake4_private;
|
||||||
static struct quake_private warsow_private;
|
static struct quake_private warsow_private;
|
||||||
|
static struct quake_private tremulous_private;
|
||||||
|
|
||||||
#include "games.c"
|
#include "games.c"
|
||||||
|
|
||||||
@ -1483,6 +1485,10 @@ static void q3_analyze_serverinfo (struct server *s) {
|
|||||||
{
|
{
|
||||||
s->type=SOF2S_SERVER;
|
s->type=SOF2S_SERVER;
|
||||||
}
|
}
|
||||||
|
else if(!strncmp(info_ptr[1],"tremulous",9))
|
||||||
|
{
|
||||||
|
s->type=TREMULOUS_SERVER;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2528,11 +2534,6 @@ static int hl_exec (const struct condef *con, int forkit) {
|
|||||||
while ((argv[argi] = strtok (NULL, delim)) != NULL)
|
while ((argv[argi] = strtok (NULL, delim)) != NULL)
|
||||||
argi++;
|
argi++;
|
||||||
|
|
||||||
if(con->s->type == HL2_SERVER) // XXX
|
|
||||||
{
|
|
||||||
argv[argi++] = "-steam";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (con->gamedir) {
|
if (con->gamedir) {
|
||||||
argv[argi++] = "-game";
|
argv[argi++] = "-game";
|
||||||
argv[argi++] = con->gamedir;
|
argv[argi++] = con->gamedir;
|
||||||
|
@ -43,6 +43,7 @@ enum {
|
|||||||
GAME_LAUNCH_HOSTPORT = 0x0800, // use hostport rule as port when launching
|
GAME_LAUNCH_HOSTPORT = 0x0800, // use hostport rule as port when launching
|
||||||
GAME_MASTER_CDKEY = 0x1000, // master server requires CD key
|
GAME_MASTER_CDKEY = 0x1000, // master server requires CD key
|
||||||
GAME_Q3COLORS = 0x2000, // Q3 color codes
|
GAME_Q3COLORS = 0x2000, // Q3 color codes
|
||||||
|
GAME_MASTER_STEAM = 0x4000, // server side filter
|
||||||
};
|
};
|
||||||
|
|
||||||
struct game {
|
struct game {
|
||||||
|
@ -42,6 +42,8 @@ static char* stringlist039[] = { "data", NULL };
|
|||||||
static char* stringlist040[] = { "nexuiz", NULL };
|
static char* stringlist040[] = { "nexuiz", NULL };
|
||||||
static char* stringlist041[] = { "basewsw", NULL };
|
static char* stringlist041[] = { "basewsw", NULL };
|
||||||
static char* stringlist042[] = { "warsow", NULL };
|
static char* stringlist042[] = { "warsow", NULL };
|
||||||
|
static char* stringlist043[] = { "base", NULL };
|
||||||
|
static char* stringlist044[] = { "tremulous", NULL };
|
||||||
struct game games[] = {
|
struct game games[] = {
|
||||||
{
|
{
|
||||||
type : Q1_SERVER,
|
type : Q1_SERVER,
|
||||||
@ -361,7 +363,7 @@ struct game games[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type : HL_SERVER,
|
type : HL_SERVER,
|
||||||
flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON,
|
flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_MASTER_STEAM,
|
||||||
name : "Half-Life",
|
name : "Half-Life",
|
||||||
default_port : 27015,
|
default_port : 27015,
|
||||||
default_master_port : 27010,
|
default_master_port : 27010,
|
||||||
@ -384,7 +386,7 @@ struct game games[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type : HL2_SERVER,
|
type : HL2_SERVER,
|
||||||
flags : GAME_CONNECT | GAME_PASSWORD,
|
flags : GAME_CONNECT | GAME_PASSWORD | GAME_MASTER_STEAM,
|
||||||
name : "Half-Life 2",
|
name : "Half-Life 2",
|
||||||
default_port : 27015,
|
default_port : 27015,
|
||||||
default_master_port : 27011,
|
default_master_port : 27011,
|
||||||
@ -876,6 +878,38 @@ struct game games[] = {
|
|||||||
main_mod : stringlist041,
|
main_mod : stringlist041,
|
||||||
command : stringlist042,
|
command : stringlist042,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type : TREMULOUS_SERVER,
|
||||||
|
flags : GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_QUAKE3_MASTERPROTOCOL | GAME_Q3COLORS,
|
||||||
|
name : "Tremulous",
|
||||||
|
default_port : 30720,
|
||||||
|
default_master_port : 30710,
|
||||||
|
id : "TREMULOUS",
|
||||||
|
qstat_str : "TREMULOUS",
|
||||||
|
qstat_option : "-tremulous",
|
||||||
|
qstat_master_option : "-tremulousm",
|
||||||
|
icon : "tremulous.xpm",
|
||||||
|
parse_player : q3_parse_player,
|
||||||
|
parse_server : quake_parse_server,
|
||||||
|
analyze_serverinfo : q3_analyze_serverinfo,
|
||||||
|
config_is_valid : config_is_valid_generic,
|
||||||
|
exec_client : q3_exec,
|
||||||
|
custom_cfgs : quake_custom_cfgs,
|
||||||
|
save_info : quake_save_info,
|
||||||
|
init_maps : q3_init_maps,
|
||||||
|
has_map : quake_has_map,
|
||||||
|
get_mapshot : q3_get_mapshot,
|
||||||
|
arch_identifier : "version",
|
||||||
|
identify_cpu : identify_cpu,
|
||||||
|
identify_os : identify_os,
|
||||||
|
cmd_or_dir_changed : tremulous_cmd_or_dir_changed,
|
||||||
|
prefs_load : q3_prefs_load_common,
|
||||||
|
update_prefs : tremulous_update_prefs,
|
||||||
|
default_home : "~/.tremulous",
|
||||||
|
pd : &tremulous_private,
|
||||||
|
main_mod : stringlist043,
|
||||||
|
command : stringlist044,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type : GPS_SERVER,
|
type : GPS_SERVER,
|
||||||
flags : GAME_CONNECT,
|
flags : GAME_CONNECT,
|
||||||
|
@ -302,7 +302,7 @@
|
|||||||
<game>
|
<game>
|
||||||
<type>HL_SERVER</type>
|
<type>HL_SERVER</type>
|
||||||
<name>Half-Life</name>
|
<name>Half-Life</name>
|
||||||
<flags>GAME_CONNECT | GAME_PASSWORD | GAME_RCON</flags>
|
<flags>GAME_CONNECT | GAME_PASSWORD | GAME_RCON | GAME_MASTER_STEAM</flags>
|
||||||
<default_port>27015</default_port>
|
<default_port>27015</default_port>
|
||||||
<default_master_port>27010</default_master_port>
|
<default_master_port>27010</default_master_port>
|
||||||
<id>HLS</id>
|
<id>HLS</id>
|
||||||
@ -322,7 +322,7 @@
|
|||||||
<game>
|
<game>
|
||||||
<type>HL2_SERVER</type>
|
<type>HL2_SERVER</type>
|
||||||
<name>Half-Life 2</name>
|
<name>Half-Life 2</name>
|
||||||
<flags>GAME_CONNECT | GAME_PASSWORD</flags>
|
<flags>GAME_CONNECT | GAME_PASSWORD | GAME_MASTER_STEAM</flags>
|
||||||
<default_port>27015</default_port>
|
<default_port>27015</default_port>
|
||||||
<default_master_port>27011</default_master_port>
|
<default_master_port>27011</default_master_port>
|
||||||
<id>A2S</id>
|
<id>A2S</id>
|
||||||
@ -672,6 +672,26 @@
|
|||||||
<main_mod>basewsw</main_mod>
|
<main_mod>basewsw</main_mod>
|
||||||
<pd>warsow_private</pd>
|
<pd>warsow_private</pd>
|
||||||
</game>
|
</game>
|
||||||
|
<game>
|
||||||
|
<base>Q3_SERVER</base>
|
||||||
|
<type>TREMULOUS_SERVER</type>
|
||||||
|
<name>Tremulous</name>
|
||||||
|
<default_port>30720</default_port>
|
||||||
|
<default_master_port>30710</default_master_port>
|
||||||
|
<id>TREMULOUS</id>
|
||||||
|
<qstat_str>TREMULOUS</qstat_str>
|
||||||
|
<qstat_option>-tremulous</qstat_option>
|
||||||
|
<qstat_master_option>-tremulousm</qstat_master_option>
|
||||||
|
<icon>tremulous.xpm</icon>
|
||||||
|
<config_is_valid>config_is_valid_generic</config_is_valid>
|
||||||
|
<command>tremulous</command>
|
||||||
|
<default_home>~/.tremulous</default_home>
|
||||||
|
<cmd_or_dir_changed>tremulous_cmd_or_dir_changed</cmd_or_dir_changed>
|
||||||
|
<prefs_load>q3_prefs_load_common</prefs_load>
|
||||||
|
<update_prefs>tremulous_update_prefs</update_prefs>
|
||||||
|
<main_mod>base</main_mod>
|
||||||
|
<pd>tremulous_private</pd>
|
||||||
|
</game>
|
||||||
<game>
|
<game>
|
||||||
<type>GPS_SERVER</type>
|
<type>GPS_SERVER</type>
|
||||||
<name>Generic Gamespy</name>
|
<name>Generic Gamespy</name>
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
#include "xpm/netp.xpm"
|
#include "xpm/netp.xpm"
|
||||||
#include "xpm/nexuiz.xpm"
|
#include "xpm/nexuiz.xpm"
|
||||||
#include "xpm/warsow.xpm"
|
#include "xpm/warsow.xpm"
|
||||||
|
#include "xpm/tremulous.xpm"
|
||||||
|
|
||||||
#include "xpm/gamespy3d.xpm"
|
#include "xpm/gamespy3d.xpm"
|
||||||
#include "xpm/ssam.xpm"
|
#include "xpm/ssam.xpm"
|
||||||
|
@ -445,6 +445,19 @@ static struct q3_common_prefs_s warsow_prefs =
|
|||||||
defproto : "6",
|
defproto : "6",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char* tremulous_masterprotocols[] = {
|
||||||
|
"auto",
|
||||||
|
"69 - v1.1.0",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct q3_common_prefs_s tremulous_prefs =
|
||||||
|
{
|
||||||
|
protocols: tremulous_masterprotocols,
|
||||||
|
defproto : "69",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static struct q3_common_prefs_s* get_pref_widgets_for_game(enum server_type type);
|
static struct q3_common_prefs_s* get_pref_widgets_for_game(enum server_type type);
|
||||||
|
|
||||||
static void game_file_dialog(enum server_type type);
|
static void game_file_dialog(enum server_type type);
|
||||||
@ -897,6 +910,9 @@ static void doom3_detect_version(struct game* g)
|
|||||||
if(!fgets(line, sizeof(line), f))
|
if(!fgets(line, sizeof(line), f))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
if(strlen(line) && line[strlen(line)-1] == '\n')
|
||||||
|
line[strlen(line)-1] = '\0';
|
||||||
|
|
||||||
debug(3, "detected %s protocol version %s", g->name, line);
|
debug(3, "detected %s protocol version %s", g->name, line);
|
||||||
|
|
||||||
game_set_attribute(g->type, "_masterprotocol", g_strdup(line));
|
game_set_attribute(g->type, "_masterprotocol", g_strdup(line));
|
||||||
@ -918,6 +934,12 @@ void quake4_update_prefs (struct game* g)
|
|||||||
doom3_detect_version(g);
|
doom3_detect_version(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tremulous_update_prefs (struct game* g)
|
||||||
|
{
|
||||||
|
q3_update_prefs_common(g);
|
||||||
|
doom3_detect_version(g);
|
||||||
|
}
|
||||||
|
|
||||||
void tribes2_update_prefs (struct game* g)
|
void tribes2_update_prefs (struct game* g)
|
||||||
{
|
{
|
||||||
char* str;
|
char* str;
|
||||||
@ -3067,6 +3089,7 @@ static struct q3_common_prefs_s* get_pref_widgets_for_game(enum server_type type
|
|||||||
case JK3_SERVER: return &jk3_prefs;
|
case JK3_SERVER: return &jk3_prefs;
|
||||||
case NEXUIZ_SERVER: return &nexuiz_prefs;
|
case NEXUIZ_SERVER: return &nexuiz_prefs;
|
||||||
case WARSOW_SERVER: return &warsow_prefs;
|
case WARSOW_SERVER: return &warsow_prefs;
|
||||||
|
case TREMULOUS_SERVER: return &tremulous_prefs;
|
||||||
default: return NULL;
|
default: return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4629,6 +4652,7 @@ static struct generic_prefs* new_generic_prefs (void) {
|
|||||||
new_genprefs[EF_SERVER].add_options_to_notebook = add_q3_options_to_notebook;
|
new_genprefs[EF_SERVER].add_options_to_notebook = add_q3_options_to_notebook;
|
||||||
new_genprefs[NEXUIZ_SERVER].add_options_to_notebook = add_q3_options_to_notebook;
|
new_genprefs[NEXUIZ_SERVER].add_options_to_notebook = add_q3_options_to_notebook;
|
||||||
new_genprefs[WARSOW_SERVER].add_options_to_notebook = add_q3_options_to_notebook;
|
new_genprefs[WARSOW_SERVER].add_options_to_notebook = add_q3_options_to_notebook;
|
||||||
|
new_genprefs[TREMULOUS_SERVER].add_options_to_notebook = add_q3_options_to_notebook;
|
||||||
|
|
||||||
for (i = 0; i < GAMES_TOTAL; i++) {
|
for (i = 0; i < GAMES_TOTAL; i++) {
|
||||||
new_genprefs[i].pref_dir = g_strdup (games[i].dir);
|
new_genprefs[i].pref_dir = g_strdup (games[i].dir);
|
||||||
@ -5335,3 +5359,8 @@ void doom3_cmd_or_dir_changed(struct game* g)
|
|||||||
{
|
{
|
||||||
doom3_detect_version(g);
|
doom3_detect_version(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tremulous_cmd_or_dir_changed(struct game* g)
|
||||||
|
{
|
||||||
|
doom3_detect_version(g);
|
||||||
|
}
|
||||||
|
@ -132,6 +132,7 @@ void q3_update_prefs (struct game* g);
|
|||||||
void q3_update_prefs_common (struct game* g);
|
void q3_update_prefs_common (struct game* g);
|
||||||
void doom3_update_prefs (struct game* g);
|
void doom3_update_prefs (struct game* g);
|
||||||
void quake4_update_prefs (struct game* g);
|
void quake4_update_prefs (struct game* g);
|
||||||
|
void tremulous_update_prefs (struct game* g);
|
||||||
void tribes2_update_prefs (struct game* g);
|
void tribes2_update_prefs (struct game* g);
|
||||||
void ut2004_update_prefs (struct game* g);
|
void ut2004_update_prefs (struct game* g);
|
||||||
|
|
||||||
|
@ -183,3 +183,16 @@ gametype WARSOWM new extend Q3M
|
|||||||
master query = empty full
|
master query = empty full
|
||||||
master for gametype = WARSOWS
|
master for gametype = WARSOWS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
gametype TREMULOUS new extend Q3S
|
||||||
|
name = Tremulous
|
||||||
|
template var = TREMULOUS
|
||||||
|
game rule = gamename
|
||||||
|
end
|
||||||
|
gametype TREMULOUSM new extend Q3M
|
||||||
|
name = Tremulous Master
|
||||||
|
template var = TREMULOUSMASTER
|
||||||
|
default port = 30710
|
||||||
|
master protocol = 69
|
||||||
|
master for gametype = TREMULOUS
|
||||||
|
end
|
||||||
|
@ -1151,6 +1151,8 @@ static char *builtin_masters_update_info[] = {
|
|||||||
"ADD WARSOWS master://ghdigital.com ghdigital.com",
|
"ADD WARSOWS master://ghdigital.com ghdigital.com",
|
||||||
"ADD WARSOWS master://dpmaster.deathmask.net dpmaster.deathmask.net",
|
"ADD WARSOWS master://dpmaster.deathmask.net dpmaster.deathmask.net",
|
||||||
|
|
||||||
|
"ADD TREMULOUS master://master.tremulous.net:30710 tremulous.net",
|
||||||
|
|
||||||
"ADD QS lan://255.255.255.255 LAN",
|
"ADD QS lan://255.255.255.255 LAN",
|
||||||
"ADD QWS lan://255.255.255.255 LAN",
|
"ADD QWS lan://255.255.255.255 LAN",
|
||||||
"ADD Q2S lan://255.255.255.255 LAN",
|
"ADD Q2S lan://255.255.255.255 LAN",
|
||||||
|
@ -1343,7 +1343,7 @@ static struct stat_conn *stat_update_master_qstat (struct stat_job *job,
|
|||||||
arg_type = g_strdup_printf("%s,outfile", master_qstat_option(m));
|
arg_type = g_strdup_printf("%s,outfile", master_qstat_option(m));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( m->type == HL_SERVER && current_server_filter > 0 && (cur_filter & FILTER_SERVER_MASK))
|
else if( (games[m->type].flags & GAME_MASTER_STEAM) && current_server_filter > 0 && (cur_filter & FILTER_SERVER_MASK))
|
||||||
{
|
{
|
||||||
struct server_filter_vars* filter =
|
struct server_filter_vars* filter =
|
||||||
g_array_index (server_filters, struct server_filter_vars*, current_server_filter-1);
|
g_array_index (server_filters, struct server_filter_vars*, current_server_filter-1);
|
||||||
|
35
xqf/src/xpm/tremulous.xpm
Normal file
35
xqf/src/xpm/tremulous.xpm
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char * tremulous_xpm[] = {
|
||||||
|
"16 16 16 1",
|
||||||
|
" c None",
|
||||||
|
". c #000000",
|
||||||
|
"+ c #010101",
|
||||||
|
"@ c #020202",
|
||||||
|
"# c #030303",
|
||||||
|
"$ c #040404",
|
||||||
|
"% c #050505",
|
||||||
|
"& c #060606",
|
||||||
|
"* c #070707",
|
||||||
|
"= c #080808",
|
||||||
|
"- c #090909",
|
||||||
|
"; c #0A0A0A",
|
||||||
|
"> c #0B0B0B",
|
||||||
|
", c #0C0C0C",
|
||||||
|
"' c #0D0D0D",
|
||||||
|
") c #0E0E0E",
|
||||||
|
" & ",
|
||||||
|
" =.+ ",
|
||||||
|
" * +.. $ ",
|
||||||
|
" -+ ...# #; ",
|
||||||
|
" %@ +.. .* ",
|
||||||
|
" +# )...,+& ",
|
||||||
|
" @@+.... ",
|
||||||
|
" %..... ",
|
||||||
|
" $.....+ ",
|
||||||
|
" -$+...... ",
|
||||||
|
" ....., ",
|
||||||
|
" *....++, ",
|
||||||
|
" # #.@ # ",
|
||||||
|
" & > ",
|
||||||
|
" ' ",
|
||||||
|
" "};
|
@ -133,6 +133,7 @@ enum server_type {
|
|||||||
NETP_SERVER,
|
NETP_SERVER,
|
||||||
NEXUIZ_SERVER,
|
NEXUIZ_SERVER,
|
||||||
WARSOW_SERVER,
|
WARSOW_SERVER,
|
||||||
|
TREMULOUS_SERVER,
|
||||||
GPS_SERVER,
|
GPS_SERVER,
|
||||||
UNKNOWN_SERVER
|
UNKNOWN_SERVER
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user