Fixed glow when switch is used

This commit is contained in:
Deve 2018-09-11 22:02:06 +02:00
parent 29a7be5531
commit 3ebc68ff10
2 changed files with 5 additions and 4 deletions

View File

@ -255,9 +255,10 @@ void Item::switchTo(ItemType type, scene::IMesh *mesh, scene::IMesh *lowmesh)
*/ */
void Item::switchBack() void Item::switchBack()
{ {
if (ItemState::switchBack()) return;
setMesh(m_original_mesh, m_original_lowmesh); setMesh(m_original_mesh, m_original_lowmesh);
if (ItemState::switchBack())
return;
Vec3 hpr; Vec3 hpr;
hpr.setHPR(m_original_rotation); hpr.setHPR(m_original_rotation);

View File

@ -130,7 +130,7 @@ protected:
friend class ItemManager; friend class ItemManager;
friend class NetworkItemManager; friend class NetworkItemManager;
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
void setType(ItemType type) { m_type = type; } virtual void setType(ItemType type) { m_type = type; }
public: public:
/** Constructor. /** Constructor.
@ -319,7 +319,7 @@ private:
/** True if this item is predicted to exists. Used in networking only. */ /** True if this item is predicted to exists. Used in networking only. */
bool m_is_predicted; bool m_is_predicted;
void setType(ItemType type); void setType(ItemType type) OVERRIDE;
void initItem(ItemType type, const Vec3 &xyz); void initItem(ItemType type, const Vec3 &xyz);
void setMesh(scene::IMesh* mesh, scene::IMesh* lowres_mesh); void setMesh(scene::IMesh* mesh, scene::IMesh* lowres_mesh);