]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
sync console command execution to the server timer or the client timer
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 26 Jun 2008 02:41:07 +0000 (02:41 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 26 Jun 2008 02:41:07 +0000 (02:41 +0000)
depending on whether the server is running (previously when playing
online it would execute them on every main loop, which could mess up the
timing of multiple impulses in sequence)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8378 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index b6f177ace451371f49a55e0bc2985e381244952c..661233caf3671c8e1a898079a7a81500071ce463 100644 (file)
--- a/host.c
+++ b/host.c
@@ -682,8 +682,8 @@ void Host_Main(void)
 
                // when a server is running we only execute console commands on server frames
                // (this mainly allows frikbot .way config files to work properly by staying in sync with the server qc)
-               // otherwise we execute them on all frames
-               if (sv_timer > 0 || !sv.active)
+               // otherwise we execute them on client frames
+               if (sv.active ? sv_timer > 0 : cl_timer > 0)
                {
                        // process console commands
                        Cbuf_Execute();