Revert "Fix team_info::side_name() returning wrong type"

This reverts commit 89ef1d318a7f219586ee894da46514dbb312cfe7.

That commit made side_name() return a wrong value in case
current_player changed during a game.
This commit is contained in:
gfgtdf 2016-03-09 16:12:20 +01:00
parent 49ee9daad7
commit d424911eeb
2 changed files with 1 additions and 4 deletions

View File

@ -127,9 +127,6 @@ void team::team_info::read(const config &cfg)
side_name = cfg["side_name"];
save_id = cfg["save_id"].str();
current_player = cfg["current_player"].str();
if(side_name.empty()) {
side_name = current_player;
}
countdown_time = cfg["countdown_time"].str();
action_bonus_count = cfg["action_bonus_count"];
flag = cfg["flag"].str();

View File

@ -303,7 +303,7 @@ public:
void set_flag(const std::string& flag) { info_.flag = flag; }
void set_flag_icon(const std::string& flag_icon) { info_.flag_icon = flag_icon; }
const t_string& side_name() const { return info_.side_name; }
const std::string& side_name() const { return info_.side_name.empty() ? info_.current_player : info_.side_name.str(); }
//Returns true if the hex is shrouded/fogged for this side, or
//any other ally with shared vision.
bool shrouded(const map_location& loc) const;