map editor: new maps set player name as default author

This commit is contained in:
titiger 2015-02-09 00:41:42 +01:00
parent 17a412aa9a
commit b4fabc2717
1 changed files with 6 additions and 0 deletions

View File

@ -14,8 +14,10 @@
#include "util.h"
#include <iostream>
#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() {