wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src multiplayer_lobby.cpp


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth/src multiplayer_lobby.cpp
Date: Tue, 26 Jul 2005 08:08:22 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/07/26 12:08:22

Modified files:
        src            : multiplayer_lobby.cpp 

Log message:
        fixed bug where players are allowed to partially join a game with no 
observers allowed and end up with a messed up lobby

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_lobby.cpp.diff?tr1=1.77&tr2=1.78&r1=text&r2=text

Patches:
Index: wesnoth/src/multiplayer_lobby.cpp
diff -u wesnoth/src/multiplayer_lobby.cpp:1.77 
wesnoth/src/multiplayer_lobby.cpp:1.78
--- wesnoth/src/multiplayer_lobby.cpp:1.77      Mon Jul 25 22:19:56 2005
+++ wesnoth/src/multiplayer_lobby.cpp   Tue Jul 26 12:08:22 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_lobby.cpp,v 1.77 2005/07/25 22:19:56 j_daniel Exp $ */
+/* $Id: multiplayer_lobby.cpp,v 1.78 2005/07/26 12:08:22 j_daniel Exp $ */
 /*
    Copyright (C)
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -247,9 +247,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 && 
!game_vacant_slots_[selection] && double_click;
+       const bool observe = observe_game_.pressed() || games_available && 
!game_vacant_slots_[selection] && double_click && game_observers_[selection];
 
-       if(games_available && (observe || join_game_.pressed() || 
double_click)) {
+       if(games_available && (observe || ((join_game_.pressed() || 
double_click) && game_vacant_slots_[selection]))) {
                const size_t index = size_t(games_menu_.selection());
                const config* game = gamelist().child("gamelist");
                if (game != NULL) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]