mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-30 18:09:09 +00:00
(svn r24987) -Fix: When choosing a train in a depot to attach a newly purchased wagon to, do not consider trains currently moving in and out of the depot.
This commit is contained in:
@@ -33,8 +33,7 @@ void CcBuildWagon(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p
|
||||
const Vehicle *found = NULL;
|
||||
const Train *t;
|
||||
FOR_ALL_TRAINS(t) {
|
||||
if (t->IsFrontEngine() && t->tile == tile &&
|
||||
t->track == TRACK_BIT_DEPOT) {
|
||||
if (t->IsFrontEngine() && t->tile == tile && t->IsStoppedInDepot()) {
|
||||
if (found != NULL) return; // must be exactly one.
|
||||
found = t;
|
||||
}
|
||||
|
Reference in New Issue
Block a user