NormalizeTrainVehInDepot() should only be called if an engine was built, not for wagons.
This commit is contained in:
@@ -689,6 +689,7 @@ static CommandCost CmdBuildRailWagon(DoCommandFlag flags, TileIndex tile, const
|
||||
/** Move all free vehicles in the depot to the train */
|
||||
void NormalizeTrainVehInDepot(const Train *u)
|
||||
{
|
||||
assert(u->IsEngine());
|
||||
for (const Train *v : Train::Iterate()) {
|
||||
if (v->IsFreeWagon() && v->tile == u->tile &&
|
||||
v->track == TRACK_BIT_DEPOT) {
|
||||
|
Reference in New Issue
Block a user