Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9429 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 24, 2006, 3:05:24 PM (18 years ago)
Author:
bensch
Message:

fixed framerate to max 100 fps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/story_entities/game_world.cc

    r9406 r9429  
    414414    double currentFrame = Timer::getNow();
    415415
     416    if (currentFrame - this->lastFrame < .01)
     417    {
     418      SDL_Delay(1000.0 * (0.01 - (currentFrame - lastFrame)));
     419      currentFrame = Timer::getNow();
     420    }
     421
     422
    416423    frameTimesIndex = this->cycle % TICK_SMOOTH_VALUE;
    417424    this->frameTimes[frameTimesIndex] = currentFrame - this->lastFrame;
     
    469476      this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ));
    470477  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
    471     this->dataTank->objectManager->getObjectList(OM_GROUP_00));
     478      this->dataTank->objectManager->getObjectList(OM_GROUP_00));
    472479
    473480  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
    474   this->dataTank->objectManager->getObjectList(OM_GROUP_02));
     481      this->dataTank->objectManager->getObjectList(OM_GROUP_02));
    475482  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_02),
    476   this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
     483      this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
    477484
    478485
     
    513520{
    514521
    515     // if this server is a dedicated server the game workd does not need to be drawn
     522  // if this server is a dedicated server the game workd does not need to be drawn
    516523  if( !GraphicsEngine::getInstance()->isDedicated())
    517524  {
    518   // render the reflection texture
    519   this->renderPassReflection();
    520   // redner the refraction texture
    521   this->renderPassRefraction();
     525    // render the reflection texture
     526    this->renderPassReflection();
     527    // redner the refraction texture
     528    this->renderPassRefraction();
    522529  }
    523530  // render all
Note: See TracChangeset for help on using the changeset viewer.