Commit c25ec303 authored by nanahira's avatar nanahira

Merge branch 'skin_fh' into skin

parents ce8a6275 3f7f76fa
......@@ -43,12 +43,12 @@ bool Game::Initialize() {
core::array<core::stringw> skins = skinSystem->listSkins();
size_t count = skins.size();
if(count > 0) {
int index = 0;
int index = -1;
if(gameConf.skin_index < 0)
index = rand() % count;
else if((size_t)gameConf.skin_index <= skins.size())
index = skins.size() - gameConf.skin_index;
if(index)
index = gameConf.skin_index - 1;
if(index >= 0)
skinSystem->applySkin(skins[index].c_str());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment