]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
fix some prototype warnings
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index a5e620d6b42950dd052d343a56f4dec6e5ca8982..42dca46c48112363dcabc8124e198c1125fa47e0 100644 (file)
--- a/host.c
+++ b/host.c
@@ -461,6 +461,8 @@ void SV_DropClient (qboolean crash)
                MSG_WriteByte (&client->message, host_client - svs.clients);
                MSG_WriteByte (&client->message, 0);
        }
+
+       NET_Heartbeat ();
 }
 
 /*
@@ -488,6 +490,9 @@ void Host_ShutdownServer(qboolean crash)
 // stop all client sounds immediately
        CL_Disconnect ();
 
+       NET_Heartbeat ();
+       NET_Heartbeat ();
+
 // flush any pending messages - like the score!!!
        start = Sys_DoubleTime();
        do
@@ -885,12 +890,22 @@ void Host_Init (void)
 #ifndef _WIN32 // on non win32, mouse comes before video for security reasons
                IN_Init ();
 #endif
-               VID_Init (vid_fullscreen.integer, vid_width.integer, vid_height.integer, vid_bitsperpixel.integer);
+               VID_Init();
+               if (!VID_Mode(vid_fullscreen.integer, vid_width.integer, vid_height.integer, vid_bitsperpixel.integer))
+               {
+                       if (vid_fullscreen.integer)
+                       {
+                               if (!VID_Mode(true, 640, 480, 16))
+                                       if (!VID_Mode(false, 640, 480, 16))
+                                               Sys_Error("Video modes failed\n");
+                       }
+                       else
+                               Sys_Error("Requested windowed video mode failed\n");
+               }
 
                Render_Init();
                S_Init ();
                CDAudio_Init ();
-               Sbar_Init ();
                CL_Init ();
 #ifdef _WIN32 // on non win32, mouse comes before video for security reasons
                IN_Init ();