Allow changing inventory_items_animations from the main menu
If you try and change the setting from in-game you'll have to log out and back in for it to update.master
parent
8053b775e4
commit
e7c44f2796
|
@ -135,6 +135,7 @@ Client::Client(
|
|||
m_cache_save_interval = g_settings->getU16("server_map_save_interval");
|
||||
m_round_screen = g_settings->getU16("round_screen");
|
||||
m_hud_scaling = g_settings->getFloat("hud_scaling");
|
||||
m_inv_item_anim_enabled = g_settings->getBool("inventory_items_animations");
|
||||
}
|
||||
|
||||
void Client::loadMods()
|
||||
|
|
|
@ -430,6 +430,7 @@ public:
|
|||
|
||||
const u16 getRoundScreen() { return m_round_screen; }
|
||||
const f32 getHudScaling() { return m_hud_scaling; }
|
||||
const bool getInvItemAnimEnabled() { return m_inv_item_anim_enabled; }
|
||||
private:
|
||||
void loadMods();
|
||||
|
||||
|
@ -593,4 +594,5 @@ private:
|
|||
|
||||
u16 m_round_screen;
|
||||
f32 m_hud_scaling;
|
||||
bool m_inv_item_anim_enabled;
|
||||
};
|
||||
|
|
|
@ -948,8 +948,7 @@ void drawItemStack(
|
|||
return;
|
||||
}
|
||||
|
||||
const static thread_local bool enable_animations =
|
||||
g_settings->getBool("inventory_items_animations");
|
||||
const bool enable_animations = client->getInvItemAnimEnabled();
|
||||
|
||||
const ItemDefinition &def = item.getDefinition(client->idef());
|
||||
|
||||
|
|
Loading…
Reference in New Issue