Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Return vectors for vehicles component funcs (fixes mantis 9507)"
This reverts commit ee0858e.
- Loading branch information
Showing
2 changed files
with
5 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b47310f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should not be so much reckoning on backward compatibility.
OOP getPosition Methods should always return a vector as other getPosition methods.
b47310f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gatno you are actually right, but I don't think that it's a good idea to do compatibility breaking changes in minor releases.
b47310f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very in inconsistent compared to other OOP
getPosition
methods! I totally agree with @gatno!b47310f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow..... Next step -> Revert "Revert "Return vectors for vehicles component funcs (fixes mantis 9507)""
Thanks. 👍
b47310f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know much about C++ code, but is it possible to return three doubles when the script expects them (treats return values like numbers, uses the three return values, etc.) and a OOP vector when not? That won't break backward compatibility while being as consistent as possible with other OOP methods.
@gatno , regarding to backward compatibility, I think it can be an issue when scripts are compiled, as modifying them by hand to conform to these changes is difficult.
b47310f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexTMjugador
That's not possible without static analysis, unfortunately.
Tbh, imo community scripts shouldn't be compiled, and I doubt any resources on the community make use of this bug (and if they did, there's a high likelihood it is made by an active developer).
b47310f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our plan is to add a meta.xml <min_mta_version> barrier, where below a certain value the old behaviour is used
b47310f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccw808 this sounds like a good idea!
b47310f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, the <min_mta_version> tag seems the perfect balance between complexity, backwards compatibility and OOP functions consistence 👍