Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5211 in orxonox.OLD for trunk/src/story_entities


Ignore:
Timestamp:
Sep 21, 2005, 2:21:41 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: valgrind mem-leak-recovered

Location:
trunk/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/campaign.cc

    r5115 r5211  
    161161    }
    162162    delete this->entities;
     163    delete it;
    163164}
    164165
  • trunk/src/story_entities/world.cc

    r5209 r5211  
    165165  this->setName(name);
    166166  this->debugWorldNr = worldID;
    167 
     167  this->gameTime = 0.0f;
    168168  this->setSpeed(1.0);
    169169  this->music = NULL;
     170  this->shell = NULL;
     171  this->entities = NULL;
    170172}
    171173
     
    259261  // load the parameters
    260262  // name
    261   char* temp;
    262263  const char* string = grabParameter( root, "name");
    263264  if( string == NULL)
    264265    {
    265266      PRINTF(2)("World is missing a proper 'name'\n");
    266       string = "Unknown";
    267       temp = new char[strlen(string)+1];
    268       strcpy( temp, string);
    269       this->setName(temp);
     267      this->setName("Unknown");
    270268    }
    271269  else
    272270    {
    273       temp = new char[strlen(string )+1];
    274       strcpy( temp, string);
    275       this->setName(temp);
     271      this->setName(string);
    276272    }
    277273
     
    478474  ClassList::debug();
    479475
    480   this->music = (OggPlayer*)ResourceManager::getInstance()->load("sound/00-luke_grey_-_hypermode.ogg", OGG, RP_LEVEL);
    481   music->playback();
     476  this->music = NULL;//(OggPlayer*)ResourceManager::getInstance()->load("sound/00-luke_grey_-_hypermode.ogg", OGG, RP_LEVEL);
     477  //music->playback();
    482478}
    483479
Note: See TracChangeset for help on using the changeset viewer.