Synchronised race results menu, single races in LAN

mode can now be restarted (GP and FTL modes are still 
to be done).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2307 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2008-09-29 02:29:33 +00:00
parent 44e9335baa
commit 1809dd1da1
24 changed files with 495 additions and 107 deletions

View File

@@ -115,14 +115,22 @@ void MainLoop::run()
// Server: Send the current position and previous controls to all clients
// Client: send current controls to server
network_manager->sendUpdates();
// But don't do this if the race is in finish phase (otherwise
// messages can be mixed up in the race manager)
if(!race_manager->getWorld()->getClock().isFinishPhase())
network_manager->sendUpdates();
music_on = false;
if(user_config->m_profile) dt=1.0f/60.0f;
// In the first call dt might be large (includes loading time),
// which can cause the camera to significantly tilt
scene->draw(RaceManager::getWorld()->getPhase()==SETUP_PHASE ? 0.0f : dt);
network_manager->receiveUpdates();
// Again, only receive updates if the race isn't over - once the
// race results are displayed (i.e. game is in finish phase)
// messages must be handled by the normal update of the network
// manager
if(!race_manager->getWorld()->getClock().isFinishPhase())
network_manager->receiveUpdates();
if ( RaceManager::getWorld()->getPhase() != LIMBO_PHASE)
{