mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Use player:set_hotbar_image() instead of hardcoded hotbar.png
This commit is contained in:
parent
5b518ed2fe
commit
7860097eda
10 changed files with 98 additions and 10 deletions
|
@ -2175,6 +2175,10 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
|||
s32 hotbar_itemcount = readS32((u8*) value.c_str());
|
||||
if(hotbar_itemcount > 0 && hotbar_itemcount <= HUD_HOTBAR_ITEMCOUNT_MAX)
|
||||
player->hud_hotbar_itemcount = hotbar_itemcount;
|
||||
} else if (param == HUD_PARAM_HOTBAR_IMAGE) {
|
||||
((LocalPlayer *) player)->hotbar_image = value;
|
||||
} else if (param == HUD_PARAM_HOTBAR_SELECTED_IMAGE) {
|
||||
((LocalPlayer *) player)->hotbar_selected_image = value;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue