Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 18, 2005, 10:49:55 AM (20 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Found the bug that prevented the loaded world from running. Something is missing however, I am only getting a black screen…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/story_entities/world.cc

    r3557 r3604  
    212212                        if( created != NULL) this->spawn( created);
    213213                                // if we load a 'Player' we use it as localPlayer
    214                         // if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created;
     214                                //todo do this more elegant
     215                         if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created;
    215216                        element = element->NextSiblingElement();
    216217                }
     
    722723{
    723724  this->lastFrame = SDL_GetTicks ();
    724   printf("World::mainLoop() - Entering main loop\n");
     725  printf("World::mainLoop() - Entering main loop of '%s'\n", this->worldName);
    725726  while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
    726727    {
     
    735736        }
    736737      // Process time
    737       this->timeSlice ();
     738     this->timeSlice ();
    738739      // Process collision
    739       this->collide ();
     740     this->collide ();
    740741      // Draw
    741       this->display ();
     742     this->display ();
    742743 
    743744      for( int i = 0; i < 5000000; i++) {}
     
    805806      /* function to let all entities tick (iterate through list) */
    806807      WorldEntity* entity;
    807       float seconds = dt / 1000.0;     
     808      float seconds = dt / 1000.0; 
     809      assert( this->nullParent != NULL);
    808810      this->nullParent->update (seconds);
    809811      entity = entities->enumerate();
     
    813815          entity = entities->nextElement();
    814816        }
    815       skySphere->updatePosition(localCamera->absCoordinate);
     817      //assert( skySphere != NULL);
     818      //skySphere->updatePosition(localCamera->absCoordinate);
    816819     
    817820      /* update tick the rest */
     821      assert( this->localCamera != NULL);
     822      assert( this->trackManager != NULL);
    818823      this->localCamera->timeSlice(dt);
    819824      this->trackManager->tick(dt);
Note: See TracChangeset for help on using the changeset viewer.