(svn r16894) -Codechange: Add [Specialised]Vehicle::Last().

This commit is contained in:
frosch
2009-07-20 19:58:33 +00:00
parent a591dc6c8c
commit fec6129cd1
7 changed files with 42 additions and 24 deletions

View File

@@ -35,7 +35,7 @@ void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2)
/* if we found a loco, */
if (found != NULL) {
found = GetLastVehicleInChain(found);
found = found->Last();
/* put the new wagon at the end of the loco. */
DoCommandP(0, _new_vehicle_id | (found->index << 16), 0, CMD_MOVE_RAIL_VEHICLE);
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);