Changeset 6386 in orxonox.OLD for branches/network/src/story_entities/game_world.cc
- Timestamp:
- Jan 2, 2006, 1:30:23 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/story_entities/game_world.cc
r6377 r6386 278 278 BaseObject* created = Factory::fabricate(element); 279 279 if( created != NULL ) 280 {281 if(created->isA(CL_WORLD_ENTITY))282 this->spawn(dynamic_cast<WorldEntity*>(created));283 280 printf("Created a %s: %s\n", created->getClassName(), created->getName()); 284 }285 286 // if we load a 'Player' we use it as localPlayer287 281 288 282 … … 345 339 //music->playback(); 346 340 347 this->releaseLoadScreen();348 }349 350 351 /**352 * initializes a new GameWorld shortly before start353 *354 * this is the function, that will be loaded shortly before the world is355 * started356 */357 ErrorMessage GameWorld::preStart()358 {359 this->bPause = false;360 361 341 /* update the object position before game start - so there are no wrong coordinates used in the first processing */ 362 342 PNode::getNullParent()->updateNode (0.001f); 363 343 PNode::getNullParent()->updateNode (0.001f); 344 345 this->releaseLoadScreen(); 364 346 } 365 347 … … 370 352 ErrorMessage GameWorld::start() 371 353 { 372 this->bQuitWorld = false; 354 this->isPaused = false; 355 this->isRunning = true; 373 356 this->mainLoop(); 374 357 } … … 382 365 { 383 366 PRINTF(3)("GameWorld::stop() - got stop signal\n"); 384 this-> bQuitWorld= true;367 this->isRunning = false; 385 368 } 386 369 … … 408 391 { 409 392 PRINTF(3)("GameWorld::displayLoadScreen - start\n"); 410 411 //GLMenuImageScreen*412 393 this->glmis = new GLMenuImageScreen(); 413 394 this->glmis->setMaximum(8); 414 415 395 PRINTF(3)("GameWorld::displayLoadScreen - end\n"); 416 396 } 397 417 398 418 399 /** … … 472 453 { 473 454 Uint32 currentFrame = SDL_GetTicks(); 474 if( !this->bPause)455 if( !this->isPaused) 475 456 { 476 457 this->dt = currentFrame - this->lastFrame; … … 624 605 PRINTF(3)("GameWorld::mainLoop() - Entering main loop\n"); 625 606 626 while( !this->bQuitWorld) /* @todo implement pause */607 while( this->isRunning) /* @todo implement pause */ 627 608 { 628 609 ++this->cycle; … … 631 612 // Process input 632 613 this->handleInput (); 633 if( this->bQuitWorld)614 if( !this->isRunning) 634 615 break; 635 616 // Process time … … 652 633 * @param entity to be added 653 634 */ 654 void GameWorld::spawn(WorldEntity* entity)655 {656 // this->entities->add (entity);657 entity->postSpawn ();658 }635 // void GameWorld::spawn(WorldEntity* entity) 636 // { 637 // // this->entities->add (entity); 638 // entity->postSpawn (); 639 // } 659 640 660 641 /**
Note: See TracChangeset
for help on using the changeset viewer.