Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Feb 11, 2006, 8:57:26 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: some cleanup before the new tag

  1. BaseObject isA was wrong… every subclass was detected as any other subclass
  2. Classes get unloaded again as they should
  3. some minor fixes (Material* → Material) and some other cleanups
Location:
trunk/src/world_entities
Files:
2 edited

Legend:

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

    r6863 r7123  
    2727#include "network_game_manager.h"
    2828#include "converter.h"
     29#include "resource_manager.h"
     30
    2931
    3032using namespace std;
     
    107109    if( this->material[i])
    108110      delete this->material[i];
    109 //     if( this->cubeTexture[i])
    110 //       delete this->cubeTexture[i];
     111    if( this->cubeTexture[i])
     112      ResourceManager::getInstance()->unload(this->cubeTexture[i]);
    111113  }
    112114}
     
    169171    this->loadCubeMapTextures(top, bottom, left, right, front, back);
    170172}
    171 
    172 
    173 #include "resource_manager.h"
    174173
    175174void SkyBox::loadCubeMapTextures(const char* top, const char* bottom, const char* left,
  • trunk/src/world_entities/world_entity.cc

    r7085 r7123  
    190190  {
    191191    Resource* resource = ResourceManager::getInstance()->locateResourceByPointer(this->models[modelNumber]);
    192     //     if (resource != NULL)
    193     ResourceManager::getInstance()->unload(resource, RP_LEVEL);
    194   }
    195   else
    196     delete this->models[modelNumber];
     192    if (resource != NULL)
     193      ResourceManager::getInstance()->unload(resource, RP_LEVEL);
     194    else
     195    {
     196      PRINTF(4)("Forcing model deletion\n");
     197      delete this->models[modelNumber];
     198    }
     199  }
    197200
    198201  this->models[modelNumber] = model;
Note: See TracChangeset for help on using the changeset viewer.