]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
add [BspFile] to be used in compile command lines to explicitly refer to the .bsp
authorRudolf Polzer <divverent@alientrap.org>
Tue, 14 Dec 2010 21:08:25 +0000 (22:08 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 14 Dec 2010 21:08:25 +0000 (22:08 +0100)
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()