[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src multiplayer_lobby.cpp
From: |
Philippe Plantier |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src multiplayer_lobby.cpp |
Date: |
Thu, 24 Feb 2005 16:16:25 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Philippe Plantier <address@hidden> 05/02/24 21:16:25
Modified files:
src : multiplayer_lobby.cpp
Log message:
A user tried to join as a player when, in the lobby, it double-clicked
on a
game with no sides available. Now, it tries to join as an observer
instead.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_lobby.cpp.diff?tr1=1.60&tr2=1.61&r1=text&r2=text
Patches:
Index: wesnoth/src/multiplayer_lobby.cpp
diff -u wesnoth/src/multiplayer_lobby.cpp:1.60
wesnoth/src/multiplayer_lobby.cpp:1.61
--- wesnoth/src/multiplayer_lobby.cpp:1.60 Tue Feb 22 17:55:57 2005
+++ wesnoth/src/multiplayer_lobby.cpp Thu Feb 24 21:16:25 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_lobby.cpp,v 1.60 2005/02/22 17:55:57 j_daniel Exp $ */
+/* $Id: multiplayer_lobby.cpp,v 1.61 2005/02/24 21:16:25 gruikya Exp $ */
/*
Copyright (C)
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -145,6 +145,7 @@
games_menu_.process();
int selection = games_menu_.selection();
+
if(selection != current_game_ && selection >= 0 && selection <
int(game_vacant_slots_.size())) {
current_game_ = selection;
join_game_.hide(!game_vacant_slots_[selection]);
@@ -152,8 +153,9 @@
}
const bool games_available = game_vacant_slots_.empty() == false;
+ wassert(!games_available || selection >= 0 && selection <
int(game_vacant_slots_.size()));
const bool double_click = games_menu_.double_clicked();
- const bool observe = observe_game_.pressed() || !games_available &&
double_click;
+ const bool observe = observe_game_.pressed() || games_available &&
!game_vacant_slots_[selection] && double_click;
if(games_available && (observe || join_game_.pressed() ||
double_click)) {
const size_t index = size_t(games_menu_.selection());