1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-28 08:59:09 +00:00

(svn r24936) -Fix [FS#5446]: Don't allow order refit to be set for no-load orders.

This commit is contained in:
2013-01-23 18:33:28 +00:00
parent f9e531d69c
commit eec1a0aa11

View File

@@ -1613,6 +1613,8 @@ CommandCost CmdOrderRefit(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
/* Automatic refit cargo is only supported for goto station orders. */
if (cargo == CT_AUTO_REFIT && !order->IsType(OT_GOTO_STATION)) return CMD_ERROR;
if (order->GetLoadType() & OLFB_NO_LOAD) return CMD_ERROR;
if (flags & DC_EXEC) {
order->SetRefit(cargo, subtype);