-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
client-bugAn issue with the Genfanad client.An issue with the Genfanad client.fix-pending-releaseThis has been confirmed by the team and a fix will be released soon.This has been confirmed by the team and a fix will be released soon.team-confirmedThis has been confirmed by a member of the Genfanad team.This has been confirmed by a member of the Genfanad team.
Description
If you select an item to "Use" in your inventory, then swap items around, the indicator for the pending item to be used is not swapped/updated accordingly.
Knowing this, it's possible to swap the item out of the slot, leaving it empty. This causes the game to freak out because it's trying to render the possible action of using an item from an empty slot.
Game window freezes, this gets spammed in the dev console every frame:
Uncaught TypeError: Cannot read properties of undefined (reading 'item')
at Inventory.selectedName (ui_inventory.js:6:142)
at updateMouseSelectForInventory (items.js:85:272)
at updateContextOptions (mouse.js:34:145)
at animate (client.js:11:371)
Quick fix, add a guard clause to prevent the game window from freezing.
selectedName() {
if (this.selected === undefined)
return;
let item_stack = this.items[this.selected];
if (item_stack === undefined)
return;
return "<span class='item'>" + itemName(item_stack.item) + "</span>";
}
Ideally however, swapping around items in the inventory should clear the selected item, or clear the selection if the slot ever becomes empty.
Metadata
Metadata
Assignees
Labels
client-bugAn issue with the Genfanad client.An issue with the Genfanad client.fix-pending-releaseThis has been confirmed by the team and a fix will be released soon.This has been confirmed by the team and a fix will be released soon.team-confirmedThis has been confirmed by a member of the Genfanad team.This has been confirmed by a member of the Genfanad team.