Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 15, 2005, 1:34:32 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: packing the first entities into their lists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/objectmanager/src/world_entities/world_entity.cc

    r6089 r6121  
    5757  this->objectListIterator = NULL;
    5858
    59   ObjectManager::getInstance()->toList(this, OM_NULL);
     59  this->toList(OM_NULL);
    6060}
    6161
     
    7373    this->setModel(NULL, i);
    7474
    75   ObjectManager::getInstance()->toList(this, OM_INIT);
     75  State::getObjectManager()->toList(this, OM_INIT);
    7676}
    7777
     
    106106    if (strchr(fileName, '#') != NULL)
    107107      {
    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;
     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;
    120120      }
    121121
     
    181181  }
    182182}
     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 */
     191void WorldEntity::toList(OM_LIST list)
     192{
     193  State::getObjectManager()->toList(this, list);
     194}
     195
    183196
    184197
Note: See TracChangeset for help on using the changeset viewer.