1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00

(svn r12696) -Fix: loading ancient savegames could result in invalid orders in order lists with all related problems.

This commit is contained in:
rubidium
2008-04-13 19:46:26 +00:00
parent 9a73b698d4
commit 4f0bfa91ab
2 changed files with 35 additions and 34 deletions

View File

@@ -216,9 +216,7 @@ Order UnpackOldOrder(uint16 packed)
* Sanity check
* TTD stores invalid orders as OT_NOTHING with non-zero flags/station
*/
if (!order.IsValid() && (order.GetLoadType() != 0 || order.GetUnloadType() != 0 || order.GetDestination() != 0)) {
order.MakeDummy();
}
if (!order.IsValid() && packed != 0) order.MakeDummy();
return order;
}