Author: suokko
Date: Sun Sep 14 01:38:27 2008
New Revision: 29449
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29449&view=rev
Log:
Fixed join to MP games
Modified:
trunk/src/multiplayer_connect.cpp
trunk/src/multiplayer_wait.cpp
Modified: trunk/src/multiplayer_connect.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/multiplayer_connect.cpp?rev=29449&r1=29448&r2=29449&view=diff
==============================================================================
--- trunk/src/multiplayer_connect.cpp (original)
+++ trunk/src/multiplayer_connect.cpp Sun Sep 14 01:38:27 2008
@@ -646,6 +646,7 @@
}
res["controller"] = controller_names[controller_];
res["current_player"] = id_.empty() ? current_player_ : id_;
+ res["id"] = id_;
if (id_.empty()) {
char const *description;
Modified: trunk/src/multiplayer_wait.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/multiplayer_wait.cpp?rev=29449&r1=29448&r2=29449&view=diff
==============================================================================
--- trunk/src/multiplayer_wait.cpp (original)
+++ trunk/src/multiplayer_wait.cpp Sun Sep 14 01:38:27 2008
@@ -209,7 +209,10 @@
void wait::join_game(bool observe)
{
- for(;;) {
+ //if we have got valid side data
+ //the first condition is to make sure that we don't have another
+ //WML message with a side-tag in it
+ while((level_.values.find("version") == level_.values.end()) ||
(level_.child("side") == NULL)) {
network::connection data_res =
dialogs::network_receive_dialog(disp(),
_("Getting game data..."), level_);
if (!data_res) {
@@ -221,11 +224,6 @@
set_result(QUIT);
return;
}
- //if we have got valid side data
- //the first condition is to make sure that we don't have another
- //WML message with a side-tag in it
- if( (level_.values.find("version") != level_.values.end()) &&
(level_.child("side") != NULL) )
- break;
}
// Add the map name to the title.
@@ -255,7 +253,7 @@
}
}
if (static_cast<size_t>(side_choice) >= sides_list.size()) {
- join_game(true);
+ set_result(QUIT);
return;
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits