Changeset 3604 in orxonox.OLD for orxonox/branches/levelloader/src/story_entities
- Timestamp:
- Mar 18, 2005, 10:49:55 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/src/story_entities/world.cc
r3557 r3604 212 212 if( created != NULL) this->spawn( created); 213 213 // 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; 215 216 element = element->NextSiblingElement(); 216 217 } … … 722 723 { 723 724 this->lastFrame = SDL_GetTicks (); 724 printf("World::mainLoop() - Entering main loop \n");725 printf("World::mainLoop() - Entering main loop of '%s'\n", this->worldName); 725 726 while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */ 726 727 { … … 735 736 } 736 737 // Process time 737 738 this->timeSlice (); 738 739 // Process collision 739 740 this->collide (); 740 741 // Draw 741 742 this->display (); 742 743 743 744 for( int i = 0; i < 5000000; i++) {} … … 805 806 /* function to let all entities tick (iterate through list) */ 806 807 WorldEntity* entity; 807 float seconds = dt / 1000.0; 808 float seconds = dt / 1000.0; 809 assert( this->nullParent != NULL); 808 810 this->nullParent->update (seconds); 809 811 entity = entities->enumerate(); … … 813 815 entity = entities->nextElement(); 814 816 } 815 skySphere->updatePosition(localCamera->absCoordinate); 817 //assert( skySphere != NULL); 818 //skySphere->updatePosition(localCamera->absCoordinate); 816 819 817 820 /* update tick the rest */ 821 assert( this->localCamera != NULL); 822 assert( this->trackManager != NULL); 818 823 this->localCamera->timeSlice(dt); 819 824 this->trackManager->tick(dt);
Note: See TracChangeset
for help on using the changeset viewer.