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

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

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


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth/src playturn.cpp
Date: Fri, 03 Jun 2005 06:45:00 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/06/03 10:45:00

Modified files:
        src            : playturn.cpp 

Log message:
        fixed bug #13264 causing oos if local players are replaced while it is 
there turn

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

Patches:
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.372 wesnoth/src/playturn.cpp:1.373
--- wesnoth/src/playturn.cpp:1.372      Wed May 18 14:06:30 2005
+++ wesnoth/src/playturn.cpp    Fri Jun  3 10:44:59 2005
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.372 2005/05/18 14:06:30 darthfool Exp $ */
+/* $Id: playturn.cpp,v 1.373 2005/06/03 10:44:59 j_daniel Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -2542,8 +2542,15 @@
                if(j != data.end()) {
                        const std::string side(data.begin(),j);
                        const std::string player(j+1,data.end());
-
-                       change_side_controller(side,player);
+                       const int side_num = lexical_cast<int, 
std::string>(side);
+                       if(side_num > 0 && side_num <= teams_.size()) {
+                               teams_[static_cast<size_t>(side_num - 
1)].make_network();
+                               change_side_controller(side,player);
+                               close_textbox();
+                               if(team_num_ == side_num) {
+                                       throw end_turn_exception(side_num);
+                               }
+                       }
                }
        } else if(cmd == "clear") {
                gui_.clear_chat_messages();




reply via email to

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