From cf9b7835e0f7021739bc620ac51c6081036faaee Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sun, 9 Apr 2006 00:11:10 +0000 Subject: * Fixed display of long server names * Fixed sort by ping * Changed default source to internet * Added simple options menu to frontend * Removed PB menu file * Changed default net rate * Fixed scoreboard alignment * Implemented "scoresUp" and "scoresDown" --- src/cgame/cg_consolecmds.c | 29 +++++++++++++++++++++++++++++ src/client/cl_main.c | 4 ++-- src/client/client.h | 2 +- src/qcommon/q_shared.h | 7 ++++--- src/ui/ui_main.c | 4 ++-- 5 files changed, 38 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/cgame/cg_consolecmds.c b/src/cgame/cg_consolecmds.c index fcbdd72d..cbd1aeb6 100644 --- a/src/cgame/cg_consolecmds.c +++ b/src/cgame/cg_consolecmds.c @@ -100,8 +100,35 @@ qboolean CG_RequestScores( void ) return qfalse; } +extern menuDef_t *menuScoreboard; + +static void CG_scrollScoresDown_f( void ) +{ + if( menuScoreboard && cg.scoreBoardShowing ) + { + Menu_ScrollFeeder( menuScoreboard, FEEDER_ALIENTEAM_LIST, qtrue ); + Menu_ScrollFeeder( menuScoreboard, FEEDER_HUMANTEAM_LIST, qtrue ); + } +} + + +static void CG_scrollScoresUp_f( void ) +{ + if( menuScoreboard && cg.scoreBoardShowing ) + { + Menu_ScrollFeeder( menuScoreboard, FEEDER_ALIENTEAM_LIST, qfalse ); + Menu_ScrollFeeder( menuScoreboard, FEEDER_HUMANTEAM_LIST, qfalse ); + } +} + static void CG_ScoresDown_f( void ) { + if( !cg.showScores ) + { + Menu_SetFeederSelection( menuScoreboard, FEEDER_ALIENTEAM_LIST, 0, NULL ); + Menu_SetFeederSelection( menuScoreboard, FEEDER_HUMANTEAM_LIST, 0, NULL ); + } + if( CG_RequestScores( ) ) { // leave the current scores up if they were already @@ -179,6 +206,8 @@ static consoleCommand_t commands[ ] = { "viewpos", CG_Viewpos_f }, { "+scores", CG_ScoresDown_f }, { "-scores", CG_ScoresUp_f }, + { "scoresUp", CG_scrollScoresUp_f }, + { "scoresDown", CG_scrollScoresDown_f }, { "+zoom", CG_ZoomDown_f }, { "-zoom", CG_ZoomUp_f }, { "sizeup", CG_SizeUp_f }, diff --git a/src/client/cl_main.c b/src/client/cl_main.c index 78ff243b..f326632d 100644 --- a/src/client/cl_main.c +++ b/src/client/cl_main.c @@ -2417,7 +2417,7 @@ void CL_Init( void ) { // userinfo Cvar_Get ("name", "UnnamedPlayer", CVAR_USERINFO | CVAR_ARCHIVE ); - Cvar_Get ("rate", "3000", CVAR_USERINFO | CVAR_ARCHIVE ); + Cvar_Get ("rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get ("snaps", "20", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get ("model", "sarge", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get ("headmodel", "sarge", CVAR_USERINFO | CVAR_ARCHIVE ); @@ -2538,7 +2538,7 @@ static void CL_SetServerInfo(serverInfo_t *server, const char *info, int ping) { if (server) { if (info) { server->clients = atoi(Info_ValueForKey(info, "clients")); - Q_strncpyz(server->hostName,Info_ValueForKey(info, "hostname"), MAX_NAME_LENGTH); + Q_strncpyz(server->hostName,Info_ValueForKey(info, "hostname"), MAX_HOSTNAME_LENGTH ); Q_strncpyz(server->mapName, Info_ValueForKey(info, "mapname"), MAX_NAME_LENGTH); server->maxClients = atoi(Info_ValueForKey(info, "sv_maxclients")); Q_strncpyz(server->game,Info_ValueForKey(info, "game"), MAX_NAME_LENGTH); diff --git a/src/client/client.h b/src/client/client.h index f0aa6e8e..a7db023f 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -228,7 +228,7 @@ typedef struct { typedef struct { netadr_t adr; - char hostName[MAX_NAME_LENGTH]; + char hostName[MAX_HOSTNAME_LENGTH]; char mapName[MAX_NAME_LENGTH]; char game[MAX_NAME_LENGTH]; int netType; diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 0059cdfa..64019b58 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -162,7 +162,8 @@ typedef int clipHandle_t; #define MAX_OSPATH 256 // max length of a filesystem pathname #endif -#define MAX_NAME_LENGTH 32 // max length of a client name +#define MAX_NAME_LENGTH 32 // max length of a client name +#define MAX_HOSTNAME_LENGTH 80 // max length of a host name #define MAX_SAY_TEXT 150 @@ -1247,9 +1248,9 @@ typedef struct qtime_s { // server browser sources // TTimo: AS_MPLAYER is no longer used -#define AS_LOCAL 0 +#define AS_GLOBAL 0 #define AS_MPLAYER 1 -#define AS_GLOBAL 2 +#define AS_LOCAL 2 #define AS_FAVORITES 3 diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 30b4c9fe..cde1c73a 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -56,9 +56,9 @@ static const int numSkillLevels = sizeof(skillLevels) / sizeof(const char*); static const char *netSources[] = { - "Local", - "Mplayer", "Internet", + "Mplayer", + "LAN", "Favorites" }; static const int numNetSources = sizeof(netSources) / sizeof(const char*); -- cgit