Changeset 7950 in orxonox.OLD for branches/cr/src
- Timestamp:
- May 29, 2006, 1:55:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/cr_engine.cc
r7949 r7950 56 56 this->reset(); 57 57 58 while( !this->cachedCollisions.empty()) 59 delete this->cachedCollisions.back(); 58 vector<Collision*>::iterator it = this->cachedCollisions.begin(); 59 for(; it < this->cachedCollisions.end(); it++) 60 delete *it; 61 62 // while( !this->cachedCollisions.empty()) 63 // delete this->cachedCollisions.back(); 64 60 65 this->cachedCollisions.clear(); 61 66 } … … 67 72 { 68 73 // create a list of Collision events (precaching) 69 Collision* collisions = new Collision[CR_MAX_COLLISIONS];70 74 for( int i = 0; i < CR_MAX_COLLISIONS; i++) 71 this->cachedCollisions.push_back( &collisions[i]);75 this->cachedCollisions.push_back(new Collision()); 72 76 } 73 77
Note: See TracChangeset
for help on using the changeset viewer.