Changeset 6807 for code/trunk/src/modules/objects/triggers
- Timestamp:
- Apr 29, 2010, 3:40:02 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.cc
r6800 r6807 85 85 } 86 86 87 for(std::set<WorldEntity*>::iterator it = this->range_.begin(); it != this->range_.end(); it++)87 for(std::set<WorldEntity*>::iterator it = this->range_.begin(); it != this->range_.end(); ) 88 88 { 89 89 Vector3 distanceVec = (*it)->getWorldPosition() - this->getWorldPosition(); 90 90 if (distanceVec.length() >= this->distance_) 91 91 { 92 if(!this->removeFromRange(*it)) 92 WorldEntity* temp = *(it++); 93 if(!this->removeFromRange(temp)) 93 94 continue; 94 95 … … 99 100 MultiTriggerState* state = new MultiTriggerState; 100 101 state->bTriggered = false; 101 state->originator = *it;102 state->originator = temp; 102 103 queue->push(state); 103 104 } 105 else 106 ++it; 104 107 } 105 108
Note: See TracChangeset
for help on using the changeset viewer.