mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 04:43:12 +00:00
(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.
This commit is contained in:
parent
50bfe1a19d
commit
a4df4728fc
@ -1624,7 +1624,13 @@ again:
|
|||||||
y = TileY(tile) * TILE_SIZE + rdp[start_frame].y;
|
y = TileY(tile) * TILE_SIZE + rdp[start_frame].y;
|
||||||
|
|
||||||
newdir = RoadVehGetSlidingDirection(v, x, 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);
|
r = VehicleEnterTile(v, tile, x, y);
|
||||||
if (HASBIT(r, VETS_CANNOT_ENTER)) {
|
if (HASBIT(r, VETS_CANNOT_ENTER)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user