diff --git a/tools/Forge/Bundles/MapEdit/Project.h b/tools/Forge/Bundles/MapEdit/Project.h index 15c56ca35..488495386 100644 --- a/tools/Forge/Bundles/MapEdit/Project.h +++ b/tools/Forge/Bundles/MapEdit/Project.h @@ -89,6 +89,7 @@ extern id project_i; // // methods to query the project file // +- (NSString *) baseDirectoryPath; - (NSString *) getMapDirectory; - (NSString *) getFinalMapDirectory; - (NSString *) getProgDirectory; diff --git a/tools/Forge/Bundles/MapEdit/Project.m b/tools/Forge/Bundles/MapEdit/Project.m index 1a2b41a83..fd2df2f19 100644 --- a/tools/Forge/Bundles/MapEdit/Project.m +++ b/tools/Forge/Bundles/MapEdit/Project.m @@ -344,6 +344,11 @@ id project_i; return nil; } +- (NSString *) baseDirectoryPath +{ + return basepathinfo_i; +} + - (NSString *) getMapDirectory { return path_mapdirectory; diff --git a/tools/Forge/Bundles/MapEdit/TexturePalette.m b/tools/Forge/Bundles/MapEdit/TexturePalette.m index 1c251f9ed..9e827c358 100644 --- a/tools/Forge/Bundles/MapEdit/TexturePalette.m +++ b/tools/Forge/Bundles/MapEdit/TexturePalette.m @@ -8,6 +8,7 @@ #include "TexturePalette.h" #include "Preferences.h" +#include "Project.h" #include "Map.h" #include "Entity.h" #include "QuakeEd.h" @@ -191,7 +192,7 @@ TEX_InitFromWad (const char *path) start = Sys_DoubleTime (); - newpath = [[preferences_i getProjectPath] cString]; + newpath = [[project_i baseDirectoryPath] cString]; newpath = va ("%s%s%s", newpath, (newpath[0] ? "/" : ""), path); // free any textures