Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6142 in orxonox.OLD for trunk/src/world_entities/world_entity.cc


Ignore:
Timestamp:
Dec 16, 2005, 7:13:57 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merge the ObjectManager to the trunk
merged with command:
svn merge -r6082:HEAD objectmanager/ ../trunk/

conflicts resolution was easy this time :)
but specially merged the world to network_world

File:
1 edited

Legend:

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

    r6005 r6142  
    5353
    5454  this->setVisibiliy(true);
     55
     56  this->objectListNumber = OM_INIT;
     57  this->objectListIterator = NULL;
     58
     59  this->toList(OM_NULL);
    5560}
    5661
     
    6772  for (unsigned int i = 0; i < this->models.size(); i++)
    6873    this->setModel(NULL, i);
     74
     75  State::getObjectManager()->toList(this, OM_INIT);
    6976}
    7077
     
    95102{
    96103  if (fileName != NULL)
    97   { 
     104  {
    98105    // search for the special character # in the LoadParam
    99106    if (strchr(fileName, '#') != NULL)
    100107      {
    101         PRINTF(4)("Found # in %s... searching for LOD's\n", fileName);
    102         char* lodFile = new char[strlen(fileName)+1];
    103         strcpy(lodFile, fileName);
    104         char* depth = strchr(lodFile, '#');
    105         for (unsigned int i = 0; i < 5; i++)
    106           {
    107             *depth = 48+(int)i;
    108             printf("-------%s\n", lodFile);
    109             if (ResourceManager::isInDataDir(lodFile))
    110               this->loadModel(lodFile, scaling, i);
    111           }
    112         return;
     108        PRINTF(4)("Found # in %s... searching for LOD's\n", fileName);
     109        char* lodFile = new char[strlen(fileName)+1];
     110        strcpy(lodFile, fileName);
     111        char* depth = strchr(lodFile, '#');
     112        for (unsigned int i = 0; i < 5; i++)
     113          {
     114            *depth = 48+(int)i;
     115            printf("-------%s\n", lodFile);
     116            if (ResourceManager::isInDataDir(lodFile))
     117              this->loadModel(lodFile, scaling, i);
     118          }
     119        return;
    113120      }
    114121
     
    174181  }
    175182}
     183
     184/**
     185 * @brief moves this entity to the List OM_List
     186 * @param list the list to set this Entity to.
     187 *
     188 * this is the same as a call to State::getObjectManager()->toList(entity , list);
     189 * directly, but with an easier interface.
     190 *
     191 * @todo inline this (peut etre)
     192 */
     193void WorldEntity::toList(OM_LIST list)
     194{
     195  State::getObjectManager()->toList(this, list);
     196}
     197
    176198
    177199
Note: See TracChangeset for help on using the changeset viewer.