diff options
author | rubidium <rubidium@openttd.org> | 2007-11-19 18:58:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-11-19 18:58:32 +0000 |
commit | a36fd1db6e38fa13a022315fe1ac552234098744 (patch) | |
tree | ff6f01b3a50f819e7e0182d0e4ea36187fa0f964 /src | |
parent | f4a5c80d7193821bdfe9b3669e245b43c6feee3d (diff) | |
download | openttd-a36fd1db6e38fa13a022315fe1ac552234098744.tar.xz |
(svn r11477) -Fix [FS#1451]: a road vehicle must not show that it is driving max speed when it is standing still waiting for the vehicle in from of it.
Diffstat (limited to 'src')
-rw-r--r-- | src/roadveh_cmd.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index ce3ae239a..def45112a 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1624,7 +1624,13 @@ again: y = TileY(tile) * TILE_SIZE + rdp[start_frame].y; newdir = RoadVehGetSlidingDirection(v, x, y); - if (IsRoadVehFront(v) && RoadVehFindCloseTo(v, x, y, newdir) != NULL) return false; + if (IsRoadVehFront(v)) { + Vehicle *u = RoadVehFindCloseTo(v, x, y, newdir); + if (u != NULL) { + v->cur_speed = u->First()->cur_speed; + return false; + } + } r = VehicleEnterTile(v, tile, x, y); if (HASBIT(r, VETS_CANNOT_ENTER)) { |