Skip to content

Commit

Permalink
DDA: Fix slow travel speed
Browse files Browse the repository at this point in the history
@phord abstract this to: This happens only when !recalc_speed,
meaning we are cruising, not accelerating or decelerating. So it
pegs our dda->c at c_min if it never made it as far as c_min.

This commit will fix Traumflug#69
  • Loading branch information
Wurstnase committed Feb 28, 2017
1 parent 51075ca commit 8a4cd52
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dda.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,15 @@ void dda_clock() {
}
ATOMIC_END
}
else {
ATOMIC_START
if (current_id == dda->id)
// This happens only when !recalc_speed, meaning we are cruising, not
// accelerating or decelerating. So it pegs our dda->c at c_min if it
// never made it as far as c_min.
dda->c = dda->c_min;
ATOMIC_END
}
#endif
}

Expand Down

0 comments on commit 8a4cd52

Please sign in to comment.