From 7f92c5b8bc9664336901ac56885c426341340375 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 20 May 2006 20:08:05 +0000 Subject: [PATCH] load worldmaps passed on commandline SVN-Revision: 3564 --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c08222462..94045d612 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -479,8 +479,9 @@ int main(int argc, char** argv) init_rand(); // play_demo sets seed, record_demo uses it if(config->start_level.size() > 4 && - config->start_level.compare(config->start_level.size() - 5, 4, ".stwm") == 0) { - main_loop->push_screen(new WorldMapNS::WorldMap(config->start_level)); + config->start_level.compare(config->start_level.size() - 5, 5, ".stwm") == 0) { + main_loop->push_screen(new WorldMapNS::WorldMap( + FileSystem::basename(config->start_level))); } else { std::auto_ptr session ( new GameSession(FileSystem::basename(config->start_level))); -- 2.11.0