]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Added a couple more "const". Fixed "+map" in the command line for dedicated servers...
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 4 Oct 2002 06:05:46 +0000 (06:05 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 4 Oct 2002 06:05:46 +0000 (06:05 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2494 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
cl_screen.h
host_cmd.c
menu.c
net_main.c

index 741f44841884670cc5b815345c8d3fab77710996..5abb2196485b195b6812a1c0c89e51ffb9cb67b9 100644 (file)
@@ -506,7 +506,7 @@ void DrawQ_Pic(float x, float y, char *picname, float width, float height, float
        r_refdef.drawqueuesize += dq->size;
 }
 
        r_refdef.drawqueuesize += dq->size;
 }
 
-void DrawQ_String(float x, float y, char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags)
+void DrawQ_String(float x, float y, const char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags)
 {
        int size, len;
        drawqueue_t *dq;
 {
        int size, len;
        drawqueue_t *dq;
index 37b15ad3f776e36351fbeaa3a3b3b689aaa20d51..9a4859b583c6f72c4e4c9917b75ec2333b681c17 100644 (file)
@@ -39,7 +39,7 @@ void DrawQ_Clear(void);
 // draw an image
 void DrawQ_Pic(float x, float y, char *picname, float width, float height, float red, float green, float blue, float alpha, int flags);
 // draw a text string
 // draw an image
 void DrawQ_Pic(float x, float y, char *picname, float width, float height, float red, float green, float blue, float alpha, int flags);
 // draw a text string
-void DrawQ_String(float x, float y, char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags);
+void DrawQ_String(float x, float y, const char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags);
 // draw a filled rectangle
 void DrawQ_Fill (float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
 // draw a triangle mesh
 // draw a filled rectangle
 void DrawQ_Fill (float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
 // draw a triangle mesh
index 423ba2ffab7b05e801e93e339e993de481bf78c2..0a3f978d128dd9d7dbe2f5199a32f70b44d3ebb3 100644 (file)
@@ -1532,7 +1532,7 @@ void Host_Startdemos_f (void)
 
        if (cls.state == ca_dedicated)
        {
 
        if (cls.state == ca_dedicated)
        {
-               if (!sv.active)
+               if (!sv.active && !sv_spawnmap[0])
                        Cbuf_AddText ("map start\n");
                return;
        }
                        Cbuf_AddText ("map start\n");
                return;
        }
diff --git a/menu.c b/menu.c
index c729750b73667b9d4715a4f449f1d8d542d206ff..9b6375edd107b95f8638c0ef594d2c473b07e942 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -178,7 +178,7 @@ void M_Print (float cx, float cy, char *str)
        DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0);
 }
 
        DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0);
 }
 
-void M_PrintWhite (float cx, float cy, char *str)
+void M_PrintWhite (float cx, float cy, const char *str)
 {
        DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0);
 }
 {
        DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0);
 }
@@ -2772,7 +2772,7 @@ void M_GameOptions_Draw (void)
                        M_Print (x, 146, " More than 64 players?? ");
                        M_Print (x, 154, "  First, question your  ");
                        M_Print (x, 162, "   sanity, then email   ");
                        M_Print (x, 146, " More than 64 players?? ");
                        M_Print (x, 154, "  First, question your  ");
                        M_Print (x, 162, "   sanity, then email   ");
