Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2640 in orxonox.OLD for orxonox/trunk/src/world.cc


Ignore:
Timestamp:
Oct 25, 2004, 2:01:06 PM (21 years ago)
Author:
patrick
Message:

orxonox/trunk/src - BUGFIX: input node now redirected to the right story_entity. This should fix the display player visibility problem, encountered on some systems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world.cc

    r2636 r2640  
    5050World::~World ()
    5151{
    52   unload ();
     52  Orxonox *orx = Orxonox::getInstance();
     53  orx->get_localinput()->unbind (localPlayer);
    5354  delete entities;
    5455}
     
    7273  this->bQuitCurrentGame = true;
    7374  this->localCamera->setWorld(NULL);
     75  this->~World();
    7476}
    7577
     
    111113            // create a player
    112114            WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
    113            
     115            this->localPlayer = myPlayer;           
     116
    114117            // bind input
    115118            Orxonox *orx = Orxonox::getInstance();
     
    142145            // create a player
    143146            WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
     147            this->localPlayer = myPlayer;
    144148           
    145149            // bind input
     
    394398}
    395399
     400void World::debug()
     401{
     402  List<WorldEntity> *l;
     403  WorldEntity* entity;
     404 
     405  printf("counting all entities\n");
     406  l = entities->get_next(); 
     407  while( l != NULL )
     408    {
     409      entity = l->get_object();
     410      if( entity->bDraw ) printf("got an entity\n");
     411      l = l->get_next();
     412    }
     413}
     414
    396415
    397416void World::mainLoop()
     
    403422  while(!this->bQuitOrxonox && !this->bQuitCurrentGame) /* pause pause pause ?!?!?*/
    404423    {
     424      //debug routine
     425      //debug();
    405426      // Network
    406427      synchronize();
Note: See TracChangeset for help on using the changeset viewer.