Changeset 7999 in orxonox.OLD for branches/cr
- Timestamp:
- May 30, 2006, 11:38:37 PM (18 years ago)
- Location:
- branches/cr/src/lib/collision_reaction
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/collision_handle.cc
r7996 r7999 60 60 void CollisionHandle::addTarget(long target) 61 61 { 62 PRINTF(0)("addTarget: %i \n", target);63 62 // make sure there is no dublicate 64 // for(int i = 0; i < this->targetList.size(); ++i) 65 // printf("id: %i\n", this->targetList[i]); 66 67 // std::vector<long>::iterator it = this->targetList.begin(); 68 // for( ; it < this->targetList.end(); it++) 69 // printf("id: %i\n", *it); 70 // if( (*it) == classID) 71 // return; 72 63 std::vector<long>::iterator it = this->targetList.begin(); 64 for( ; it < this->targetList.end(); it++) 65 if( (*it) == target) 66 return; 73 67 74 68 // add element 75 this->targetList.push_back(10); 69 PRINTF(0)("addTarget: %i \n", target); 70 this->targetList.push_back(target); 76 71 } 77 72 -
branches/cr/src/lib/collision_reaction/cr_engine.cc
r7996 r7999 111 111 CollisionHandle* ch = new CollisionHandle(owner, type); 112 112 this->collisionHandles.push_back(ch); 113 114 return ch; 113 115 } 114 116 … … 157 159 void CREngine::flushCollisions() 158 160 { 159 vector<Collision*>::iterator it = this->collisionsUsed.begin(); 160 for(; it < this->collisionsUsed.end(); it++) 161 this->collisionsUnused.push_back(*it); 161 vector<Collision*>::iterator it1 = this->collisionsUsed.begin(); 162 for(; it1 < this->collisionsUsed.end(); it1++) 163 this->collisionsUnused.push_back(*it1); 164 165 vector<CollisionEvent*>::iterator it2 = this->collisionEventsUsed.begin(); 166 for(; it2 < this->collisionEventsUsed.end(); it2++) 167 this->collisionEventsUnused.push_back(*it2); 162 168 163 169 this->collisionsUsed.clear();
Note: See TracChangeset
for help on using the changeset viewer.