X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FDevtools%2FConsoleCmds.cpp;h=b11e12a7fb528b2b43e9ac62bf56fe3572afa239;hb=eae73ddd7a006ee6de9ffb01f3ec5f8e5fdc6d85;hp=b9aabcc4dd812757d221d5272bf7deed4c9259d4;hpb=a3f060d7e5508cd032c4f1c320033a74e5d84009;p=lugaru.git diff --git a/Source/Devtools/ConsoleCmds.cpp b/Source/Devtools/ConsoleCmds.cpp index b9aabcc..b11e12a 100644 --- a/Source/Devtools/ConsoleCmds.cpp +++ b/Source/Devtools/ConsoleCmds.cpp @@ -163,7 +163,14 @@ void ch_quit(const char *) void ch_map(const char *args) { - Loadlevel(args); + if (!LoadLevel(args)) { + // FIXME: Reduce code duplication with GameTick (should come from a Console class) + for (int k = 14; k >= 1; k--) { + consoletext[k] = consoletext[k - 1]; + } + consoletext[0] = std::string("Could not load the requested level '") + args + "', aborting."; + consoleselected = 0; + } whichlevel = -2; campaign = 0; }