-                       M_Print (x, 170, " havoc@gamevisions.com  ");
+                       M_Print (x, 170, "   havoc@inside3d.com   ");
                }
                else
                {
                }
                else
                {
@@ -2965,6 +2965,7 @@ void M_Menu_Search_f (void)
 
 void M_Search_Draw (void)
 {
 
 void M_Search_Draw (void)
 {
+       const char* string;
        cachepic_t      *p;
        int x;
 
        cachepic_t      *p;
        int x;
 
@@ -2992,7 +2993,11 @@ void M_Search_Draw (void)
                return;
        }
 
                return;
        }
 
-       M_PrintWhite ((320/2) - ((22*8)/2), 64, "No Quake servers found");
+       if (gamemode == GAME_TRANSFUSION)
+               string = "No Transfusion servers found";
+       else
+               string = "No Quake servers found";
+       M_PrintWhite ((320/2) - ((22*8)/2), 64, string);
        if ((realtime - searchCompleteTime) < 3.0)
                return;
 
        if ((realtime - searchCompleteTime) < 3.0)
                return;
 
@@ -3022,38 +3027,7 @@ void M_Menu_InetSearch_f (void)
 
 void M_InetSearch_Draw (void)
 {
 
 void M_InetSearch_Draw (void)
 {
-       cachepic_t      *p;
-       int x;
-
-       p = Draw_CachePic ("gfx/p_multi.lmp");
-       M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
-       x = (320/2) - ((12*8)/2) + 4;
-       M_DrawTextBox (x-8, 32, 12, 1);
-       M_Print (x, 40, "Searching...");
-
-       if(slistInProgress)
-       {
-               NET_Poll();
-               return;
-       }
-
-       if (! searchComplete)
-       {
-               searchComplete = true;
-               searchCompleteTime = realtime;
-       }
-
-       if (hostCacheCount)
-       {
-               M_Menu_ServerList_f ();
-               return;
-       }
-
-       M_PrintWhite ((320/2) - ((22*8)/2), 64, "No Quake servers found");
-       if ((realtime - searchCompleteTime) < 3.0)
-               return;
-
-       M_Menu_LanConfig_f ();
+       M_Search_Draw ();  // it's the same one, so why bother?
 }
 
 
 }
 
 
index 393403732a18217fb184d2d1da621d34361948aa..0697022f4f73941626ce8354e9c884a5e2c731e0 100644 (file)
@@ -260,49 +260,48 @@ static void PrintSlistTrailer(void)
        if (hostCacheCount)
                Con_Printf("== end list ==\n\n");
        else
        if (hostCacheCount)
                Con_Printf("== end list ==\n\n");
        else
-               Con_Printf("No Quake servers found.\n\n");
+       {
+               if (gamemode == GAME_TRANSFUSION)
+                       Con_Printf("No Transfusion servers found.\n\n");
+               else
+                       Con_Printf("No Quake servers found.\n\n");
+       }
 }
 
 
 }
 
 
-void NET_Slist_f (void)
+void NET_SlistCommon (PollProcedure *sendProcedure, PollProcedure *pollProcedure)
 {
        if (slistInProgress)
                return;
 
        if (! slistSilent)
        {
 {
        if (slistInProgress)
                return;
 
        if (! slistSilent)
        {
-               Con_Printf("Looking for Quake servers...\n");
+               if (gamemode == GAME_TRANSFUSION)
+                       Con_Printf("Looking for Transfusion servers...\n");
+               else
+                       Con_Printf("Looking for Quake servers...\n");
                PrintSlistHeader();
        }
 
        slistInProgress = true;
        slistStartTime = Sys_DoubleTime();
 
                PrintSlistHeader();
        }
 
        slistInProgress = true;
        slistStartTime = Sys_DoubleTime();
 
-       SchedulePollProcedure(&slistSendProcedure, 0.0);
-       SchedulePollProcedure(&slistPollProcedure, 0.1);
+       SchedulePollProcedure(sendProcedure, 0.0);
+       SchedulePollProcedure(pollProcedure, 0.1);
 
        hostCacheCount = 0;
 }
 
 
 
        hostCacheCount = 0;
 }
 
 
-void NET_InetSlist_f (void)
+void NET_Slist_f (void)
 {
 {
-       if (slistInProgress)
-               return;
-
-       if (! slistSilent)
-       {
-               Con_Printf("Looking for Quake servers...\n");
-               PrintSlistHeader();
-       }
-
-       slistInProgress = true;
-       slistStartTime = Sys_DoubleTime();
+       NET_SlistCommon (&slistSendProcedure, &slistPollProcedure);
+}
 
 
-       SchedulePollProcedure(&inetSlistSendProcedure, 0.0);
-       SchedulePollProcedure(&inetSlistPollProcedure, 0.1);
 
 
-       hostCacheCount = 0;
+void NET_InetSlist_f (void)
+{
+       NET_SlistCommon (&inetSlistSendProcedure, &inetSlistPollProcedure);
 }
 
 
 }