[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src multiplayer.hpp multiplayer_connect...
From: |
Jon Daniel |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src multiplayer.hpp multiplayer_connect... |
Date: |
Mon, 01 Aug 2005 19:00:54 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Jon Daniel <address@hidden> 05/08/01 23:00:54
Modified files:
src : multiplayer.hpp multiplayer_connect.cpp
multiplayer_wait.cpp
Log message:
Fix bug where players are allowed to join a game with all controller
set to computers
if they've clicked it while there was a vacant slot.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer.hpp.diff?tr1=1.29&tr2=1.30&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_connect.cpp.diff?tr1=1.153&tr2=1.154&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_wait.cpp.diff?tr1=1.29&tr2=1.30&r1=text&r2=text
Patches:
Index: wesnoth/src/multiplayer.hpp
diff -u wesnoth/src/multiplayer.hpp:1.29 wesnoth/src/multiplayer.hpp:1.30
--- wesnoth/src/multiplayer.hpp:1.29 Mon Aug 1 21:12:30 2005
+++ wesnoth/src/multiplayer.hpp Mon Aug 1 23:00:54 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer.hpp,v 1.29 2005/08/01 21:12:30 j_daniel Exp $ */
+/* $Id: multiplayer.hpp,v 1.30 2005/08/01 23:00:54 j_daniel Exp $ */
/*
Copyright (C) 2005 Philippe Plantier <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -47,7 +47,7 @@
const std::string host);
struct error {
- error(const std::string& msg) : message(msg) {}
+ error(const std::string& msg = "") : message(msg) { }
std::string message;
};
Index: wesnoth/src/multiplayer_connect.cpp
diff -u wesnoth/src/multiplayer_connect.cpp:1.153
wesnoth/src/multiplayer_connect.cpp:1.154
--- wesnoth/src/multiplayer_connect.cpp:1.153 Mon Jul 25 22:19:56 2005
+++ wesnoth/src/multiplayer_connect.cpp Mon Aug 1 23:00:54 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_connect.cpp,v 1.153 2005/07/25 22:19:56 j_daniel Exp $ */
+/* $Id: multiplayer_connect.cpp,v 1.154 2005/08/01 23:00:54 j_daniel Exp $ */
/*
Copyright (C)
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -645,7 +645,7 @@
const int side_drop =
lexical_cast_default<int>(data["side_drop"], 0) - 1;
if(side_drop >= 0 && side_drop < int(sides_.size())) {
connected_user_list::iterator player =
find_player(sides_[side_drop].get_id());
- sides_[side_drop].reset(default_controller_);
+
sides_[side_drop].reset(sides_[side_drop].get_controller());
if (player != users_.end()) {
users_.erase(player);
update_user_combos();
@@ -685,6 +685,13 @@
config response;
response.values["failed"] = "yes";
network::send_data(response, sock);
+ config kick;
+ kick["username"] = data["name"];
+ config res;
+ res.add_child("kick", kick);
+ network::send_data(res);
+ update_user_combos();
+ update_and_send_diff();
return;
}
}
Index: wesnoth/src/multiplayer_wait.cpp
diff -u wesnoth/src/multiplayer_wait.cpp:1.29
wesnoth/src/multiplayer_wait.cpp:1.30
--- wesnoth/src/multiplayer_wait.cpp:1.29 Mon Aug 1 21:12:30 2005
+++ wesnoth/src/multiplayer_wait.cpp Mon Aug 1 23:00:54 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_wait.cpp,v 1.29 2005/08/01 21:12:30 j_daniel Exp $ */
+/* $Id: multiplayer_wait.cpp,v 1.30 2005/08/01 23:00:54 j_daniel Exp $ */
/*
Copyright (C)
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -178,7 +178,7 @@
if(sides_list.empty()) {
set_result(QUIT);
- throw mp::error(_("No multiplayer sides available in
this game"));
+ throw network::error(_("No multiplayer sides available
in this game"));
return;
}
@@ -205,12 +205,12 @@
if(allow_changes) {
const config* era = level_.child("era");
if(era == NULL)
- throw mp::error(_("Era not available"));
+ throw network::error(_("Era not available"));
const config::child_list& possible_sides =
era->get_children("multiplayer_side");
if(possible_sides.empty()) {
set_result(QUIT);
- throw mp::error(_("No multiplayer sides
found"));
+ throw network::error(_("No multiplayer sides
found"));
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src multiplayer.hpp multiplayer_connect...,
Jon Daniel <=