Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5308 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Oct 8, 2005, 12:32:52 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Fixed a reversive BUG in the ResourceManager:
Since resources, that depend on each other are loaded left tgo right they must be unlinked right to left… this cost me 3 hours.
What a luck i found this :)

Location:
trunk/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/environment.cc

    r5285 r5308  
    3434{
    3535  this->setClassID(CL_ENVIRONMENT, "Environment");
    36   this->model = (Model*)ResourceManager::getInstance()->load("models/ships/bolido.obj", OBJ, RP_CAMPAIGN);
     36  this->loadModel("models/ships/bolido.obj");
    3737
    3838/*  if(this->obbTree == NULL)
  • trunk/src/world_entities/skybox.cc

    r5302 r5308  
    101101  for (int i = 0; i < 6; i++)
    102102    delete this->material[i];
    103   delete []this->material;
     103  delete[] this->material;
    104104  delete this->model;
    105105  this->model = NULL; //< so that WorldEntity does not try to delete it again.
  • trunk/src/world_entities/terrain.cc

    r5143 r5308  
    3939  this->loadParams(root);
    4040
    41   this->ssp = new SpatialSeparation((AbstractModel*)this->model, 10.0f);
     41//  if (this->model != NULL)
     42    //this->ssp = new SpatialSeparation((AbstractModel*)this->model, 10.0f);
    4243}
    4344
     
    5354  this->init();
    5455
    55   if (strstr(fileName, ".obj") || strstr(fileName, ".OBJ"))
    56     {
    57       this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_LEVEL);
     56  if (!strcasestr(fileName, ".obj") )
     57    {
     58      this->loadModel(fileName);
    5859    }
    5960  else
     
    6566/**
    6667 *  a Constructor for the Debug-Worlds
    67 
    68    @todo make it not compileable when not in debug-mode
    69 */
     68 */
    7069Terrain::Terrain(DebugTerrain debugTerrain)
    7170{
     
    9291
    9392  this->objectList = 0;
     93  this->ssp = NULL;
    9494}
    9595
     
    122122
    123123  /* THIS IS ONLY FOR DEBUGGING INFORMATION */
    124   this->ssp->drawQuadtree();
     124  if (this->ssp != NULL)
     125    this->ssp->drawQuadtree();
    125126}
    126127
     
    289290      */
    290291    }
    291 
    292 }
     292}
  • trunk/src/world_entities/terrain.h

    r5039 r5308  
    4242 private:
    4343  int objectList;
    44 
    4544};
    4645
Note: See TracChangeset for help on using the changeset viewer.