X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=sv_phys.c;h=1669e682c487590f003f7a5585ed32b01cd54808;hp=a918ea25603c7145aa59e09174643011a5e22152;hb=365e221966b15c24c6e2f4cbb6e619b0db443ebf;hpb=97820be04836873cca98fddf52c1901e430d9bee diff --git a/sv_phys.c b/sv_phys.c index a918ea25..1669e682 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -1255,6 +1255,9 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qbool applygravity, float if (trace.fraction == 1) break; + + time_left *= 1 - trace.fraction; + if (trace.plane.normal[2]) { if (trace.plane.normal[2] > 0.7) @@ -1282,6 +1285,7 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qbool applygravity, float trace_t steptrace3; //Con_Printf("step %f %f %f : ", PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]); VectorSet(steppush, 0, 0, stepheight); + VectorScale(PRVM_serveredictvector(ent, velocity), time_left, push); VectorCopy(PRVM_serveredictvector(ent, origin), org); if(!SV_PushEntity(&steptrace, ent, steppush, false)) { @@ -1333,8 +1337,6 @@ static int SV_FlyMove (prvm_edict_t *ent, float time, qbool applygravity, float numplanes = 0; } - time_left *= 1 - trace.fraction; - // clipped to another plane if (numplanes >= MAX_CLIP_PLANES) {