]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_input.c
darkplaces now compiles in mingw
[xonotic/darkplaces.git] / cl_input.c
index 11975ce4999f120b6d4760e1a804a32e5acb801c..030ffa29275e0d94bde104c1ebfbac5a666fc493 100644 (file)
@@ -350,7 +350,7 @@ void CL_SendMove (usercmd_t *cmd)
        int             i;
        int             bits;
        sizebuf_t       buf;
-       byte    data[128];
+       qbyte   data[128];
        static double lastmovetime;
        static float forwardmove, sidemove, upmove, total; // accumulation
 
@@ -372,7 +372,7 @@ void CL_SendMove (usercmd_t *cmd)
        buf.maxsize = 128;
        buf.cursize = 0;
        buf.data = data;
-       
+
        cl.cmd = *cmd;
 
 //
@@ -382,7 +382,12 @@ void CL_SendMove (usercmd_t *cmd)
 
        MSG_WriteFloat (&buf, cl.mtime[0]);     // so server can get ping times
 
-       if (dpprotocol)
+       if (dpprotocol == DPPROTOCOL_VERSION2)
+       {
+               for (i = 0;i < 3;i++)
+                       MSG_WriteFloat (&buf, cl.viewangles[i]);
+       }
+       else if (dpprotocol == DPPROTOCOL_VERSION1)
        {
                for (i=0 ; i<3 ; i++)
                        MSG_WritePreciseAngle (&buf, cl.viewangles[i]);