Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
inv: fix regression in Inv_Display
Browse files Browse the repository at this point in the history
Resolves #72 and #69
  • Loading branch information
rr- committed Apr 27, 2024
1 parent 0a865c2 commit d5a3112
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions src/game/inventory.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,24 +614,19 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
break;

case RNG_CLOSING_ITEM: {
int32_t frame = 0;
INVENTORY_ITEM *inv_item = ring.list[ring.current_object];
if (g_Inv_NFrames > 0) {
while (Inv_AnimateInventoryItem(inv_item)) {
frame++;
if (frame >= g_Inv_NFrames) {
break;
for (int32_t frame = 0; frame < g_Inv_NFrames; frame++) {
if (!Inv_AnimateInventoryItem(inv_item)) {
if (inv_item->obj_num == O_PASSPORT_OPTION) {
inv_item->obj_num = O_PASSPORT_CLOSED;
inv_item->current_frame = 0;
}
}

if (inv_item->obj_num == O_PASSPORT_OPTION) {
inv_item->obj_num = O_PASSPORT_CLOSED;
inv_item->current_frame = 0;
imo.count = 16;
imo.status = imo.status_target;
Inv_Ring_MotionItemDeselect(&ring, inv_item);
break;
}

imo.count = 16;
imo.status = imo.status_target;
Inv_Ring_MotionItemDeselect(&ring, inv_item);
}
break;
}
Expand Down

0 comments on commit d5a3112

Please sign in to comment.