# HG changeset patch # User cedricbonhomme # Date 1337549333 -7200 # Sun May 20 23:28:53 2012 +0200 # Node ID 874fe4cc7e5b8b64755653837826712da307161d # Parent 3e16711ab9289d695660a755a725973de654e864 Bugfix: error when instantiating 'Game' object. diff --git a/serveurPartie/game.cpp b/serveurPartie/game.cpp --- a/serveurPartie/game.cpp +++ b/serveurPartie/game.cpp @@ -181,7 +181,7 @@ { // si correct, on ajoute le joueur a la liste des joueurs avec ces coordonnes initiale, son identifiant, etc. int x = 1, y = 1; - if ( this->addPlayer(Joueur::Joueur(tab[2], (this->numberPlayer + 1), + if ( this->addPlayer(Joueur(tab[2], (this->numberPlayer + 1), inet_ntoa(from.sin_addr), tab[1], 1, 1) ) == -1) { diff --git a/serveurPartie/main.cpp b/serveurPartie/main.cpp --- a/serveurPartie/main.cpp +++ b/serveurPartie/main.cpp @@ -24,8 +24,7 @@ cin >> adresseServeurPrincipal; cout << "Connexion au serveur...\n" << endl; - Game * jeux = new Game::Game(portEcoute, portLecture, portEcouteServeur, - portEcouteDistant, portEcouteServeurPrincipal, adresseServeurPrincipal); + Game * jeux = new Game(portEcoute, portLecture, portEcouteServeur, portEcouteDistant, portEcouteServeurPrincipal, adresseServeurPrincipal); // Lancement thread d'ecoute du serveur : pthread_t * join_toEcouteServeur = jeux->initEcouteServeur();