]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
no longer has time or team columns in non-QW games
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 0623c1ac3a579ce1e4fdd68d0466b218f7d32057..15ffddc92334e21508f0cbb520d88627331ad35b 100644 (file)
--- a/host.c
+++ b/host.c
@@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <time.h>
 #include "quakedef.h"
+#include "libcurl.h"
 #include "cdaudio.h"
 #include "cl_video.h"
 #include "progsvm.h"
@@ -131,7 +132,7 @@ void Host_Error (const char *error, ...)
                Sys_Error ("Host_Error: recursively entered (original error was: %s    new error is: %s)", hosterrorstring2, hosterrorstring1);
        hosterror = true;
 
-       strcpy(hosterrorstring2, hosterrorstring1);
+       strlcpy(hosterrorstring2, hosterrorstring1, sizeof(hosterrorstring2));
 
        CL_Parse_DumpPacket();
 
@@ -619,12 +620,17 @@ void Host_Main(void)
 
                NetConn_UpdateSockets();
 
+               Curl_Run();
+
        //-------------------
        //
        // server operations
        //
        //-------------------
 
+               // check for commands typed to the host
+               Host_GetConsoleCommands();
+
                if (sv_timer > 0)
                {
                        if (!sv.active)
@@ -646,9 +652,6 @@ void Host_Main(void)
                                // the middle of Host_Frame
                                NetConn_ServerFrame();
 
-                               // check for commands typed to the host
-                               Host_GetConsoleCommands();
-
                                // run the world state
                                // don't allow simulation to run too fast or too slow or logic glitches can occur
 
@@ -735,7 +738,7 @@ void Host_Main(void)
                                // decide the simulation time
                                if (!cls.timedemo)
                                {
-                                       if (cls.capturevideo_active && !cls.capturevideo_soundfile)
+                                       if (cls.capturevideo_active)// && !cls.capturevideo_soundfile)
                                        {
                                                frametime = 1.0 / cls.capturevideo_framerate;
                                                cl.realframetime = max(cl.realframetime, frametime);
@@ -922,6 +925,7 @@ static void Host_Init (void)
        // initialize various cvars that could not be initialized earlier
        Memory_Init_Commands();
        Con_Init_Commands();
+       Curl_Init_Commands();
        Cmd_Init_Commands();
        Sys_Init_Commands();
        COM_Init_Commands();
@@ -932,6 +936,7 @@ static void Host_Init (void)
        Mathlib_Init();
 
        NetConn_Init();
+       Curl_Init();
        //PR_Init();
        //PR_Cmd_Init();
        PRVM_Init();
@@ -1086,6 +1091,7 @@ void Host_Shutdown(void)
 
        CDAudio_Shutdown ();
        S_Terminate ();
+       Curl_Shutdown ();
        NetConn_Shutdown ();
        //PR_Shutdown ();