X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=radiant%2Fqe3.cpp;h=19d1d37c0df4dd1ae45c5f36637faa4d983578eb;hp=c707d5613304b81c9e76b14aa4dfec796c668e7d;hb=898cef614cb5901ed35e1b9da2eb483b038a7e60;hpb=7a0665f15618af649d736d25d8e56bc8eeab8f24 diff --git a/radiant/qe3.cpp b/radiant/qe3.cpp index c707d561..19d1d37c 100644 --- a/radiant/qe3.cpp +++ b/radiant/qe3.cpp @@ -78,22 +78,19 @@ void QE_InitVFS() const char* gamename = gamename_get(); const char* basegame = basegame_get(); -#if defined(POSIX) const char* userRoot = g_qeglobals.m_userEnginePath.c_str(); -#endif const char* globalRoot = EnginePath_get(); // if we have a mod dir if(!string_equal(gamename, basegame)) { -#if defined(POSIX) // ~/./ + if(userRoot) { StringOutputStream userGamePath(256); userGamePath << userRoot << gamename << '/'; GlobalFileSystem().initDirectory(userGamePath.c_str()); } -#endif // / { @@ -103,14 +100,13 @@ void QE_InitVFS() } } -#if defined(POSIX) // ~/./ + if(userRoot) { StringOutputStream userBasePath(256); userBasePath << userRoot << basegame << '/'; GlobalFileSystem().initDirectory(userBasePath.c_str()); } -#endif // / { @@ -175,10 +171,16 @@ void bsp_init() build_set_variable("RadiantPath", AppPath_get()); build_set_variable("ExecutableType", RADIANT_EXECUTABLE); build_set_variable("EnginePath", EnginePath_get()); + build_set_variable("UserEnginePath", g_qeglobals.m_userEnginePath.c_str()); build_set_variable("MonitorAddress", (g_WatchBSP_Enabled) ? "127.0.0.1:39000" : ""); build_set_variable("GameName", gamename_get()); - build_set_variable("MapFile", Map_Name(g_map)); + const char* mapname = Map_Name(g_map); + StringOutputStream name(256); + name << StringRange(mapname, path_get_filename_base_end(mapname)) << ".bsp"; + + build_set_variable("MapFile", mapname); + build_set_variable("BspFile", name.c_str()); } void bsp_shutdown()