Flexbody 'forsets' typo results in missing mesh
CuriousMike56 opened this issue · comments
A select few mods (one example: https://forum.rigsofrods.org/threads/87-yamaha-yfz350-banshee.3781/) have a typo in their flexbodies section, where forset
is spelled with an S:
flexbodies
7, 2, 86, 0.5, 0.0, 0.25, 0, 180, 0, BanshBody.mesh
forsets 66-71, 0,5,48,45, 54-57, 60-65,10,13,14,17
This was parsed correctly in previous versions, now in 2022.12+ the flexbody no longer appears.
Jesus Christ, another quirk to the list:
void Parser::ParseDirectiveForset()
{
Forset def;
// --------------------------------------------------------------------------------------------
// BEWARE OF QUIRKS in the following code (they must be preserved for backwards compatibility):
// - a space between the 'forset' keyword and arguments is optional.
// - a separator at the end of line will silently add '0' to the node list.
// --------------------------------------------------------------------------------------------
Broken here: af179f2#diff-b84044f869d47736837d3cffd944ce1d6b87bbbc1932abd2f6f8323c6b4e5e57
We have 2 options:
A) Add a new entry to the quirk list: - garbage characters anywhere in the line will silently add 0 to the node list
. and hack the keyword-recognition regex for this single case.
B) Just fix the damn mods (my prefered solution)
@CuriousMike56 Sorry about the outburst above and thanks for filling the report. The forset
is really an odd feature which brought me a lot of grief. I implemented option A above, with some extra fixes.