Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9115 in orxonox.OLD for branches/presentation/src


Ignore:
Timestamp:
Jul 4, 2006, 12:46:05 PM (18 years ago)
Author:
rennerc
Message:

last server is saved now

Location:
branches/presentation/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/lib/network/player_stats.cc

    r9110 r9115  
    2222#include "state.h"
    2323#include "shared_network_data.h"
     24
     25#include "preferences.h"
    2426
    2527#include "debug.h"
     
    187189void PlayerStats::setNickName( std::string nick )
    188190{
    189   if ( isServer() )
     191  if ( SharedNetworkData::getInstance()->isGameServer() )
    190192  {
    191193    this->nickName = nick;
     
    226228  if ( getStats( SharedNetworkData::getInstance()->getHostID() ) )
    227229    getStats( SharedNetworkData::getInstance()->getHostID() )->setNickName( newNick );
     230   
     231  Preferences::getInstance()->setString( "multiplayer", "nickname", newNick );
    228232}
    229233
  • branches/presentation/src/orxonox.cc

    r8750 r9115  
    145145  SDL_QuitSubSystem(SDL_INIT_TIMER);
    146146  ClassList::debug();
     147 
     148  Preferences::getInstance()->save();
    147149
    148150  PRINT(3)
  • branches/presentation/src/story_entities/menu/game_menu.cc

    r9110 r9115  
    4040
    4141#include "network_manager.h"
     42
     43#include "preferences.h"
    4244
    4345//! This creates a Factory to fabricate a GameMenu
     
    528530     
    529531      this->ipInputLine = new OrxGui::GLGuiInputLine( );
    530       this->ipInputLine->setText( "tardis-d08" );
     532      this->ipInputLine->setText( Preferences::getInstance()->getString( "multiplayer", "lastVisitedServer", "localhost" ) );
    531533      this->clientNetworkBox->pack( this->ipInputLine );
    532534      this->ipInputLine->connect(SIGNAL(ipInputLine, enterPushed), this, SLOT(GameMenu, connectToServer));
     
    594596  NetworkManager::getInstance()->establishConnection( this->ipInputLine->_getText(), 9999 );
    595597 
     598  Preferences::getInstance()->setString( "multiplayer", "lastVisitedServer", this->ipInputLine->_getText() );
     599 
    596600  this->startLevel( 5 );
    597601}
Note: See TracChangeset for help on using the changeset viewer.