mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +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:
parent
86c9cb9b8a
commit
8e8d484558
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user