Bubblegum may be used up only if switch was not used
This commit is contained in:
parent
3ebc68ff10
commit
31d425795c
@ -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);
|
||||
|
||||
|
@ -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; }
|
||||
// ------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user