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

Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAM

This commit is contained in:
Kahrl 2013-05-04 02:08:52 +02:00
parent 730d316efe
commit 96fe1de832
12 changed files with 89 additions and 4 deletions

View file

@ -1987,7 +1987,7 @@ void the_game(
{
s32 wheel = input->getMouseWheel();
u16 max_item = MYMIN(PLAYER_INVENTORY_SIZE-1,
hud.hotbar_itemcount-1);
player->hud_hotbar_itemcount-1);
if(wheel < 0)
{
@ -2011,7 +2011,7 @@ void the_game(
const KeyPress *kp = NumberKey + (i + 1) % 10;
if(input->wasKeyDown(*kp))
{
if(i < PLAYER_INVENTORY_SIZE && i < hud.hotbar_itemcount)
if(i < PLAYER_INVENTORY_SIZE && i < player->hud_hotbar_itemcount)
{
new_playeritem = i;