- fix pb with last commit with fatal error on default.xml not found

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

Former-commit-id: 28cb567de4c4b142c6bf001e65ae7ddf0ea6ae74
Former-commit-id: 6a2dac6fce34a037710d67e696513add5e5b1a67
This commit is contained in:
torcs-ng 2020-05-10 21:53:21 +00:00
parent 5ccf150ff7
commit 53736a35ca
2 changed files with 11 additions and 4 deletions

View file

@ -41,8 +41,11 @@ MyParam::MyParam(void** carparmhandle, const std::string& datadir, const std::st
if (*carparmhandle == NULL)
{
*carparmhandle = GfParmReadFile(defaultfile.c_str(), GFPARM_RMODE_STD);
LogUSR.fatal("Couldn't load : %s", defaultfile.c_str());
LogUSR.info("Couldn't load : %s", trackfile.c_str());
}
if (*carparmhandle == NULL)
LogUSR.fatal("Couldn't load : %s", defaultfile.c_str());
}
else
{
@ -61,13 +64,17 @@ MyParam::MyParam(void** carparmhandle, const std::string& datadir, const std::st
if (*carparmhandle == NULL)
{
*carparmhandle = GfParmReadFile(defaultfilerain.c_str(), GFPARM_RMODE_STD);
LogUSR.info("Couldn't load : %s\n", trackfilerain.c_str());
}
if (*carparmhandle == NULL)
{
*carparmhandle = GfParmReadFile(defaultfile.c_str(), GFPARM_RMODE_STD);
LogUSR.fatal("Couldn't load : %s\n", defaultfile.c_str());
LogUSR.info("Couldn't load : %s\n", defaultfilerain.c_str());
}
if (*carparmhandle == NULL)
LogUSR.fatal("Couldn't load : %s", defaultfile.c_str());
}
mCarParmHandle = *carparmhandle;

View file

@ -75,7 +75,7 @@ void Driver::InitTrack(tTrack* Track, void* carHandle, void** carParmHandle, con
std::string rName;
strncpy( trackname, strrchr(track->filename, '/') + 1, sizeof(trackname) );
*strrchr(trackname, '.') = '\0';
LogUSR.info( " # AXIOM trackName: '%s'\n", trackname );
LogUSR.info( " # USR trackName: '%s'\n", trackname );
tName = trackname;
// Setup for this robot
@ -93,7 +93,7 @@ void Driver::InitTrack(tTrack* Track, void* carHandle, void** carParmHandle, con
cName = carName;
rName = mDriverName;
LogUSR.info( " # AXIOM carName: '%s'\n", carName );
LogUSR.info( " # USR carName: '%s'\n", carName );
Meteorology(track);