Changeset 8200 for code/branches/portals/src/modules/objects
- Timestamp:
- Apr 7, 2011, 12:55:24 PM (14 years ago)
- Location:
- code/branches/portals/src/modules/objects/triggers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/portals/src/modules/objects/triggers/MultiTrigger.cc
r7601 r8200 116 116 } 117 117 118 // Check if the object is active (this is NOT MultiTrigger::isActive()!) 118 // Check if the object is active (this is NOT MultiTrigger::isActive()!), it is whether the MultiTrigger actually does anything, ever. 119 119 if (!this->BaseObject::isActive()) 120 120 return; … … 205 205 { 206 206 // If the MultiTrigger has not exceeded its remaining activations. 207 if(this-> remainingActivations_ > 0)207 if(this->hasRemainingActivations()) 208 208 { 209 209 this->active_.insert(state->originator); … … 218 218 { 219 219 // If the MultiTrigger doesn't stay active or hasn't' exceeded its remaining activations. 220 if(!this->getStayActive() || this-> remainingActivations_ > 0)220 if(!this->getStayActive() || this->hasRemainingActivations()) 221 221 this->active_.erase(state->originator); 222 222 else -
code/branches/portals/src/modules/objects/triggers/TriggerBase.h
r7652 r8200 186 186 { if(activations >= 0 || activations == INF_s) this->remainingActivations_ = activations; } 187 187 188 inline bool hasRemainingActivations(void) 189 { return this->remainingActivations_ == INF_s || this->remainingActivations_ > 0; } 190 188 191 /** 189 192 @brief Adds the parent of a MultiTrigger.
Note: See TracChangeset
for help on using the changeset viewer.