mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add a little animation when changing the wielded item
This commit is contained in:
parent
bc66f46323
commit
3e2efdf18a
3 changed files with 58 additions and 13 deletions
|
@ -117,7 +117,7 @@ public:
|
|||
void setDigging(s32 button);
|
||||
|
||||
// Replace the wielded item mesh
|
||||
void wield(const ItemStack &item);
|
||||
void wield(const ItemStack &item, u16 playeritem);
|
||||
|
||||
// Draw the wielded tool.
|
||||
// This has to happen *after* the main scene is drawn.
|
||||
|
@ -178,6 +178,12 @@ private:
|
|||
|
||||
//dummymesh for camera
|
||||
irr::scene::IAnimatedMesh* m_dummymesh;
|
||||
|
||||
// Animation when changing wielded item
|
||||
f32 m_wield_change_timer;
|
||||
scene::IMesh *m_wield_mesh_next;
|
||||
u16 m_previous_playeritem;
|
||||
std::string m_previous_itemname;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue