Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6121 in orxonox.OLD for branches/objectmanager/src/world_entities


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

orxonox/trunk: packing the first entities into their lists

Location:
branches/objectmanager/src/world_entities
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/objectmanager/src/world_entities/npcs/npc.cc

    r6054 r6121  
    3333{
    3434  this->setClassID(CL_NPC, "NPC");
    35 
     35  this->toList(OM_GROUP_00);
    3636}
    3737
  • branches/objectmanager/src/world_entities/playable.cc

    r5915 r6121  
    4646  PRINTF(4)("PLAYABLE INIT\n");
    4747
     48  this->toList(OM_GROUP_01);
    4849  this->weaponMan = new WeaponManager(this);
    4950
  • branches/objectmanager/src/world_entities/power_ups/power_up.cc

    r5439 r6121  
    2727{
    2828  this->setClassID(CL_POWER_UP, "PowerUp");
     29  this->toList(OM_COMMON);
    2930
    3031}
  • branches/objectmanager/src/world_entities/skybox.cc

    r6022 r6121  
    6565{
    6666  this->setClassID(CL_SKYBOX, "SkyBox");
    67 
     67  this->toList(OM_ENVIRON_NOTICK);
    6868  this->size = 100.0;
    6969
  • 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
  • branches/objectmanager/src/world_entities/world_entity.h

    r6089 r6121  
    6666  //  CharacterAttributes* getCharacterAttributes();
    6767
     68  void toList(OM_LIST list);
     69
    6870  /** @returns a Reference to the objectListNumber to set. */
    6971  OM_LIST& getOMListNumber() { return this->objectListNumber; }
Note: See TracChangeset for help on using the changeset viewer.