]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
Added in_mouse_x and in_mouse_y, which contain the rel. coords of the mouse.
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 6618d329e4bb32fad5e73de05b8943f2ff62539a..75ee9b3dcb77656e73a60431df287bbfe47e671d 100644 (file)
--- a/host.c
+++ b/host.c
@@ -687,7 +687,8 @@ void _Host_Frame (float time)
        static double time2 = 0;
        static double time3 = 0;
        int pass1, pass2, pass3;
-
+       usercmd_t cmd; // Used for receiving input
+       
        if (setjmp(host_abortserver))
                return;                 // something bad happened, or the server disconnected
 
@@ -706,6 +707,9 @@ void _Host_Frame (float time)
        // allow mice or other external controllers to add commands
        IN_Commands();
 
+       // Collect input into cmd
+       IN_ProcessMove(&cmd);
+       
        // process console commands
        Cbuf_Execute();
 
@@ -714,7 +718,7 @@ void _Host_Frame (float time)
 
        // if running the server locally, make intentions now
        if (cls.state == ca_connected && sv.active)
-               CL_SendCmd();
+               CL_SendCmd(&cmd);
 
 //-------------------
 //
@@ -744,7 +748,7 @@ void _Host_Frame (float time)
                // if running the server remotely, send intentions now after
                // the incoming messages have been read
                if (!sv.active)
-                       CL_SendCmd();
+                       CL_SendCmd(&cmd);
                CL_ReadFromServer();
        }