Fix: NewGRF vehicles display loading sprites when not actually loading or unloading (#13554)
This commit is contained in:
@@ -197,7 +197,7 @@ bool Order::Equals(const Order &other) const
|
||||
uint16_t Order::MapOldOrder() const
|
||||
{
|
||||
uint16_t order = this->GetType();
|
||||
switch (this->type) {
|
||||
switch (this->GetType()) {
|
||||
case OT_GOTO_STATION:
|
||||
if (this->GetUnloadType() & OUFB_UNLOAD) SetBit(order, 5);
|
||||
if (this->GetLoadType() & OLFB_FULL_LOAD) SetBit(order, 6);
|
||||
@@ -211,6 +211,12 @@ uint16_t Order::MapOldOrder() const
|
||||
break;
|
||||
case OT_LOADING:
|
||||
if (this->GetLoadType() & OLFB_FULL_LOAD) SetBit(order, 6);
|
||||
/* If both "no load" and "no unload" are set, return nothing order instead */
|
||||
if ((this->GetLoadType() & OLFB_NO_LOAD) && (this->GetUnloadType() & OUFB_NO_UNLOAD)) {
|
||||
order = OT_NOTHING;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return order;
|
||||
|
||||
Reference in New Issue
Block a user