]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fixed a MSVC6 warning in matrixlib. Added a "Public server" yes/no line in the server...
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 10 Mar 2003 07:05:45 +0000 (07:05 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 10 Mar 2003 07:05:45 +0000 (07:05 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2821 d7cf8633-e32d-0410-b094-e92efae38249

matrixlib.c
menu.c
net.h

index 4fa58d79f0d84f0d14e5f0e747031310d2c7f214..e983e78213a82eb6e2df7d482d968333415eb19c 100644 (file)
@@ -431,6 +431,6 @@ void Matrix4x4_OriginFromMatrix (const matrix4x4_t *in, float *out)
 float Matrix4x4_ScaleFromMatrix (const matrix4x4_t *in)
 {
        // we only support uniform scaling, so assume the first row is enough
-       return sqrt(in->m[0][0] * in->m[0][0] + in->m[0][1] * in->m[0][1] + in->m[0][2] * in->m[0][2]);
+       return (float)sqrt(in->m[0][0] * in->m[0][0] + in->m[0][1] * in->m[0][1] + in->m[0][2] * in->m[0][2]);
 }
 
diff --git a/menu.c b/menu.c
index bcc5117e4d900bcb7b35f63380cabf3d1c1b414c..f940766941007b16d90e5174d27489727974eb51 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -3023,6 +3023,8 @@ int maxplayers;
 qboolean m_serverInfoMessage = false;
 double m_serverInfoMessageTime;
 
+extern cvar_t sv_public;
+
 void M_Menu_GameOptions_f (void)
 {
        key_dest = key_menu;
@@ -3035,8 +3037,8 @@ void M_Menu_GameOptions_f (void)
 }
 
 
-int gameoptions_cursor_table[] = {40, 56, 64, 72, 80, 88, 96, 112, 120};
-#define        NUM_GAMEOPTIONS 9
+int gameoptions_cursor_table[] = {40, 56, 64, 72, 80, 88, 96, 104, 120, 128};
+#define        NUM_GAMEOPTIONS 10
 int            gameoptions_cursor;
 
 void M_GameOptions_Draw (void)
@@ -3139,14 +3141,17 @@ void M_GameOptions_Draw (void)
        else
                M_Print (160, 96, va("%i minutes", timelimit.integer));
 
+       M_Print (0, 104, "    Public server");
+       M_Print (160, 104, (sv_public.integer == 0) ? "no" : "yes");
+
        g = lookupgameinfo();
 
-       M_Print (0, 112, "         Episode");
-       M_Print (160, 112, g->episodes[startepisode].description);
+       M_Print (0, 120, "         Episode");
+       M_Print (160, 120, g->episodes[startepisode].description);
 
-       M_Print (0, 120, "           Level");
-       M_Print (160, 120, g->levels[g->episodes[startepisode].firstLevel + startlevel].description);
-       M_Print (160, 128, g->levels[g->episodes[startepisode].firstLevel + startlevel].name);
+       M_Print (0, 128, "           Level");
+       M_Print (160, 128, g->levels[g->episodes[startepisode].firstLevel + startlevel].description);
+       M_Print (160, 136, g->levels[g->episodes[startepisode].firstLevel + startlevel].name);
 
 // line cursor
        M_DrawCharacter (144, gameoptions_cursor_table[gameoptions_cursor], 12+((int)(realtime*4)&1));
@@ -3251,6 +3256,10 @@ void M_NetStart_Change (int dir)
                break;
 
        case 7:
+               Cvar_SetValueQuick (&sv_public, !sv_public.integer);
+               break;
+
+       case 8:
                startepisode += dir;
                g = lookupgameinfo();
 
@@ -3263,7 +3272,7 @@ void M_NetStart_Change (int dir)
                startlevel = 0;
                break;
 
-       case 8:
+       case 9:
                startlevel += dir;
                g = lookupgameinfo();
 
diff --git a/net.h b/net.h
index 8323b2054c7baa6c21ff4adeb652f3af128d6a73..5a1d7fd4bfdacd5e4cadbc87caeaf15b2e31f889 100644 (file)
--- a/net.h
+++ b/net.h
@@ -333,8 +333,6 @@ extern      qboolean        slistInProgress;
 extern qboolean        slistSilent;
 extern qboolean        slistLocal;
 
-extern cvar_t hostname;
-
 void NET_Slist_f (void);
 void NET_InetSlist_f (void);