(svn r11332) -Fix: vehicles getting a value of 0 on construction.

-Fix: assertion when selling vehicles.
This commit is contained in:
rubidium
2007-10-21 16:45:00 +00:00
parent 9a0d2de5cf
commit b4e7203b0a
4 changed files with 10 additions and 6 deletions

View File

@@ -540,6 +540,7 @@ static CommandCost CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 fla
}
}
v = new (v) Train();
v->engine_type = engine;
DiagDirection dir = GetRailDepotDirection(tile);
@@ -557,7 +558,6 @@ static CommandCost CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 fla
v->u.rail.track = TRACK_BIT_DEPOT;
v->vehstatus = VS_HIDDEN | VS_DEFPAL;
v = new (v) Train();
v->subtype = 0;
SetTrainWagon(v);