From b4fabc2717964542bfd81a58fd594533340fc90e Mon Sep 17 00:00:00 2001 From: titiger Date: Mon, 9 Feb 2015 00:41:42 +0100 Subject: [PATCH] map editor: new maps set player name as default author --- source/glest_map_editor/program.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/glest_map_editor/program.cpp b/source/glest_map_editor/program.cpp index 4d1aca48..0fa5d3cb 100644 --- a/source/glest_map_editor/program.cpp +++ b/source/glest_map_editor/program.cpp @@ -14,8 +14,10 @@ #include "util.h" #include #include "platform_util.h" +#include "config.h" using namespace Shared::Util; +using namespace Glest::Game; namespace MapEditor { @@ -154,6 +156,10 @@ Program::Program(int w, int h) { map = new MapPreview(); resetFactions(8); renderer.initMapSurface(w, h); + Config &config = Config::getInstance(); + // set player name as default author + string playerName = config.getString("NetPlayerName",""); + map->setAuthor(playerName); } void Program::init() {