diff options
author | tron <tron@openttd.org> | 2004-12-09 18:18:21 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-09 18:18:21 +0000 |
commit | 567ad3b5db9a8372850d1e4b7ae77de932ef4c17 (patch) | |
tree | 61737620ce9f1ffcb58760a5a831d53da23627b6 /oldloader.c | |
parent | b1597422f534541a247e0fd6bbbc8b054e98d8a1 (diff) | |
download | openttd-567ad3b5db9a8372850d1e4b7ae77de932ef4c17.tar.xz |
(svn r990) Fix a display bug in the order list:
TTD stores invalid orders different than OTTD, this resulted in empty lines in the order list. With the overhaul of the order system this got worse: no line was shown at all.
Fix this by sanity checking while loading and convert the orders accordingly.
Diffstat (limited to 'oldloader.c')
-rw-r--r-- | oldloader.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/oldloader.c b/oldloader.c index 32e8e0abe..522d3ec70 100644 --- a/oldloader.c +++ b/oldloader.c @@ -1400,7 +1400,8 @@ bool LoadOldSaveGame(const char *file) } } - memcpy(_order_array, m->order_list, sizeof(m->order_list)); + for (i = 0; i < lengthof(m->order_list); ++i) + _order_array[i] = UnpackOldOrder(m->order_list[i]); _ptr_to_next_order = _order_array + REMAP_ORDER_IDX(m->ptr_to_next_order); FixTown(_towns, m->town_list, lengthof(m->town_list), m->town_name_type); |