(svn r20498) -Fix [FS#4030]: ignore the non-stop state when comparing one order type to another order type

This commit is contained in:
rubidium 2010-08-15 13:17:04 +00:00
parent e1d35cba6d
commit 15514baf8b

View File

@ -115,7 +115,7 @@ bool Order::Equals(const Order &other) const
* destination because those get clear/filled in during the order
* evaluation. If we do not do this the order will continuously be seen as
* a different order and it will try to find a "nearest depot" every tick. */
if ((this->type == OT_GOTO_DEPOT && this->type == other.type) &&
if ((this->IsType(OT_GOTO_DEPOT) && this->type == other.type) &&
((this->GetDepotActionType() & ODATFB_NEAREST_DEPOT) != 0 ||
(other.GetDepotActionType() & ODATFB_NEAREST_DEPOT) != 0)) {
return