Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7948 in orxonox.OLD for branches/cr


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

cr: cr cleanup

Location:
branches/cr/src
Files:
2 edited

Legend:

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

    r7947 r7948  
    5050{
    5151  CREngine::singletonRef = NULL;
     52
     53  if( this->cachedCollisions.size() != CR_MAX_COLLISIONS)
     54    PRINTF(0)("CollisionReaction Error: cache size missmatch: %i of %i\n", this->cachedCollisions.size(), CR_NUMBER);
     55
     56  this->reset();
     57
     58  while( !this->cachedCollisions.empty())
     59    delete this->cachedCollisions.front();
     60  this->cachedCollisions.clear();
    5261}
    5362
     
    7079{
    7180  // first clear all CollisionHandles
    72   std::vector<CollisionHandle*>::iterator it;
    73   for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++)
     81
     82  while( !this->collisionHandles.empty())
    7483  {
    75     (*it)->reset();
    76     delete *it;
     84    this->collisionHandles.front()->reset();
     85    delete this->collisionHandles.front();
    7786  }
    7887  this->collisionHandles.clear();
  • branches/cr/src/story_entities/game_world.cc

    r7947 r7948  
    136136  AnimationPlayer::getInstance();
    137137  PhysicsEngine::getInstance();
    138 
     138  CREngine::getInstance();
    139139}
    140140
     
    199199  delete AnimationPlayer::getInstance();
    200200  delete PhysicsEngine::getInstance();
     201  delete CREngine::getInstance();
    201202
    202203  State::setCurrentStoryEntity(NULL);
Note: See TracChangeset for help on using the changeset viewer.