]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
fix for 'falling' in a corner bug, thanks to Elric for finding the fix for this.
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 33797065f9c94fad79433abebee88c29805b6be6..d7be378fee52e108b4cd8b270079098e5d14bf51 100644 (file)
--- a/host.c
+++ b/host.c
@@ -19,8 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 // host.c -- coordinates spawning and killing of local servers
 
-#include "quakedef.h"
 #include <time.h>
+#include "quakedef.h"
+#include "cl_video.h"
 
 /*
 
@@ -357,7 +358,7 @@ void Host_ClientCommands (char *fmt, ...)
        va_start (argptr,fmt);
        vsprintf (string, fmt,argptr);
        va_end (argptr);
-       
+
        MSG_WriteByte (&host_client->message, svc_stufftext);
        MSG_WriteString (&host_client->message, string);
 }
@@ -547,8 +548,9 @@ qboolean Host_FilterTime (double time)
        }
        else if (!cls.timedemo)
        {
+               // default to sys_ticrate (server framerate - presumably low) unless we're the active window and either connected to a server or playing a video
                timecap = sys_ticrate.value;
-               if (cls.state == ca_connected)
+               if (vid_activewindow && (cls.state == ca_connected || cl_videoplaying))
                        timecap = 1.0 / host_maxfps.value;
 
                if ((realtime - oldrealtime) < timecap)
@@ -716,6 +718,8 @@ void _Host_Frame (float time)
 
        ui_update();
 
+       CL_VideoFrame();
+
 // update video
        if (host_speeds.integer)
                time1 = Sys_DoubleTime ();