Changeset 7829 for code/branches/tutoriallevel/src
- Timestamp:
- Jan 13, 2011, 11:43:20 PM (14 years ago)
- Location:
- code/branches/tutoriallevel/src/modules/objects/triggers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel/src/modules/objects/triggers/MultiTrigger.cc
r7601 r7829 198 198 if(bActive ^ this->isActive(state->originator)) 199 199 { 200 201 200 bool bFire = true; 202 201 … … 205 204 { 206 205 // If the MultiTrigger has not exceeded its remaining activations. 207 if(this-> remainingActivations_ > 0)206 if(this->hasRemainingActivations()) 208 207 { 209 208 this->active_.insert(state->originator); … … 218 217 { 219 218 // If the MultiTrigger doesn't stay active or hasn't' exceeded its remaining activations. 220 if(!this->getStayActive() || this-> remainingActivations_ > 0)219 if(!this->getStayActive() || this->hasRemainingActivations()) 221 220 this->active_.erase(state->originator); 222 221 else -
code/branches/tutoriallevel/src/modules/objects/triggers/TriggerBase.h
r7652 r7829 133 133 inline int getActivations(void) const 134 134 { return this->remainingActivations_; } 135 /** 136 @brief Check whether the trigger has still at least one remaining activation. 137 @return Returns true if the trigger has remaining activations (i.e. the number of remaining activations is not zero). 138 */ 139 inline bool hasRemainingActivations(void) const 140 { return this->remainingActivations_ > 0 || this->remainingActivations_ == INF_s; } 135 141 136 142 /**
Note: See TracChangeset
for help on using the changeset viewer.