Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7950 in orxonox.OLD for branches/cr


Ignore:
Timestamp:
May 29, 2006, 1:55:30 AM (19 years ago)
Author:
patrick
Message:

cr: found and removed bug - finaly go to sleep

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cr/src/lib/collision_reaction/cr_engine.cc

    r7949 r7950  
    5656  this->reset();
    5757
    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
    6065  this->cachedCollisions.clear();
    6166}
     
    6772{
    6873  // create a list of Collision events (precaching)
    69   Collision* collisions = new Collision[CR_MAX_COLLISIONS];
    7074  for( int i = 0; i < CR_MAX_COLLISIONS; i++)
    71     this->cachedCollisions.push_back(&collisions[i]);
     75    this->cachedCollisions.push_back(new Collision());
    7276}
    7377
Note: See TracChangeset for help on using the changeset viewer.