map editor: new maps set player name as default author
This commit is contained in:
parent
17a412aa9a
commit
b4fabc2717
|
@ -14,8 +14,10 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "platform_util.h"
|
#include "platform_util.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
using namespace Shared::Util;
|
using namespace Shared::Util;
|
||||||
|
using namespace Glest::Game;
|
||||||
|
|
||||||
namespace MapEditor {
|
namespace MapEditor {
|
||||||
|
|
||||||
|
@ -154,6 +156,10 @@ Program::Program(int w, int h) {
|
||||||
map = new MapPreview();
|
map = new MapPreview();
|
||||||
resetFactions(8);
|
resetFactions(8);
|
||||||
renderer.initMapSurface(w, h);
|
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() {
|
void Program::init() {
|
||||||
|
|
Loading…
Reference in New Issue