diff --git a/xqf/ChangeLog b/xqf/ChangeLog index 5fa195c..ee68235 100644 --- a/xqf/ChangeLog +++ b/xqf/ChangeLog @@ -1,3 +1,6 @@ +Mar 15, 2003: Ludwig Nussel +- added Serious Sam: The Second Encounter + Mar 10, 2003: Ludwig Nussel - store all map names lowercase, otherwise many maps are reported as not installed diff --git a/xqf/src/game.c b/xqf/src/game.c index 57a415b..fd1f697 100644 --- a/xqf/src/game.c +++ b/xqf/src/game.c @@ -752,6 +752,36 @@ struct game games[] = { NULL // game_cfg }, + { + SSAMSE_SERVER, + GAME_CONNECT, + "Serious Sam TSE", + 25600, + 0, + "SMSSE", + "SMS", + "-sms", + NULL, + &ssam_pix, + + un_parse_player, + quake_parse_server, + un_analyze_serverinfo, + config_is_valid_generic, + NULL, + ssam_exec, + NULL, + quake_save_info, + NULL, // Custom arguments + NULL, // arch_identifier + NULL, // identify_cpu + NULL, // identify_os + NULL, // cmd + NULL, // dir + NULL, // real_dir + NULL // game_cfg + }, + // any game using the gamespy protocol { GPS_SERVER, // server_type @@ -841,6 +871,7 @@ void init_games() game_set_attribute(UT2_SERVER,"suggest_commands",strdup("ut2003:ut2003_demo")); game_set_attribute(RUNE_SERVER,"suggest_commands",strdup("rune")); game_set_attribute(SSAM_SERVER,"suggest_commands",strdup("ssamtfe")); + game_set_attribute(SSAMSE_SERVER,"suggest_commands",strdup("ssamtse")); game_set_attribute(SFS_SERVER,"game_notes",strdup(_ ("Note: Soldier of Fortune will not connect to a server correctly\n"\ @@ -858,6 +889,10 @@ void init_games() ("Note: You need to create a qstat config file for this game to work.\n"\ "Please see the XQF documentation for more information."))); + game_set_attribute(SSAMSE_SERVER,"game_notes",strdup(_ + ("Note: You need to create a qstat config file for this game to work.\n"\ + "Please see the XQF documentation for more information."))); + } // retreive game specific value that belongs to key, do not free return value! @@ -1266,6 +1301,14 @@ static void un_analyze_serverinfo (struct server *s) { { s->type = UT2_SERVER; } + else if(!strcmp(info_ptr[1],"serioussam")) + { + s->type = SSAM_SERVER; + } + else if(!strcmp(info_ptr[1],"serioussamse")) + { + s->type = SSAMSE_SERVER; + } } //password required? diff --git a/xqf/src/xqf.h b/xqf/src/xqf.h index 38dbe88..50b87e8 100644 --- a/xqf/src/xqf.h +++ b/xqf/src/xqf.h @@ -76,6 +76,7 @@ #define PLAYER_GROUP_GREEN 0x02 #define PLAYER_GROUP_BLUE 0x04 +/* max 0x80, server->flags is char */ #define SERVER_CHEATS 0x08 #define SERVER_PASSWORD 0x10 #define SERVER_SP_PASSWORD 0x20 @@ -94,9 +95,7 @@ enum server_type { Q1_SERVER = 0, QW_SERVER, Q2_SERVER, -#ifdef QSTAT23 Q3_SERVER, -#endif WO_SERVER, EF_SERVER, H2_SERVER, @@ -108,13 +107,12 @@ enum server_type { SOF2S_SERVER, T2_SERVER, HR_SERVER, -#ifdef QSTAT_HAS_UNREAL_SUPPORT UN_SERVER, UT2_SERVER, RUNE_SERVER, -#endif DESCENT3_SERVER, SSAM_SERVER, + SSAMSE_SERVER, GPS_SERVER, UNKNOWN_SERVER }; @@ -158,33 +156,37 @@ struct host { int ref_count; }; + +/** server_new, server_free_info, server_move_info must be adapted for + * changes to this structure + */ struct server { + enum server_type type; struct host *host; unsigned short port; char *name; char *map; - char *gametype; unsigned short maxplayers; unsigned short curplayers; + unsigned short private_client; /** number of private clients */ short ping; short retries; char **info; - char *game; /* a reference to `info' */ - GSList *players; /* GSList */ + char *game; /** pointer into info, do not free */ + char *gametype; /** pointer into info, do not free */ + GSList *players; /** GSList */ - char sv_os; /* L = Linux, W = windows, M = Mac */ + char sv_os; /** L = Linux, W = windows, M = Mac */ - enum server_type type; /* enum server_type type; */ unsigned char flags; unsigned char filters; unsigned char flt_mask; - unsigned flt_last; /* time of the last filtering */ - unsigned private_client; /* number of private clients */ + unsigned flt_last; /** time of the last filtering */ time_t refreshed; - time_t last_answer; + time_t last_answer; /** time of last reply from server */ int ref_count; };