1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Clamp hotbar selection to slots that exist (#14869)

This commit is contained in:
1F616EMO~nya 2024-08-12 21:35:13 +08:00 committed by GitHub
parent 39c2af9710
commit 98e51a0159
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 51 additions and 11 deletions

View file

@ -1842,7 +1842,7 @@ int ObjectRef::l_hud_get_hotbar_itemcount(lua_State *L)
if (player == nullptr)
return 0;
lua_pushinteger(L, player->getHotbarItemcount());
lua_pushinteger(L, player->getMaxHotbarItemcount());
return 1;
}