mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r26129) -Fix: remove dead code; it could be made to do what it did, but then it would be inconsistent with moving vehicles around
This commit is contained in:
parent
b1bcd1adab
commit
7abe85d727
|
@ -1336,9 +1336,6 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||||
*/
|
*/
|
||||||
CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, uint16 data, uint32 user)
|
CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, uint16 data, uint32 user)
|
||||||
{
|
{
|
||||||
/* Check if we deleted a vehicle window */
|
|
||||||
Window *w = NULL;
|
|
||||||
|
|
||||||
/* Sell a chain of vehicles or not? */
|
/* Sell a chain of vehicles or not? */
|
||||||
bool sell_chain = HasBit(data, 0);
|
bool sell_chain = HasBit(data, 0);
|
||||||
|
|
||||||
|
@ -1389,9 +1386,6 @@ CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, uint16 data, uint3
|
||||||
/* Copy other important data from the front engine */
|
/* Copy other important data from the front engine */
|
||||||
new_head->CopyVehicleConfigAndStatistics(first);
|
new_head->CopyVehicleConfigAndStatistics(first);
|
||||||
GroupStatistics::CountVehicle(new_head, 1); // after copying over the profit
|
GroupStatistics::CountVehicle(new_head, 1); // after copying over the profit
|
||||||
|
|
||||||
/* If we deleted a window then open a new one for the 'new' train */
|
|
||||||
if (IsLocalCompany() && w != NULL) ShowVehicleViewWindow(new_head);
|
|
||||||
} else if (v->IsPrimaryVehicle() && data & (MAKE_ORDER_BACKUP_FLAG >> 20)) {
|
} else if (v->IsPrimaryVehicle() && data & (MAKE_ORDER_BACKUP_FLAG >> 20)) {
|
||||||
OrderBackup::Backup(v, user);
|
OrderBackup::Backup(v, user);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue