diff options
-rw-r--r-- | src/roadveh_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index b07a81887..3edb3ca9d 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1330,8 +1330,9 @@ static void RoadVehController(Vehicle *v) GetNewVehiclePos(v, &gp); - if (RoadVehFindCloseTo(v, gp.x, gp.y, v->direction) != NULL) { - v->cur_speed = 0; + const Vehicle *u = RoadVehFindCloseTo(v, gp.x, gp.y, v->direction); + if (u != NULL && u->cur_speed < v->cur_speed) { + v->cur_speed = u->cur_speed; return; } |