]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_input.c
oops, didn't want this debug spam to be committed
[xonotic/darkplaces.git] / cl_input.c
index 6959b14f44394df66d11d557359012b13cd037b6..af5289f58690c2ae48adebf1a4dba695966224b4 100644 (file)
@@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 #include "csprogs.h"
+#include "thread.h"
 
 /*
 ===============================================================================
@@ -805,40 +806,6 @@ static void CL_UpdatePrydonCursor(void)
                cl.cmd.cursor_fraction = CL_SelectTraceLine(cl.cmd.cursor_start, cl.cmd.cursor_end, cl.cmd.cursor_impact, cl.cmd.cursor_normal, &cl.cmd.cursor_entitynumber, (chase_active.integer || cl.intermission) ? &cl.entities[cl.playerentity].render : NULL);
 }
 
-typedef enum waterlevel_e
-{
-       WATERLEVEL_NONE,
-       WATERLEVEL_WETFEET,
-       WATERLEVEL_SWIMMING,
-       WATERLEVEL_SUBMERGED
-}
-waterlevel_t;
-
-typedef struct cl_clientmovement_state_s
-{
-       // position
-       vec3_t origin;
-       vec3_t velocity;
-       // current bounding box (different if crouched vs standing)
-       vec3_t mins;
-       vec3_t maxs;
-       // currently on the ground
-       qboolean onground;
-       // currently crouching
-       qboolean crouched;
-       // what kind of water (SUPERCONTENTS_LAVA for instance)
-       int watertype;
-       // how deep
-       waterlevel_t waterlevel;
-       // weird hacks when jumping out of water
-       // (this is in seconds and counts down to 0)
-       float waterjumptime;
-
-       // user command
-       usercmd_t cmd;
-}
-cl_clientmovement_state_t;
-
 #define NUMOFFSETS 27
 static vec3_t offsets[NUMOFFSETS] =
 {
@@ -1473,7 +1440,7 @@ static void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s)
        }
 }
 
-static void CL_ClientMovement_PlayerMove(cl_clientmovement_state_t *s)
+void CL_ClientMovement_PlayerMove(cl_clientmovement_state_t *s)
 {
        //Con_Printf(" %f", frametime);
        if (!s->cmd.jump)
@@ -1584,6 +1551,8 @@ void CL_ClientMovement_Replay(void)
        double totalmovemsec;
        cl_clientmovement_state_t s;
 
+       VectorCopy(cl.mvelocity[0], cl.movement_velocity);
+
        if (cl.movement_predicted && !cl.movement_replay)
                return;
 
@@ -1649,9 +1618,7 @@ void CL_ClientMovement_Replay(void)
                s.cmd = cl.movecmd[0];
        }
 
-       if (cls.demoplayback) // for bob, speedometer
-               VectorCopy(cl.mvelocity[0], cl.movement_velocity);
-       else
+       if (!cls.demoplayback) // for bob, speedometer
        {
                cl.movement_replay = false;
                // update the interpolation target position and velocity
@@ -1679,15 +1646,6 @@ void CL_ClientMovement_Replay(void)
                if (s.onground)
                        cl.onground = true;
        }
-
-       // react to onground state changes (for gun bob)
-       if (cl.onground)
-       {
-               if (!cl.oldonground)
-                       cl.hitgroundtime = cl.movecmd[0].time;
-               cl.lastongroundtime = cl.movecmd[0].time;
-       }
-       cl.oldonground = cl.onground;
 }
 
 static void QW_MSG_WriteDeltaUsercmd(sizebuf_t *buf, usercmd_t *from, usercmd_t *to)