Fixed players side name to same as leaders name (bug: #10114)

This commit is contained in:
Pauli Nieminen 2008-06-29 16:22:41 +00:00
parent aa09d82c7d
commit b998f1b974
4 changed files with 21 additions and 12 deletions

View file

@ -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,

View file

@ -76,6 +76,7 @@ border_size=1
type=Fighter
id=student
name=_"Konrad"
current_player=_"Konrad"
canrecruit=yes
side=1
controller=human
@ -492,20 +493,20 @@ Now, this quintain gets 5 chances to hit you for 3 damage each. If it hits every
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 @@ Now, this quintain gets 5 chances to hit you for 3 damage each. If it hits every
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]

View file

@ -293,6 +293,7 @@
type=Fighter
id=student
name=_"Konrad"
current_player=_"Konrad"
canrecruit=yes
side=1
gold=123

View file

@ -1689,6 +1689,11 @@ namespace {
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));