X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=cl_input.c;h=cff67be27fa6e2e5e3e0c81ee7c4f2dbcd12b907;hb=f1b28354231425f68e72b876d1093f0d03e057f8;hp=86a2aec71eecec257c51b7bc27e5c0b0b72f41ef;hpb=41f1138b4a171ebb11be1418ed5579a8935b5516;p=xonotic%2Fdarkplaces.git diff --git a/cl_input.c b/cl_input.c index 86a2aec7..cff67be2 100644 --- a/cl_input.c +++ b/cl_input.c @@ -304,9 +304,9 @@ void CL_AdjustAngles (void) float up, down; if (in_speed.state & 1) - speed = host_realframetime * cl_anglespeedkey.value; + speed = cl.realframetime * cl_anglespeedkey.value; else - speed = host_realframetime; + speed = cl.realframetime; if (!(in_strafe.state & 1)) { @@ -846,16 +846,19 @@ void CL_ClientMovement_Replay(void) VectorSet(currentorigin2, currentorigin[0], currentorigin[1], currentorigin[2] + movevars_stepheight); VectorSet(neworigin2, neworigin[0], neworigin[1], currentorigin[2] + movevars_stepheight); trace2 = CL_TraceBox(currentorigin2, playermins, playermaxs, neworigin2, true, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_PLAYERCLIP, true); - // then move down from there - VectorCopy(trace2.endpos, currentorigin2); - VectorSet(neworigin2, trace2.endpos[0], trace2.endpos[1], currentorigin[2]); - trace3 = CL_TraceBox(currentorigin2, playermins, playermaxs, neworigin2, true, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_PLAYERCLIP, true); - //Con_Printf("%f %f %f %f : %f %f %f %f : %f %f %f %f\n", trace.fraction, trace.endpos[0], trace.endpos[1], trace.endpos[2], trace2.fraction, trace2.endpos[0], trace2.endpos[1], trace2.endpos[2], trace3.fraction, trace3.endpos[0], trace3.endpos[1], trace3.endpos[2]); - // accept the new trace if it made some progress - if (fabs(trace3.endpos[0] - trace.endpos[0]) >= 0.03125 || fabs(trace3.endpos[1] - trace.endpos[1]) >= 0.03125) + if (!trace2.startsolid) { - trace = trace2; - VectorCopy(trace3.endpos, trace.endpos); + // then move down from there + VectorCopy(trace2.endpos, currentorigin2); + VectorSet(neworigin2, trace2.endpos[0], trace2.endpos[1], currentorigin[2]); + trace3 = CL_TraceBox(currentorigin2, playermins, playermaxs, neworigin2, true, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_PLAYERCLIP, true); + //Con_Printf("%f %f %f %f : %f %f %f %f : %f %f %f %f\n", trace.fraction, trace.endpos[0], trace.endpos[1], trace.endpos[2], trace2.fraction, trace2.endpos[0], trace2.endpos[1], trace2.endpos[2], trace3.fraction, trace3.endpos[0], trace3.endpos[1], trace3.endpos[2]); + // accept the new trace if it made some progress + if (fabs(trace3.endpos[0] - trace.endpos[0]) >= 0.03125 || fabs(trace3.endpos[1] - trace.endpos[1]) >= 0.03125) + { + trace = trace2; + VectorCopy(trace3.endpos, trace.endpos); + } } } if (trace.fraction == 1)