We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
If you set a StartPosition in .terrn2 to be 0,0,0 instead of 0, 0, 0 the parser fails and defaults to 512, 0, 512. https://github.com/RigsOfRods/rigs-of-rods/blob/master/source/main/resources/terrn2_fileformat/Terrn2FileFormat.cpp#L78
0,0,0
0, 0, 0
512, 0, 512
This seems to be because the function used to parse this requires space delimited values. https://ogrecave.github.io/ogre/api/1.11/class_ogre_1_1_string_converter.html#a4de896cef79f4620355149a42c43dff6
Just spent a good 10 minutes trying to find out why my terrain wouldn't change its spawn position until I found this.
If not changing how it parses, maybe log a warning to tell the user that the value was not correctly parsed?
The text was updated successfully, but these errors were encountered:
Apparently, Ogre::StringConverter::parseVector3() only accepts spaces as delimiter, see this internal helper: https://github.com/OGRECave/ogre/blob/05b8dd5ce1b3cc90d9b8b00275803d6a2f24e79d/OgreMain/src/OgreStringConverter.cpp#L326. The reason commas+spaces worked is that Ogre::StringConverter* generally ignores trailing garbage when parsing numbers.
Ogre::StringConverter::parseVector3()
Ogre::StringConverter*
Anyway, I'll create our own helper which works better. Thanks for reporting.
Update: I ended up keeping the existing OGRE helpers, just using their error-checking variants and reporting errors.
Sorry, something went wrong.
💡 ConfigFile: log parsing errors for non-trivial values.
56be70b
Fixes RigsOfRods#2837
bc08555
Fixes #2837
Successfully merging a pull request may close this issue.
If you set a StartPosition in .terrn2 to be
0,0,0
instead of0, 0, 0
the parser fails and defaults to512, 0, 512
.https://github.com/RigsOfRods/rigs-of-rods/blob/master/source/main/resources/terrn2_fileformat/Terrn2FileFormat.cpp#L78
This seems to be because the function used to parse this requires space delimited values.
https://ogrecave.github.io/ogre/api/1.11/class_ogre_1_1_string_converter.html#a4de896cef79f4620355149a42c43dff6
Just spent a good 10 minutes trying to find out why my terrain wouldn't change its spawn position until I found this.
If not changing how it parses, maybe log a warning to tell the user that the value was not correctly parsed?
The text was updated successfully, but these errors were encountered: