summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
97820be)
After the player made some horizontal progress, and before stepping up, it's necessary to recalculate the remaining time and distance for the move. Previously the step up made the player travel (up to) nearly the move's full distance, again.
Fixes https://github.com/DarkPlacesEngine/darkplaces/issues/9
sv_gameplayfix_stepmultipletimes 1: players travel further than their velocity should allow #9
Signed-off-by: bones_was_here <bones_was_here@xa.org.au>
if (trace.fraction == 1)
break;
if (trace.fraction == 1)
break;
+
+ time_left *= 1 - trace.fraction;
+
if (trace.plane.normal[2])
{
if (trace.plane.normal[2] > 0.7)
if (trace.plane.normal[2])
{
if (trace.plane.normal[2] > 0.7)
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);
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))
{
VectorCopy(PRVM_serveredictvector(ent, origin), org);
if(!SV_PushEntity(&steptrace, ent, steppush, false))
{
- time_left *= 1 - trace.fraction;
-
// clipped to another plane
if (numplanes >= MAX_CLIP_PLANES)
{
// clipped to another plane
if (numplanes >= MAX_CLIP_PLANES)
{