Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2006, 10:51:08 PM (18 years ago)
Author:
bensch
Message:

orxonox/branches/new_class_id: new_class ID working, adapdet many classes, and reinvented some of the ClassID stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/story_entities/multi_player_world_data.cc

    r9494 r9709  
    2020#include "util/loading/resource_manager.h"
    2121#include "state.h"
    22 #include "class_list.h"
    2322#include "substring.h"
    2423
     
    4039
    4140#include "util/loading/factory.h"
    42 #include "fast_factory.h"
     41#include "loading/fast_factory.h"
    4342#include "util/loading/load_param.h"
    4443
     
    5049
    5150#include "glmenu_imagescreen.h"
    52 
    53 
    54 
    55 
    5651
    5752
     
    313308{
    314309  PRINT(0)("==================================================\n");
     310
    315311  Playable* playable;
    316   const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE);
    317   assert(playableList != NULL);
    318   std::list<BaseObject*>::const_iterator entity;
    319 
    320 
    321 
    322   for (entity = playableList->begin(); entity != playableList->end(); entity++)
    323   {
    324     Playable* p = dynamic_cast<Playable*>(*entity);
     312
     313  for (NewObjectList<Playable>::const_iterator entity = Playable::objectList().begin();
     314       entity != Playable::objectList().end();
     315      ++entity)
     316  {
     317    Playable* p = *entity;
    325318    PRINTF(0)("Got a playable, class: %s, name: %s, uid: %i\n", (*entity)->getClassCName(), (*entity)->getCName(), p->getUniqueID());
    326319  }
     
    329322  if( this->toggle)
    330323  {
    331     playable = dynamic_cast<Playable*>(playableList->front());
     324    playable = Playable::objectList().front();
    332325    this->localPlayer->setPlayable(playable);
    333326    this->toggle = !this->toggle;
     
    335328  else
    336329  {
    337     playable = dynamic_cast<Playable*>(playableList->back());
     330    playable = Playable::objectList().back();
    338331    this->localPlayer->setPlayable(playable);
    339332    this->toggle = !this->toggle;
Note: See TracChangeset for help on using the changeset viewer.