]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_input.c
Linux GLX, a lot of code shrinkage/cleanup, assembly support.
[xonotic/darkplaces.git] / cl_input.c
index a43a9d9a3d4d0f15f0cba835617aea6d62af1c6c..bc6cbb1af50258094566e50f5fd4b432dc651f48 100644 (file)
@@ -189,25 +189,33 @@ float CL_KeyState (kbutton_t *key)
        val = 0;
        
        if (impulsedown && !impulseup)
+       {
                if (down)
                        val = 0.5;      // pressed and held this frame
                else
                        val = 0;        //      I_Error ();
+       }
        if (impulseup && !impulsedown)
+       {
                if (down)
                        val = 0;        //      I_Error ();
                else
                        val = 0;        // released this frame
+       }
        if (!impulsedown && !impulseup)
+       {
                if (down)
                        val = 1.0;      // held the entire frame
                else
                        val = 0;        // up the entire frame
+       }
        if (impulsedown && impulseup)
+       {
                if (down)
                        val = 0.75;     // released and re-pressed this frame
                else
                        val = 0.25;     // pressed and released this frame
+       }
 
        key->state &= 1;                // clear impulses