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

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

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


From: ott
Subject: [Wesnoth-cvs-commits] wesnoth/src/editor editor.cpp
Date: Fri, 29 Apr 2005 15:41:58 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     ott <address@hidden>    05/04/29 19:41:58

Modified files:
        src/editor     : editor.cpp 

Log message:
        Really fix 10625.  No, really, this one works.  0 is now player 10, too.

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

Patches:
Index: wesnoth/src/editor/editor.cpp
diff -u wesnoth/src/editor/editor.cpp:1.103 wesnoth/src/editor/editor.cpp:1.104
--- wesnoth/src/editor/editor.cpp:1.103 Fri Apr 29 19:28:07 2005
+++ wesnoth/src/editor/editor.cpp       Fri Apr 29 19:41:57 2005
@@ -326,15 +326,17 @@
 
 void map_editor::perform_set_starting_pos() {
        std::vector<std::string> players;
-       for (int i = 1; i < num_players; i++) {
+       for (int i = 0; i < num_players; i++) {
                std::stringstream str;
-               str << "Player " << i;
+               str << "Player " << i + 1;
                players.push_back(str.str());
        }
-       const int res = gui::show_dialog(gui_, NULL, _("Which Player?"),
+       int res = gui::show_dialog(gui_, NULL, _("Which Player?"),
                                         _("Which player should start here?"),
                                         gui::OK_CANCEL, &players);
        if (res >= 0) {
+               res++;
+               if (res == num_players) res = 0;
                set_starting_position(res, selected_hex_);
        }
 }




reply via email to

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