diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-09-14 00:57:03 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-09-14 00:57:03 +0000 |
commit | 535ac50a68c17e421230875fea05fd1161a92fe6 (patch) | |
tree | 62cddbe1350c775c439da4fde561ee93918f837f /src/main.cpp | |
parent | c4529dbd7b7f8f3ae5009d35010139e7f1b68deb (diff) | |
download | mana-535ac50a68c17e421230875fea05fd1161a92fe6.tar.gz mana-535ac50a68c17e421230875fea05fd1161a92fe6.tar.bz2 mana-535ac50a68c17e421230875fea05fd1161a92fe6.tar.xz mana-535ac50a68c17e421230875fea05fd1161a92fe6.zip |
Fix up the player selection stuff, it's a bit nicer now.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/main.cpp b/src/main.cpp index 127b2a84..0d4b54d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -654,20 +654,9 @@ int main(int argc, char *argv[]) currentDialog = new CharSelectDialog(network, &charInfo, 1 - loginData.sex); - if (options.playername != "") { - charInfo.select(0); - do { - LocalPlayer *player = charInfo.getEntry(); - - if (player && player->getName() == - options.playername) { - options.chooseDefault = true; - break; - } - - charInfo.next(); - } while (charInfo.getPos()); - } + if (((CharSelectDialog*)currentDialog)-> + selectByName(options.playername)) + options.chooseDefault = true; if (options.chooseDefault) ((CharSelectDialog*)currentDialog)->action("ok", NULL); |