Bubblegum may be used up only if switch was not used

This commit is contained in:
Deve 2018-09-11 22:29:55 +02:00
parent 3ebc68ff10
commit 31d425795c
2 changed files with 5 additions and 1 deletions

View File

@ -343,7 +343,8 @@ void Item::updateGraphics(float dt)
float time_till_return = stk_config->ticks2Time(getTicksTillReturn());
bool is_visible = isAvailable() || time_till_return <= 1.0f ||
(getType() == ITEM_BUBBLEGUM && !isUsedUp() );
(getType() == ITEM_BUBBLEGUM &&
getOriginalType() == ITEM_NONE && !isUsedUp());
m_node->setVisible(is_visible);

View File

@ -235,6 +235,9 @@ public:
/** Returns the type of this item. */
ItemType getType() const { return m_type; }
// ------------------------------------------------------------------------
/** Returns the original type of this item. */
ItemType getOriginalType() const { return m_original_type; }
// ------------------------------------------------------------------------
/** Sets the index of this item in the item manager list. */
void setItemId(unsigned int n) { m_item_id = n; }
// ------------------------------------------------------------------------