From 931b9116f2081445c57d7a5fb7989156ba41009e Mon Sep 17 00:00:00 2001 From: iobyte Date: Mon, 12 Sep 2022 21:03:32 +0000 Subject: [PATCH] trackgen: go back to using our own search git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8499 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 948fa1a0888ccb30b94e65be3e5a6fe2b6c9bc59 Former-commit-id: 7deeb1ab71be5fba15f1b0e62c79f19a9c3ccbe9 --- src/tools/trackgen/objects.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tools/trackgen/objects.cpp b/src/tools/trackgen/objects.cpp index 3d647cd91..7aedba787 100644 --- a/src/tools/trackgen/objects.cpp +++ b/src/tools/trackgen/objects.cpp @@ -137,7 +137,8 @@ InitObjects(tTrack *track, void *TrackHandle) inputPath.resize(inputPath.find_last_of("/")); snprintf(buf, sizeof(buf), "%s;%sdata/objects", inputPath.c_str(), GfDataDir()); - ssgModelPath(buf); + std::string searchPaths(buf); + ssgModelPath(""); // using our own search snprintf(path, sizeof(path), "%s;%sdata/objects;%sdata/textures;.", inputPath.c_str(), GfDataDir(), GfDataDir()); ssgTexturePath(path); @@ -157,14 +158,16 @@ InitObjects(tTrack *track, void *TrackHandle) exit(1); } - curObj->obj = ssgLoadAC(objName); + char filename[1024]; + GetFilename(objName, searchPaths.c_str(), filename); + curObj->obj = ssgLoadAC(filename); if (!curObj->obj) { exit(1); } - curObj->filename = strdup(buf); + curObj->filename = strdup(filename); ssgFlatten(curObj->obj);