mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-18 18:55:29 +02:00
Clamp hotbar selection to slots that exist (#14869)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user