]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cmd.c
win32: add two includes to make sure the constants for file mode and sharing are...
[xonotic/darkplaces.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index 8efe3dc9a0e69290ebf36383366b94ed89130b1f..0a42ca4a093d2ad9d59882ea45e6a78d52114efc 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -289,7 +289,6 @@ void Cbuf_Execute (void)
        // LordHavoc: making sure the tokenizebuffer doesn't get filled up by repeated crashes
        cmd_tokenizebufferpos = 0;
 
-       Cbuf_Execute_Deferred();
        while (cmd_text.cursize)
        {
 // find a \n or ; line break
@@ -378,6 +377,17 @@ void Cbuf_Execute (void)
        }
 }
 
+void Cbuf_Frame(void)
+{
+       Cbuf_Execute_Deferred();
+       if (cmd_text.cursize)
+       {
+               SV_LockThreadMutex();
+               Cbuf_Execute();
+               SV_UnlockThreadMutex();
+       }
+}
+
 /*
 ==============================================================================