summaryrefslogtreecommitdiff
path: root/src/ui/ui_main.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-12-28 02:32:43 +0000
committerTim Angus <tim@ngus.net>2005-12-28 02:32:43 +0000
commit1dc7e94283f026b17c1e793cbf7542872812ffda (patch)
tree33de56bca208626f1e7c77853255afc2b8244279 /src/ui/ui_main.c
parent4b614e63d7da358a8a30e61a89365add79ecde9c (diff)
* Added master server to source, based on dpmaster
* Removed gametype, fraglimit and dmflags cvars * Removed CD key authentication stuff * Implemented a means to save and restore cmd context * Bumped protocol version up to 69 (same as 68) * Removed various references to punkbuster * Maps on create server menu now sorted by name * Fixed some warnings
Diffstat (limited to 'src/ui/ui_main.c')
-rw-r--r--src/ui/ui_main.c75
1 files changed, 4 insertions, 71 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index bf00c5fa..198a33f6 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -199,9 +199,6 @@ long vmMain( long command, long arg0, long arg1, long arg2, long arg3,
case UI_DRAW_CONNECT_SCREEN:
UI_DrawConnectScreen( arg0 );
return 0;
- case UI_HASUNIQUECDKEY: // mod authors need to observe this
- return qfalse; // bk010117 - change this to qfalse for mods!
-
}
return -1;
@@ -4002,37 +3999,6 @@ static void UI_RunMenuScript(char **args) {
Controls_SetDefaults();
trap_Cvar_Set("com_introPlayed", "1" );
trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart\n" );
- } else if (Q_stricmp(name, "getCDKey") == 0) {
- char out[17];
- trap_GetCDKey(buff, 17);
- trap_Cvar_Set("cdkey1", "");
- trap_Cvar_Set("cdkey2", "");
- trap_Cvar_Set("cdkey3", "");
- trap_Cvar_Set("cdkey4", "");
- if (strlen(buff) == CDKEY_LEN) {
- Q_strncpyz(out, buff, 5);
- trap_Cvar_Set("cdkey1", out);
- Q_strncpyz(out, buff + 4, 5);
- trap_Cvar_Set("cdkey2", out);
- Q_strncpyz(out, buff + 8, 5);
- trap_Cvar_Set("cdkey3", out);
- Q_strncpyz(out, buff + 12, 5);
- trap_Cvar_Set("cdkey4", out);
- }
-
- } else if (Q_stricmp(name, "verifyCDKey") == 0) {
- buff[0] = '\0';
- Q_strcat(buff, 1024, UI_Cvar_VariableString("cdkey1"));
- Q_strcat(buff, 1024, UI_Cvar_VariableString("cdkey2"));
- Q_strcat(buff, 1024, UI_Cvar_VariableString("cdkey3"));
- Q_strcat(buff, 1024, UI_Cvar_VariableString("cdkey4"));
- trap_Cvar_Set("cdkey", buff);
- if (trap_VerifyCDKey(buff, UI_Cvar_VariableString("cdkeychecksum"))) {
- trap_Cvar_Set("ui_cdkeyvalid", "CD Key Appears to be valid.");
- trap_SetCDKey(buff);
- } else {
- trap_Cvar_Set("ui_cdkeyvalid", "CD Key does not appear to be valid.");
- }
} else if (Q_stricmp(name, "loadArenas") == 0) {
UI_LoadArenas();
UI_MapCountByGameType(qfalse);
@@ -4601,10 +4567,6 @@ static void UI_BuildServerDisplayList(qboolean force) {
// do motd updates here too
trap_Cvar_VariableStringBuffer( "cl_motdString", uiInfo.serverStatus.motd, sizeof(uiInfo.serverStatus.motd) );
len = strlen(uiInfo.serverStatus.motd);
- if (len == 0) {
- strcpy(uiInfo.serverStatus.motd, "Welcome to Tremulous!");
- len = strlen(uiInfo.serverStatus.motd);
- }
if (len != uiInfo.serverStatus.motdLen) {
uiInfo.serverStatus.motdLen = len;
uiInfo.serverStatus.motdWidth = -1;
@@ -4670,13 +4632,6 @@ static void UI_BuildServerDisplayList(qboolean force) {
}
}
- //TA: only show tremulous servers
- if( Q_stricmp( Info_ValueForKey( info, "game" ), "tremulous" ) != 0 )
- {
- trap_LAN_MarkServerVisible( ui_netSource.integer, i, qfalse );
- continue;
- }
-
// make sure we never add a favorite server twice
if (ui_netSource.integer == AS_FAVORITES) {
UI_RemoveServerFromDisplayList(i);
@@ -5173,13 +5128,13 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
return UI_SelectedMap(index, &actual);
} else if (feederID == FEEDER_SERVERS) {
if (index >= 0 && index < uiInfo.serverStatus.numDisplayServers) {
- int ping, punkbuster;
+ int ping;
if (lastColumn != column || lastTime > uiInfo.uiDC.realTime + 5000) {
trap_LAN_GetServerInfo(ui_netSource.integer, uiInfo.serverStatus.displayServers[index], info, MAX_STRING_CHARS);
lastColumn = column;
lastTime = uiInfo.uiDC.realTime;
}
- /*return "bah";*/
+
ping = atoi(Info_ValueForKey(info, "ping"));
if (ping == -1) {
// if we ever see a ping that is out of date, do a server refresh
@@ -5213,13 +5168,6 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
} else {
return Info_ValueForKey(info, "ping");
}
- case SORT_PUNKBUSTER:
- punkbuster = atoi(Info_ValueForKey(info, "punkbuster"));
- if ( punkbuster ) {
- return "Yes";
- } else {
- return "No";
- }
}
}
} else if (feederID == FEEDER_SERVERSTATUS) {
@@ -5831,18 +5779,6 @@ void _UI_SetActiveMenu( uiMenuCommand_t menu ) {
trap_Key_SetCatcher( KEYCATCH_UI );
Menus_ActivateByName("team");
return;
- case UIMENU_NEED_CD:
- // no cd check in TA
- //trap_Key_SetCatcher( KEYCATCH_UI );
- //Menus_ActivateByName("needcd");
- //UI_ConfirmMenu( "Insert the CD", NULL, NeedCDAction );
- return;
- case UIMENU_BAD_CD_KEY:
- // no cd check in TA
- //trap_Key_SetCatcher( KEYCATCH_UI );
- //Menus_ActivateByName("badcd");
- //UI_ConfirmMenu( "Bad CD Key", NULL, NeedCDKeyAction );
- return;
case UIMENU_POSTGAME:
//trap_Cvar_Set( "sv_killserver", "1" );
trap_Key_SetCatcher( KEYCATCH_UI );
@@ -5851,7 +5787,6 @@ void _UI_SetActiveMenu( uiMenuCommand_t menu ) {
}
Menus_CloseAll();
Menus_ActivateByName("endofgame");
- //UI_ConfirmMenu( "Bad CD Key", NULL, NeedCDKeyAction );
return;
case UIMENU_INGAME:
trap_Cvar_Set( "cl_paused", "1" );
@@ -6198,8 +6133,6 @@ vmCvar_t ui_server14;
vmCvar_t ui_server15;
vmCvar_t ui_server16;
-vmCvar_t ui_cdkeychecked;
-
vmCvar_t ui_redteam;
vmCvar_t ui_redteam1;
vmCvar_t ui_redteam2;
@@ -6321,7 +6254,6 @@ static cvarTable_t cvarTable[] = {
{ &ui_server14, "server14", "", CVAR_ARCHIVE },
{ &ui_server15, "server15", "", CVAR_ARCHIVE },
{ &ui_server16, "server16", "", CVAR_ARCHIVE },
- { &ui_cdkeychecked, "ui_cdkeychecked", "0", CVAR_ROM },
{ &ui_new, "ui_new", "0", CVAR_TEMP },
{ &ui_debug, "ui_debug", "0", CVAR_TEMP },
{ &ui_initialized, "ui_initialized", "0", CVAR_TEMP },
@@ -6504,7 +6436,8 @@ static void UI_StartServerRefresh(qboolean full)
qtime_t q;
trap_RealTime(&q);
- trap_Cvar_Set( va("ui_lastServerRefresh_%i", ui_netSource.integer), va("%s-%i, %i at %i:%i", MonthAbbrev[q.tm_mon],q.tm_mday, 1900+q.tm_year,q.tm_hour,q.tm_min));
+ trap_Cvar_Set( va("ui_lastServerRefresh_%i", ui_netSource.integer),
+ va("%s-%i, %i at %i:%02i", MonthAbbrev[q.tm_mon],q.tm_mday, 1900+q.tm_year,q.tm_hour,q.tm_min));
if (!full) {
UI_UpdatePendingPings();