]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/qe3.cpp
add [BspFile] to be used in compile command lines to explicitly refer to the .bsp
[xonotic/netradiant.git] / radiant / qe3.cpp
index c707d5613304b81c9e76b14aa4dfec796c668e7d..67ffebeccb3d38e5a88405cbe307b1821f30959a 100644 (file)
@@ -178,7 +178,12 @@ void bsp_init()
   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()