]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
fix some warnings
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index c3efe96fc94a3a8ef581acc72e0fedb1aaf18874..85be9d5d34ec3e572b44a093efbffc7ea688fbbe 100644 (file)
--- a/host.c
+++ b/host.c
@@ -567,7 +567,7 @@ qboolean Host_FilterTime (double time)
        timeleft = timecap - (realtime - oldrealtime);
        if (timeleft > 0)
        {
-#if 1
+#if 0
                if (timeleft * 1000 >= 10)
                        Sys_Sleep(1);
 #else
@@ -576,7 +576,7 @@ qboolean Host_FilterTime (double time)
                // try to hit exactly a steady framerate by not sleeping the full amount
                msleft = (int)floor(timeleft * 1000);
                if (msleft >= 10)
-                       Sys_Sleep(msleft);
+                       Sys_Sleep(msleft - 9);
 #endif
                return false;
        }
@@ -652,7 +652,7 @@ void Host_ServerFrame (void)
        // setup the VM frame
        SV_VM_Begin();
        // stop running server frames if the wall time reaches this value
-       aborttime = Sys_DoubleTime() + 0.05;
+       aborttime = Sys_DoubleTime() + 0.1;
        for (framecount = 0;framecount < framelimit && sv.timer > 0;framecount++)
        {
                if (sys_ticrate.value <= 0)
@@ -802,10 +802,10 @@ void _Host_Frame (float time)
 
        if (host_speeds.integer)
        {
-               pass1 = (time1 - time3)*1000000;
+               pass1 = (int)((time1 - time3)*1000000);
                time3 = Sys_DoubleTime();
-               pass2 = (time2 - time1)*1000000;
-               pass3 = (time3 - time2)*1000000;
+               pass2 = (int)((time2 - time1)*1000000);
+               pass3 = (int)((time3 - time2)*1000000);
                Con_Printf("%6ius total %6ius server %6ius gfx %6ius snd\n",
                                        pass1+pass2+pass3, pass1, pass2, pass3);
        }
@@ -836,7 +836,7 @@ void Host_Frame (float time)
        if (timecount < 1000)
                return;
 
-       m = timetotal*1000/timecount;
+       m = (int)(timetotal*1000/timecount);
        timecount = 0;
        timetotal = 0;
        c = 0;