Skip to content

Backward compatibility fix for OOP_GetElementBoundingBox returning vectors post-r13998 #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 22, 2018

Conversation

Addlibs
Copy link
Contributor

@Addlibs Addlibs commented Aug 22, 2018

After #305 was merged, getBoundingBox OOP method started returning vectors in old code when run on the new client, instead of returning 6 floats as was previously the case.
The backward compatibility check was inverted, as the function returned the 6 legacy floats if min_mta_version was higher than r13999 where it should do so only if it was lower. Additionally, it lacked any warnings or info about this change in behaviour.

This PR fixes MinClientReqCheck which was wrong way round in OOP_GetElementBoundingBox.

It also adds a warning on the server console about modified functionality after 1.5.5-9.13999, consistent with getComponentPosition and getComponentRotation OOP return modifications.

WARNING: resource/scriptfile (Line x) [Client] getBoundingBox will return 6 floats instead of 2 Vector3 because <min_mta_version> Client setting in meta.xml is below 1.5.5-9.13999

New behaviour:
OOP getBoundingBox() method will continue to return 6 floats unless min_mta_version client is set to 1.5.5-9.13999 or higher in the meta.xml, in which case it'll return vectors

@patrikjuvonen patrikjuvonen added the bug Something isn't working label Aug 22, 2018
@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 22, 2018
@qaisjp qaisjp requested a review from patrikjuvonen August 22, 2018 17:19
@qaisjp qaisjp self-assigned this Aug 22, 2018
Copy link
Contributor

@qaisjp qaisjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but requesting a review from @patrikjuvonen as he reviewed the previous PR

@patrikjuvonen
Copy link
Contributor

patrikjuvonen commented Aug 22, 2018

I should've been more explicit on what I reviewed in the previous PR. I only reviewed the part he requested to be commented on, I wasn't reviewing the whole PR. It will take me a while to get to this PR but I'll keep this PR in mind.

@qaisjp
Copy link
Contributor

qaisjp commented Aug 22, 2018

Oh okay. No problem. In that case am I okay to dismiss your review request?

@patrikjuvonen
Copy link
Contributor

Feel free to dismiss my review request. My apologies for any inconvenience.

@qaisjp
Copy link
Contributor

qaisjp commented Aug 22, 2018

don't worry about it

@qaisjp qaisjp merged commit 2918d95 into multitheftauto:master Aug 22, 2018
@Addlibs Addlibs deleted the OOP_GetElementBoundingBox branch April 2, 2020 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants