fix last commit

This commit is contained in:
UnknownShadow200 2017-03-01 19:07:53 +11:00
parent f48e15561b
commit 0748f54f87

View File

@ -145,7 +145,8 @@ namespace ClassicalSharp {
void ScrollHotbar(float deltaPrecise) {
Inventory inv = game.Inventory;
if (AltDown) {
inv.Offset = ScrolledIndex(deltaPrecise, inv.Offset) * Inventory.BlocksPerRow;
int index = inv.Offset / Inventory.BlocksPerRow;
inv.Offset = ScrolledIndex(deltaPrecise, index) * Inventory.BlocksPerRow;
} else {
inv.SelectedIndex = ScrolledIndex(deltaPrecise, inv.SelectedIndex);
}