Mercurial > hg > openttd
changeset 20004:d2753003863f draft
(svn r24936) -Fix [FS#5446]: Don't allow order refit to be set for no-load orders.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Wed, 23 Jan 2013 18:33:28 +0000 |
parents | 242c3627aa29 |
children | c239662a60a1 |
files | src/order_cmd.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1613,6 +1613,8 @@ /* 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);