summaryrefslogtreecommitdiff
path: root/source/ui_multiplayer.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-05-18 14:37:21 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-05-18 14:37:21 +0000
commitcb43ed08c3cf6410fe4ce22dac3d07952db92893 (patch)
tree0b2b2790941743db47913cdf06b819c36b89e161 /source/ui_multiplayer.c
parent179f701f7aec100ac1228fc02778fc4af47b75f0 (diff)
Accept `all' as special argument to `delstuffcmd' command.
Cleaned up Cvar_Get and fixed semantic bug. Accept `background keyword in menu scripts. Renamed `gl_fastsky' to `gl_drawsky'. If at least one of the sky env maps fails lo load, disable entire sky drawing. Reworked loading screen. Fixed Com_Quit argument string handling. Catch more signals on *nix. Updated server docs.
Diffstat (limited to 'source/ui_multiplayer.c')
-rw-r--r--source/ui_multiplayer.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/source/ui_multiplayer.c b/source/ui_multiplayer.c
index a54858c..61e7fae 100644
--- a/source/ui_multiplayer.c
+++ b/source/ui_multiplayer.c
@@ -202,9 +202,9 @@ static void PingSelected( void ) {
UpdateSelection();
m_join.menu.status = "Pinging servers, please wait...";
- client.UpdateScreen();
+ SCR_UpdateScreen();
- client.SendStatusRequest( s->realAddress, 0 );
+ CL_SendStatusRequest( s->realAddress, 0 );
UpdateSelection();
}
@@ -217,7 +217,7 @@ static void AddUnlistedServers( void ) {
m_join.active = qtrue;
// ping broadcast
- client.SendStatusRequest( NULL, 0 );
+ CL_SendStatusRequest( NULL, 0 );
for( i = 0; i < MAX_STATUS_SERVERS; i++ ) {
var = cvar.Find( va( "adr%i", i ) );
@@ -251,9 +251,9 @@ static void AddUnlistedServers( void ) {
slot->address, "???", "?/?", NULL );
// ping and resolve real ip
- client.SendStatusRequest( slot->realAddress, sizeof( slot->realAddress ) );
+ CL_SendStatusRequest( slot->realAddress, sizeof( slot->realAddress ) );
- client.UpdateScreen();
+ SCR_UpdateScreen();
}
}
@@ -282,11 +282,11 @@ static void FreeListedServers( void ) {
static void PingServers( void ) {
FreeListedServers();
- client.StopAllSounds();
+ S_StopAllSounds();
UpdateSelection();
m_join.menu.status = "Pinging servers, please wait...";
- client.UpdateScreen();
+ SCR_UpdateScreen();
// send out info packets
AddUnlistedServers();
@@ -297,7 +297,7 @@ static void PingServers( void ) {
static menuSound_t Connect( menuCommon_t *self ) {
serverSlot_t *s = &m_join.servers[m_join.list.curvalue];
- cmd.ExecuteText( EXEC_APPEND, va( "connect \"%s\"\n", s->realAddress ) );
+ Cbuf_AddText( va( "connect \"%s\"\n", s->realAddress ) );
UI_PopMenu();
return QMS_IN;
}
@@ -349,7 +349,7 @@ static menuSound_t Keydown( menuFrameWork_t *self, int key ) {
switch( key ) {
case 'r':
- cvar.Set( "rcon_address", s->realAddress );
+ Cvar_Set( "rcon_address", s->realAddress );
return QMS_SILENT;
case ' ':
if( !Key_IsDown( K_ALT ) ) {
@@ -371,6 +371,10 @@ static void Expose( menuFrameWork_t *self ) {
PingServers();
}
+static void Free( menuFrameWork_t *self ) {
+ memset( &m_join, 0, sizeof( m_join ) );
+}
+
void M_Menu_Servers( void ) {
m_join.menu.name = "servers";
m_join.menu.title = "Server Browser";
@@ -379,6 +383,9 @@ void M_Menu_Servers( void ) {
m_join.menu.pop = Pop;
m_join.menu.size = Size;
m_join.menu.keydown = Keydown;
+ m_join.menu.free = Free;
+ m_join.menu.image = uis.backgroundHandle;
+ *( uint32_t * )m_join.menu.color = *( uint32_t * )colorBlack;
//
// server list