Author: suokko
Date: Sun Jun 29 18:22:41 2008
New Revision: 27592

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27592&view=rev
Log:
* Fixed players side name to same as leaders name (bug: #10114)

Modified:
    trunk/changelog
    trunk/data/campaigns/tutorial/scenarios/1_Tutorial.cfg
    trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg
    trunk/src/game_events.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=27592&r1=27591&r2=27592&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Jun 29 18:22:41 2008
@@ -1,5 +1,7 @@
 Version 1.5.1+svn:
  * campaigns:
+   * Tutorial
+     * Fixed players side name to same as leaders name (bug: #10114)
  * formula AI:
    * Added variant_iterator to iterate over variant elements
    * Modified choose, filter, find and map functions to use variant_iterator, 

Modified: trunk/data/campaigns/tutorial/scenarios/1_Tutorial.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/tutorial/scenarios/1_Tutorial.cfg?rev=27592&r1=27591&r2=27592&view=diff
==============================================================================
--- trunk/data/campaigns/tutorial/scenarios/1_Tutorial.cfg (original)
+++ trunk/data/campaigns/tutorial/scenarios/1_Tutorial.cfg Sun Jun 29 18:22:41 
2008
@@ -76,6 +76,7 @@
         type=Fighter
         id=student
         name=_"Konrad"
+        current_player=_"Konrad"
         canrecruit=yes
         side=1
         controller=human
@@ -492,20 +493,20 @@
                     id=Delfador
                     message=_ "There is a village on the other side of the 
river. Visiting villages is a good idea, and ending your turn in one will heal 
you. To the village!"
                 [/message]
-                               #wmlindent: start ignoring
-                               {GENDER ({PRINT (_"Left click on Konrad")})
-                                               ({PRINT (_"Left click on 
Li'sar")})}
-                               #wmlindent: stop ignoring
+                #wmlindent: start ignoring
+                {GENDER ({PRINT (_"Left click on Konrad")})
+                        ({PRINT (_"Left click on Li'sar")})}
+                #wmlindent: stop ignoring
                 [event]
                     name=select
                     [filter]
                         side=1
                     [/filter]
 
-                                       #wmlindent: start ignoring
-                                               {GENDER ({PRINT (_"Click on the 
village to move Konrad")})
-                                                               ({PRINT 
(_"Click on the village to move Li'sar")})}
-                                       #wmlindent: stop ignoring
+                    #wmlindent: start ignoring
+                        {GENDER ({PRINT (_"Click on the village to move 
Konrad")})
+                                ({PRINT (_"Click on the village to move 
Li'sar")})}
+                    #wmlindent: stop ignoring
                 [/event]
 
                 {TARGET_HEX 11 7}
@@ -572,10 +573,10 @@
                     message=_ "A splendid idea. You can recruit two units if 
you return to the keep. You have plenty of gold for that."
                 [/message]
                 {TARGET_HEX 9 6}
-                               #wmlindent: start ignoring
-                               {GENDER ({PRINT (_"Move Konrad to the keep")})
-                                               ({PRINT (_"Move Li'sar to the 
keep")})}
-                               #wmlindent: stop ignoring
+                #wmlindent: start ignoring
+                {GENDER ({PRINT (_"Move Konrad to the keep")})
+                        ({PRINT (_"Move Li'sar to the keep")})}
+                #wmlindent: stop ignoring
                 [event]
                     name=moveto
                     [filter]

Modified: trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg?rev=27592&r1=27591&r2=27592&view=diff
==============================================================================
--- trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg (original)
+++ trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg Sun Jun 29 18:22:41 
2008
@@ -293,6 +293,7 @@
         type=Fighter
         id=student
         name=_"Konrad"
+        current_player=_"Konrad"
         canrecruit=yes
         side=1
         gold=123

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=27592&r1=27591&r2=27592&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Sun Jun 29 18:22:41 2008
@@ -1689,6 +1689,11 @@
                        loc = find_vacant_tile(*game_map,*units,loc);
                        const bool show = screen != NULL && 
!screen->fogged(loc);
                        const bool animate = show && 
utils::string_bool(cfg["animate"], false);
+               
+                       //      If new unit is leader set current 
player/visible side name
+                       //      to units name
+                       if (new_unit.can_recruit())
+                               (*teams)[new_unit.side() - 
1].set_current_player(new_unit.name());
 
                        units->erase(loc);
                        units->add(new 
std::pair<gamemap::location,unit>(loc,new_unit));


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to