]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
use DP_LINK_ZLIB=dlopen on mingw build to reduce compile-time
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index a8c8bf2ec6f591c59cb915760a5ea22c134c93e2..b236b0f12c051cff5946c31d268d5a82316f6166 100644 (file)
--- a/host.c
+++ b/host.c
@@ -23,7 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <time.h>
 #include "libcurl.h"
+#ifdef CONFIG_CD
 #include "cdaudio.h"
+#endif
 #include "cl_video.h"
 #include "progsvm.h"
 #include "csprogs.h"
@@ -477,9 +479,9 @@ void SV_DropClient(qboolean crash)
                        buf.data = bufdata;
                        buf.maxsize = sizeof(bufdata);
                        MSG_WriteByte(&buf, svc_disconnect);
-                       NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, false);
-                       NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, false);
-                       NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, false);
+                       NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, 0, false);
+                       NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, 0, false);
+                       NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, 0, false);
                }
        }
 
@@ -925,7 +927,7 @@ void Host_Main(void)
                {
                        R_TimeReport("---");
                        Collision_Cache_NewFrame();
-                       R_TimeReport("collisioncache");
+                       R_TimeReport("photoncache");
                        // decide the simulation time
                        if (cls.capturevideo.active)
                        {
@@ -1024,8 +1026,10 @@ void Host_Main(void)
                        else
                                S_Update(&r_refdef.view.matrix);
 
+#ifdef CONFIG_CD
                        CDAudio_Update();
                        R_TimeReport("audio");
+#endif
 
                        // reset gathering of mouse input
                        in_mouse_x = in_mouse_y = 0;
@@ -1073,7 +1077,9 @@ void Host_StartVideo(void)
                // make sure we open sockets before opening video because the Windows Firewall "unblock?" dialog can screw up the graphics context on some graphics drivers
                NetConn_UpdateSockets();
                VID_Start();
+#ifdef CONFIG_CD
                CDAudio_Startup();
+#endif
        }
 }
 
@@ -1274,7 +1280,9 @@ static void Host_Init (void)
                VID_Init();
                Render_Init();
                S_Init();
+#ifdef CONFIG_CD
                CDAudio_Init();
+#endif
                Key_Init();
                CL_Init();
        }
@@ -1410,7 +1418,9 @@ void Host_Shutdown(void)
 
        Host_SaveConfig();
 
+#ifdef CONFIG_CD
        CDAudio_Shutdown ();
+#endif
        S_Terminate ();
        Curl_Shutdown ();
        NetConn_Shutdown ();