CleverRaven/Cataclysm-DDA — pull request #9391 by BevapDin (2014-10-03 12:58:47+00:00)
Title: Fix vehicle immediately stopping upon broken engine

Fixes #6188

The previous code would just clip the velocity of the vehicle (after acceleration) to the maximal velocity of the vehicle. If the engine is destroyed, the maximal velocity is 0 and the code clips the current velocity directly to 0.

It's changed like this:
- if the velocity after acceleration is still in lower than the maximal velocity: simply accelerate (like before).
- if the velocity is currently lower than the maximum, but would be larger then the maximum after acceleration: clip it to the maximal velocity. This ensures that no acceleration brings the vehicle *above* the maximum.
- if the velocity is currently above the maximum: don't accelerate at all. This is the case when the engine has been destroyed and the maximum is now 0. The vehicle will continue to move, but will slow down through the code in `map::vehproceed`.

This will do until someone implements better vehicle movement / acceleration / etc.