trackgen: work around visual studio tellg/seekg bug when reading file with unix line endings
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9101 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: abb0ee47ed6230b5766471a1417b449bb654a38d Former-commit-id: 1f668d48959d371da8730087dbca0a24dff0dcbf
This commit is contained in:
parent
ff2a716f17
commit
7c604b544e
2 changed files with 3 additions and 3 deletions
|
@ -1058,7 +1058,7 @@ void Ac3d::addDefaultMaterial()
|
|||
|
||||
void Ac3d::readFile(const std::string &fileName)
|
||||
{
|
||||
std::ifstream fin(fileName);
|
||||
std::ifstream fin(fileName, std::ios::binary);
|
||||
|
||||
if (!fin)
|
||||
throw Exception("Couldn't open file");
|
||||
|
@ -1082,7 +1082,7 @@ void Ac3d::readFile(const std::string &fileName)
|
|||
|
||||
tokenizeLine(line, tokens);
|
||||
|
||||
if (tokens.empty())
|
||||
if (tokens.empty() || tokens[0].empty())
|
||||
continue;
|
||||
if (tokens.at(0) == "MATERIAL")
|
||||
materials.emplace_back(tokens);
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
|
||||
//! Constructor.
|
||||
Application::Application()
|
||||
: GfApplication("TrackGen", "1.6.0.30", "Terrain generator for tracks")
|
||||
: GfApplication("TrackGen", "1.6.0.31", "Terrain generator for tracks")
|
||||
, HeightSteps(30)
|
||||
, Bump(false)
|
||||
, Raceline(false)
|
||||
|
|
Loading…
Reference in a new issue