- support for Unreal Tournament 2003 Demo
git-svn-id: http://svn.code.sf.net/p/xqf/code/trunk@184 d2ac09be-c843-0410-8b1f-f8a84130e0ec
This commit is contained in:
parent
04088d7023
commit
ec90f2560b
@ -1,3 +1,7 @@
|
||||
Sep 14, 2002: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||
- support for Unreal Tournament 2003 Demo. No master yet. If you know one, tell
|
||||
me
|
||||
|
||||
Sep 07, 2002: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||
- fix Half-Life rcon
|
||||
- primitive external rcon program that is not linked against X (xqf-rcon)
|
||||
|
@ -541,6 +541,35 @@ struct game games[] = {
|
||||
NULL, // real_dir
|
||||
NULL // game_cfg
|
||||
},
|
||||
{
|
||||
UT2D_SERVER,
|
||||
GAME_CONNECT,
|
||||
"Unreal 2003 Demo",
|
||||
7787,
|
||||
0,
|
||||
"UT2DS",
|
||||
"GPS",
|
||||
"-gps",
|
||||
"gps",
|
||||
&ut2_pix,
|
||||
|
||||
un_parse_player,
|
||||
quake_parse_server,
|
||||
un_analyze_serverinfo,
|
||||
config_is_valid_generic,
|
||||
NULL,
|
||||
ut_exec,
|
||||
NULL,
|
||||
quake_save_info,
|
||||
NULL, // arch_identifier
|
||||
NULL, // identify_cpu
|
||||
NULL, // identify_os
|
||||
NULL, // cmd
|
||||
NULL, // dir
|
||||
NULL, // real_dir
|
||||
NULL // game_cfg
|
||||
},
|
||||
|
||||
{
|
||||
RUNE_SERVER,
|
||||
GAME_CONNECT,
|
||||
@ -1070,6 +1099,10 @@ static void un_analyze_serverinfo (struct server *s) {
|
||||
{
|
||||
s->type = UN_SERVER;
|
||||
}
|
||||
else if(!strcmp(info_ptr[1],"ut2d"))
|
||||
{
|
||||
s->type = UT2D_SERVER;
|
||||
}
|
||||
}
|
||||
|
||||
//password required?
|
||||
@ -1078,12 +1111,16 @@ static void un_analyze_serverinfo (struct server *s) {
|
||||
}
|
||||
}
|
||||
|
||||
// adjust port if type has changed
|
||||
if(s->type != GPS_SERVER && hostport )
|
||||
// adjust port for unreal and rune
|
||||
switch(s->type)
|
||||
{
|
||||
server_change_port(s,hostport);
|
||||
case UN_SERVER:
|
||||
case RUNE_SERVER:
|
||||
server_change_port(s,hostport);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void descent3_analyze_serverinfo (struct server *s) {
|
||||
@ -2410,6 +2447,9 @@ static int ut_exec (const struct condef *con, int forkit) {
|
||||
char *cmd;
|
||||
struct game *g = &games[con->s->type];
|
||||
int retval;
|
||||
char **info_ptr;
|
||||
char* hostport=NULL;
|
||||
char* real_server=NULL;
|
||||
|
||||
cmd = strdup_strip (g->cmd);
|
||||
|
||||
@ -2417,13 +2457,34 @@ static int ut_exec (const struct condef *con, int forkit) {
|
||||
while ((argv[argi] = strtok (NULL, delim)) != NULL)
|
||||
argi++;
|
||||
|
||||
|
||||
// Pass server IP address first otherwise it won't work.
|
||||
// Make sure ut/ut script (from installed game) contains
|
||||
// exec "./ut-bin" $* -log and not -log $* at the end
|
||||
// otherwise XQF you can not connect via the command line!
|
||||
|
||||
if (con->server) {
|
||||
argv[argi++] = con->server;
|
||||
if(con->s->type == UT2D_SERVER)
|
||||
{
|
||||
// go through all server rules
|
||||
for (info_ptr = con->s->info; info_ptr && *info_ptr; info_ptr += 2) {
|
||||
if (!strcmp (*info_ptr, "hostport")) {
|
||||
hostport=info_ptr[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (con->server)
|
||||
{
|
||||
// gamespy port can be different from game port
|
||||
if(hostport)
|
||||
{
|
||||
real_server = g_strdup_printf ("%s:%s", inet_ntoa (con->s->host->ip), hostport);
|
||||
argv[argi++] = real_server;
|
||||
}
|
||||
else
|
||||
{
|
||||
argv[argi++] = con->server;
|
||||
}
|
||||
}
|
||||
|
||||
if (default_nosound) {
|
||||
@ -2435,6 +2496,7 @@ static int ut_exec (const struct condef *con, int forkit) {
|
||||
retval = client_launch_exec (forkit, g->real_dir, argv, con->s);
|
||||
|
||||
g_free (cmd);
|
||||
g_free (real_server);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "xpm/un.xpm"
|
||||
#include "xpm/rune.xpm"
|
||||
#include "xpm/descent3.xpm"
|
||||
#include "xpm/ut2.xpm"
|
||||
|
||||
#include "xpm/gamespy3d.xpm"
|
||||
|
||||
@ -109,6 +110,7 @@ struct pixmap sfs_pix;
|
||||
struct pixmap t2_pix;
|
||||
struct pixmap hr_pix;
|
||||
struct pixmap un_pix;
|
||||
struct pixmap ut2_pix;
|
||||
struct pixmap rune_pix;
|
||||
struct pixmap descent3_pix;
|
||||
struct pixmap gamespy3d_pix;
|
||||
@ -212,6 +214,7 @@ void free_pixmaps (void) {
|
||||
free_pixmap (&t2_pix);
|
||||
free_pixmap (&hr_pix);
|
||||
free_pixmap (&un_pix);
|
||||
free_pixmap (&ut2_pix);
|
||||
free_pixmap (&rune_pix);
|
||||
free_pixmap (&descent3_pix);
|
||||
free_pixmap (&gamespy3d_pix);
|
||||
@ -284,6 +287,7 @@ void init_pixmaps (GtkWidget *window) {
|
||||
create_pixmap (window, &t2_pix, t2_xpm);
|
||||
create_pixmap (window, &hr_pix, hr2_xpm);
|
||||
create_pixmap (window, &un_pix, un_xpm);
|
||||
create_pixmap (window, &ut2_pix, ut2_xpm);
|
||||
create_pixmap (window, &rune_pix, rune_xpm);
|
||||
create_pixmap (window, &descent3_pix, descent3_xpm);
|
||||
create_pixmap (window, &gamespy3d_pix, gamespy3d_xpm);
|
||||
|
@ -61,6 +61,7 @@ extern struct pixmap sfs_pix;
|
||||
extern struct pixmap t2_pix;
|
||||
extern struct pixmap hr_pix;
|
||||
extern struct pixmap un_pix;
|
||||
extern struct pixmap ut2_pix;
|
||||
extern struct pixmap rune_pix;
|
||||
extern struct pixmap descent3_pix;
|
||||
extern struct pixmap gamespy3d_pix;
|
||||
|
@ -3171,6 +3171,7 @@ static void user_fix_defaults (void) {
|
||||
config_set_string ("/" CONFIG_FILE "/Game: T2S/cmd", "tribes2");
|
||||
config_set_string ("/" CONFIG_FILE "/Game: WOS/cmd", "wolf");
|
||||
config_set_string ("/" CONFIG_FILE "/Game: UNS/cmd", "ut");
|
||||
config_set_string ("/" CONFIG_FILE "/Game: UT2DS/cmd", "ut2003_demo");
|
||||
|
||||
config_set_string ("/" CONFIG_FILE "/Games Config/player name",
|
||||
g_get_user_name ());
|
||||
|
176
xqf/src/xpm/ut2.xpm
Normal file
176
xqf/src/xpm/ut2.xpm
Normal file
@ -0,0 +1,176 @@
|
||||
/* XPM */
|
||||
static char * ut2_xpm[] = {
|
||||
"16 16 157 2",
|
||||
" c None",
|
||||
". c #4E493E",
|
||||
"+ c #6A6354",
|
||||
"@ c #8C857A",
|
||||
"# c #9B9488",
|
||||
"$ c #8F887B",
|
||||
"% c #877F72",
|
||||
"& c #726A5D",
|
||||
"* c #5D574A",
|
||||
"= c #7D786D",
|
||||
"- c #C0AF8C",
|
||||
"; c #897F6C",
|
||||
"> c #91897D",
|
||||
", c #948C7F",
|
||||
"' c #867E72",
|
||||
") c #AA9F8C",
|
||||
"! c #7F6E50",
|
||||
"~ c #665F51",
|
||||
"{ c #A29C8F",
|
||||
"] c #EEDDBA",
|
||||
"^ c #CFB580",
|
||||
"/ c #91887A",
|
||||
"( c #81796D",
|
||||
"_ c #8C8272",
|
||||
": c #90897B",
|
||||
"< c #E1D3B7",
|
||||
"[ c #A38650",
|
||||
"} c #5F5546",
|
||||
"| c #625A4C",
|
||||
"1 c #575145",
|
||||
"2 c #A8A399",
|
||||
"3 c #F0DDB7",
|
||||
"4 c #F2DDB2",
|
||||
"5 c #EDD3A0",
|
||||
"6 c #A49065",
|
||||
"7 c #554E41",
|
||||
"8 c #685D48",
|
||||
"9 c #E5D2AA",
|
||||
"0 c #E5BF74",
|
||||
"a c #6C5B39",
|
||||
"b c #473F32",
|
||||
"c c #42392C",
|
||||
"d c #554E43",
|
||||
"e c #777267",
|
||||
"f c #C7B18A",
|
||||
"g c #765E34",
|
||||
"h c #C4AB7A",
|
||||
"i c #F0D7A4",
|
||||
"j c #A28957",
|
||||
"k c #3F372B",
|
||||
"l c #4C4336",
|
||||
"m c #EADBB8",
|
||||
"n c #EDCE8F",
|
||||
"o c #615235",
|
||||
"p c #3E3628",
|
||||
"q c #322A1D",
|
||||
"r c #423A2F",
|
||||
"s c #B6A68A",
|
||||
"t c #6B5A3C",
|
||||
"u c #6C6356",
|
||||
"v c #C2B293",
|
||||
"w c #EBCB8C",
|
||||
"x c #9C8048",
|
||||
"y c #362E21",
|
||||
"z c #4A4133",
|
||||
"A c #DCBF85",
|
||||
"B c #D3AD60",
|
||||
"C c #5B4B2D",
|
||||
"D c #2C2417",
|
||||
"E c #21190C",
|
||||
"F c #373126",
|
||||
"G c #746B58",
|
||||
"H c #756346",
|
||||
"I c #6F675A",
|
||||
"J c #635A4D",
|
||||
"K c #A59371",
|
||||
"L c #A37C2F",
|
||||
"M c #836226",
|
||||
"N c #30281C",
|
||||
"O c #4E4535",
|
||||
"P c #C6A25A",
|
||||
"Q c #B48833",
|
||||
"R c #4F3C1C",
|
||||
"S c #221A0D",
|
||||
"T c #160F04",
|
||||
"U c #3E3931",
|
||||
"V c #827660",
|
||||
"W c #5C5242",
|
||||
"X c #564D40",
|
||||
"Y c #4B4336",
|
||||
"Z c #A48E64",
|
||||
"` c #A57E30",
|
||||
" . c #836022",
|
||||
".. c #2D2519",
|
||||
"+. c #423828",
|
||||
"@. c #DAB56C",
|
||||
"#. c #DCAE53",
|
||||
"$. c #4F3D1D",
|
||||
"%. c #221B10",
|
||||
"&. c #171208",
|
||||
"*. c #403B34",
|
||||
"=. c #766F62",
|
||||
"-. c #494134",
|
||||
";. c #40382B",
|
||||
">. c #3E3629",
|
||||
",. c #99835A",
|
||||
"'. c #9E7728",
|
||||
"). c #825F21",
|
||||
"!. c #2C2519",
|
||||
"~. c #473E2E",
|
||||
"{. c #CCA659",
|
||||
"]. c #D5A647",
|
||||
"^. c #473517",
|
||||
"/. c #2D271F",
|
||||
"(. c #534631",
|
||||
"_. c #605A4E",
|
||||
":. c #31291D",
|
||||
"<. c #352D21",
|
||||
"[. c #473F30",
|
||||
"}. c #B19A6C",
|
||||
"|. c #C99939",
|
||||
"1. c #B28B3E",
|
||||
"2. c #897857",
|
||||
"3. c #C2AC80",
|
||||
"4. c #D1A344",
|
||||
"5. c #CFA042",
|
||||
"6. c #B39353",
|
||||
"7. c #8B7451",
|
||||
"8. c #433C31",
|
||||
"9. c #272013",
|
||||
"0. c #3F3422",
|
||||
"a. c #92733A",
|
||||
"b. c #BE9036",
|
||||
"c. c #CC9D3F",
|
||||
"d. c #DAA948",
|
||||
"e. c #9C701F",
|
||||
"f. c #77581D",
|
||||
"g. c #9E7628",
|
||||
"h. c #785822",
|
||||
"i. c #403C34",
|
||||
"j. c #2F281E",
|
||||
"k. c #231C10",
|
||||
"l. c #302718",
|
||||
"m. c #35250B",
|
||||
"n. c #584017",
|
||||
"o. c #835F21",
|
||||
"p. c #2F220C",
|
||||
"q. c #30291D",
|
||||
"r. c #4F3F26",
|
||||
"s. c #3E3B34",
|
||||
"t. c #302B23",
|
||||
"u. c #272117",
|
||||
"v. c #241E13",
|
||||
"w. c #241E14",
|
||||
"x. c #27221B",
|
||||
"y. c #35302A",
|
||||
"z. c #4A4640",
|
||||
" ",
|
||||
" . + @ # $ % & * ",
|
||||
" = - ; > , ' ' ) ! ~ ",
|
||||
" { ] ^ / ( _ : < [ } | 1 ",
|
||||
" 2 3 4 5 6 7 8 9 0 a b c d ",
|
||||
" e f g h i j k l m n o p q r ",
|
||||
" s t u v w x y z A B C D E F ",
|
||||
"G H I J K L M N O P Q R S T U ",
|
||||
"V W X Y Z ` ...+.@.#.$.%.&.*. ",
|
||||
"=.-.;.>.,.'.).!.~.{.].^./.(. ",
|
||||
"_.:.<.[.}.|.1.2.3.4.5.6.7. ",
|
||||
" 8.9.0.a.b.c.d.e.f.g.h. ",
|
||||
" i.j.k.l.m.n.o.p.q.r. ",
|
||||
" s.t.u.v.w.x.y.z. ",
|
||||
" ",
|
||||
" "};
|
@ -104,6 +104,7 @@ enum server_type {
|
||||
HR_SERVER,
|
||||
#ifdef QSTAT_HAS_UNREAL_SUPPORT
|
||||
UN_SERVER,
|
||||
UT2D_SERVER,
|
||||
RUNE_SERVER,
|
||||
#endif
|
||||
DESCENT3_SERVER,
|
||||
|
Loading…
x
Reference in New Issue
Block a user