#include "plugin.h"
ui::Image new_plugin_image( const char* filename ){
++ // NetRadiantCustom look for AppPath (DataPath) plugins dir before GameToolsPath plugins dir.
{
StringOutputStream fullpath( 256 );
- fullpath << AppPath_get() << g_pluginsDir << "bitmaps/" << filename;
+ fullpath << GameToolsPath_get() << g_pluginsDir << "bitmaps/" << filename;
if ( auto image = image_new_from_file_with_mask(fullpath.c_str()) ) return image;
}
build_set_variable( "ExtraQ3map2Args", ExtraQ3map2Args.c_str() );
const char* mapname = Map_Name( g_map );
- StringOutputStream name( 256 );
- name << StringRange( mapname, path_get_filename_base_end( mapname ) ) << ".bsp";
+ std::string name;
+ name.append( mapname, path_get_filename_base_end( mapname ) - mapname );
+ name += ".bsp";
- build_set_variable( "MapFile", mapname );
+ if( region_active ){
+ StringOutputStream name( 256 );
+ name << StringRange( mapname, path_get_filename_base_end( mapname ) ) << ".reg";
+ build_set_variable( "MapFile", name.c_str() );
+ }
+ else{
+ build_set_variable( "MapFile", mapname );
+ }
+
build_set_variable( "BspFile", name.c_str() );
}