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

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

[Wesnoth-cvs-commits] wesnoth/src/server game.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src/server game.cpp
Date: Sat, 23 Jul 2005 13:18:35 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/07/23 17:18:35

Modified files:
        src/server     : game.cpp 

Log message:
        fixed bug where re-joining a game you've left as an observer with the 
same name causes out of sync

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/server/game.cpp.diff?tr1=1.41&tr2=1.42&r1=text&r2=text

Patches:
Index: wesnoth/src/server/game.cpp
diff -u wesnoth/src/server/game.cpp:1.41 wesnoth/src/server/game.cpp:1.42
--- wesnoth/src/server/game.cpp:1.41    Thu Jul 21 20:19:15 2005
+++ wesnoth/src/server/game.cpp Sat Jul 23 17:18:35 2005
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.41 2005/07/21 20:19:15 isaaccp Exp $ */
+/* $Id: game.cpp,v 1.42 2005/07/23 17:18:35 Sirp Exp $ */
 /*
    Copyright (C) 2003-5 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -108,7 +108,14 @@
 
 void game::start_game()
 {
-       started_ = true;
+       started_ = true;
+
+       //set all side controllers to 'human' so that observers will understand 
that they can't
+       //take control of any sides if they happen to have the same name as one 
of the descriptions
+       config::child_itors& sides = level_.child_range("side");
+       for(; sides.first != sides.second; ++sides.first) {
+               (**sides.first)["controller"] = "human";
+       }
 
        describe_slots();
        if(description()) {




reply via email to

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