Mercurial > hg > openttd
changeset 7924:f8ba9a6fac13 draft
(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.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Mon, 19 Nov 2007 18:58:32 +0000 |
parents | 504d4b2ecc6c |
children | 6a2f7c2c4ac6 |
files | src/roadveh_cmd.cpp |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1624,7 +1624,13 @@ 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)) {