]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
added qw compatible "rcon" support (allows a client who knows the server's rcon_passw...
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index e63a7f7cce31c59ed27fa87e8f136a8f4d7ec5d6..6edefc974563f6ecb4bc0bfa69a0d5bd18aca539 100644 (file)
--- a/host.c
+++ b/host.c
@@ -122,6 +122,9 @@ void Host_Error (const char *error, ...)
        static qboolean hosterror = false;
        va_list argptr;
 
+       // turn off rcon redirect if it was active when the crash occurred
+       rcon_redirect = false;
+
        va_start (argptr,error);
        dpvsnprintf (hosterrorstring1,sizeof(hosterrorstring1),error,argptr);
        va_end (argptr);
@@ -697,10 +700,6 @@ void Host_ServerFrame (void)
                // set the time and clear the general datagram
                SV_ClearDatagram();
 
-               // check for network packets to the server each world step incase they
-               // come in midframe (particularly if host is running really slow)
-               NetConn_ServerFrame();
-
                // move things around and think unless paused
                if (sv.frametime)
                        SV_Physics();
@@ -770,6 +769,11 @@ void _Host_Frame (float time)
 //
 //-------------------
 
+       // receive server packets now, which might contain rcon commands, which
+       // may change level or other such things we don't want to have happen in
+       // the middle of Host_Frame
+       NetConn_ServerFrame();
+
        // check for commands typed to the host
        Host_GetConsoleCommands();