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

View File

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

View File

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