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_connect.cpp


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth/src multiplayer_connect.cpp
Date: Wed, 09 Feb 2005 10:25:32 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/02/09 15:25:32

Modified files:
        src            : multiplayer_connect.cpp 

Log message:
        Fixed bugs which caused slots not to be reset to Random correctly.

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

Patches:
Index: wesnoth/src/multiplayer_connect.cpp
diff -u wesnoth/src/multiplayer_connect.cpp:1.101 
wesnoth/src/multiplayer_connect.cpp:1.102
--- wesnoth/src/multiplayer_connect.cpp:1.101   Fri Feb  4 23:43:26 2005
+++ wesnoth/src/multiplayer_connect.cpp Wed Feb  9 15:25:32 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_connect.cpp,v 1.101 2005/02/04 23:43:26 j_daniel Exp $ */
+/* $Id: multiplayer_connect.cpp,v 1.102 2005/02/09 15:25:32 j_daniel Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -746,13 +746,12 @@
                        }
                        pos->first->values.erase("taken");
                        remove_player(pos->first->values["description"]);
-                       pos->first->values["description"] = "";
-                       pos->first->values["name"] = player_races_.front();
-                       pos->first->values["random_faction"] = "yes";
-                       pos->first->values["type"] = "";
-                       si["controller"] = "ai";
-                       si["description"] = _("Computer Player");
-                       combos_type_[m].set_selected(2);
+                       if(!save_) {
+                               si["description"] = _("Computer Player");
+                               si["controller"] = "ai";
+                               si["id"] = possible_faction_ids_.front();
+                               si["random_faction"] = "yes";
+                       }
                }
                level_changed = true;
        }
@@ -815,9 +814,9 @@
                return lobby::CREATE;
        }
 
-       gui_update();
        update_positions();
        update_network();
+       gui_update();
 
        return lobby::CONTINUE;
 }
@@ -929,10 +928,12 @@
                                i->second = 0;
                                i->first->values.erase("taken");
                                remove_player(i->first->values["description"]);
-                               i->first->values["description"] = "";
-                               i->first->values["name"] = 
player_races_.front();
-                               i->first->values["random_faction"] = "yes";
-                               i->first->values["type"] = "";
+                               if(!save_) {
+                                       i->first->values["description"] = "";
+                                       i->first->values["id"] = 
possible_faction_ids_.front();
+                                       i->first->values["random_faction"] = 
"yes";
+                                       i->first->values["type"] = "";
+                               }
                        }
                }
 
@@ -961,10 +962,12 @@
                                pos->second = 0;
                                pos->first->values.erase("taken");
                                
remove_player(pos->first->values["description"]);
-                               pos->first->values["description"] = "";
-                               pos->first->values["name"] = 
player_races_.front();
-                               pos->first->values["random_faction"] = "yes";
-                               pos->first->values["type"] = "";
+                               if(!save_) {
+                                       pos->first->values["description"] = "";
+                                       pos->first->values["id"] = 
possible_faction_ids_.front();
+                                       pos->first->values["random_faction"] = 
"yes";
+                                       pos->first->values["type"] = "";
+                               }
                                network::send_data(*level_);
                        }
                        return;




reply via email to

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