Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 5, 2008, 7:16:33 PM (17 years ago)
Author:
scheusso
Message:

fixed that compiler error (missing ClassManager.h; improved network frequency handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/network/Server.cc

    r1534 r1548  
    181181    timeSinceLastUpdate_+=time;
    182182    if(timeSinceLastUpdate_>=(1./NETWORK_FREQUENCY)){
    183       timeSinceLastUpdate_-=(1./NETWORK_FREQUENCY);
     183      timeSinceLastUpdate_=(float)((int)(timeSinceLastUpdate_*NETWORK_FREQUENCY))/timeSinceLastUpdate_;
     184//      timeSinceLastUpdate_-=1./NETWORK_FREQUENCY;
    184185      gamestates->processGameStates();
    185186      updateGamestate();
    186187    }
     188    /*while(timeSinceLastUpdate_>1./NETWORK_FREQUENCY)
     189      timeSinceLastUpdate_-=1./NETWORK_FREQUENCY;*/
    187190//     usleep(5000); // TODO remove
    188191    return;
Note: See TracChangeset for help on using the changeset viewer.