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
This commit is contained in:
iobyte 2022-09-12 21:03:32 +00:00
parent aedb9d1556
commit 931b9116f2

View file

@ -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);