mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Clamp hotbar selection to slots that exist (#14869)
This commit is contained in:
parent
39c2af9710
commit
98e51a0159
8 changed files with 51 additions and 11 deletions
|
@ -223,7 +223,7 @@ public:
|
|||
// Returns non-empty `selected` ItemStack. `hand` is a fallback, if specified
|
||||
ItemStack &getWieldedItem(ItemStack *selected, ItemStack *hand) const;
|
||||
void setWieldIndex(u16 index);
|
||||
u16 getWieldIndex() const { return m_wield_index; }
|
||||
u16 getWieldIndex();
|
||||
|
||||
bool setFov(const PlayerFovSpec &spec)
|
||||
{
|
||||
|
@ -247,6 +247,9 @@ public:
|
|||
u32 hud_flags;
|
||||
s32 hud_hotbar_itemcount;
|
||||
|
||||
// Get actual usable number of hotbar items (clamped to size of "main" list)
|
||||
u16 getMaxHotbarItemcount();
|
||||
|
||||
protected:
|
||||
char m_name[PLAYERNAME_SIZE];
|
||||
v3f m_speed; // velocity; in BS-space
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue