update loadscene for data/textures

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5018 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 7722105e57b6f5db833c032ad99b522fbc5c1ae9
Former-commit-id: 2502d66394e524f92c6a108fcf5b070281ead409
This commit is contained in:
torcs-ng 2012-10-27 11:31:02 +00:00
parent 8a314c030e
commit 4415062891

View file

@ -205,6 +205,7 @@ bool LoadTrack(std::string strTrack)
GfOut("Chemin Track : %s\n", strTrack.c_str());
osgLoader loader;
//osg::ref_ptr<osg::Group> m_sceneroot = new osg::Group;
GfOut("Chemin Textures : %s\n", m_strTexturePath.c_str());
loader.AddSearchPath(m_strTexturePath);
osg::Node *pTrack = loader.Load3dFile(strTrack);
@ -280,8 +281,10 @@ grLoadScene(tTrack *track)
}
std::string strTPath = GetDataDir();
sprintf(buf, "tracks/%s/%s;data/textures;data/img;.", grTrack->category, grTrack->internalname);
strTPath+=buf;
//sprintf(buf, "tracks/%s/%s:", grTrack->category, grTrack->internalname);
//strTPath+=buf;
//sprintf(buf, "%sdata/textures", GetDataDir());
strTPath+="data/textures";
SetTexturePaths(strTPath.c_str());
std::string strPath = GetDataDir();