Revert "Wesnothd/Game: removed unused mp_game_title attribute from level data"

This reverts commit 252e774433. Turns out the key is used
by replays.wesnoth.org and not the client. The name= key accessible otherwise is only
temporary data sent by the server, whereas this key is saved in the replay.
This commit is contained in:
Charles Dang 2017-12-15 23:42:07 +11:00
parent 8ad14255e1
commit ddd8d81d81

View file

@ -1761,6 +1761,10 @@ void game::save_replay()
std::stringstream replay_data;
try {
// level_.set_attr_dup("label", name.str().c_str());
// Used by replays.wesnoth.org as of December 2017. No client usecases.
level_.set_attr_dup("mp_game_title", name_.c_str());
const bool has_old_replay = level_.child("replay") != nullptr;
// If there is already a replay in the level_, which means this is a reloaded game,