NUVIE: Fix Ultima 6 item order in containers when saving

Traverse container content list from the start instead of the end
when saving chunks so the items are stored in the correct order.
This commit is contained in:
PushmePullyu 2023-03-11 03:57:57 +01:00 committed by Paul Gilbert
parent 461ca0cbbf
commit 33d1a4f8b0

View File

@ -382,7 +382,7 @@ bool ObjManager::save_obj(NuvieIO *save_buf, Obj *obj, uint16 parent_objblk_n) {
obj_save_count += 1;
if (obj->container) {
for (link = obj->container->end(); link != NULL; link = link->prev)
for (link = obj->container->start(); link != NULL; link = link->next)
save_obj(save_buf, (Obj *)link->data, objblk_n);
}