Skip to content

Conversation

Pirulax
Copy link
Contributor

@Pirulax Pirulax commented Aug 6, 2018

Small'n'Easy to test.
Fixes the OOP version of getElementBoudingBox.

  1. Now it returns 2 vectors if MinClientReqCheck passed
  2. Now it's available as a class variable too

@Pirulax
Copy link
Contributor Author

Pirulax commented Aug 6, 2018

Also, please see the header file, I left a comment there, please help me out with that :)

LUA_DECLARE(GetElementDimension);
LUA_DECLARE(GetElementZoneName);
LUA_DECLARE(GetElementBoundingBox);
LUA_DECLARE_OOP(GetElementBoundingBox);// Probably wrong, tell me how to declare the OOP version of this.
Copy link
Contributor

@patrikjuvonen patrikjuvonen Aug 6, 2018

Choose a reason for hiding this comment

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

This is ok. You should remove LUA_DECLARE(GetElementBoundingBox) as LUA_DECLARE_OOP(GetElementBoundingBox) automatically does both. This duplicate declaration causes a compile error C2535.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I'll remove it.

@patrikjuvonen patrikjuvonen added the bug Something isn't working label Aug 6, 2018
@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 6, 2018
LUA_DECLARE(GetElementDimension);
LUA_DECLARE(GetElementZoneName);
LUA_DECLARE(GetElementBoundingBox);
LUA_DECLARE_OOP(GetElementBoundingBox);// Probably wrong, tell me how to declare the OOP version of this.
Copy link
Contributor

@patrikjuvonen patrikjuvonen Aug 6, 2018

Choose a reason for hiding this comment

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

No, you did it the other way around :)

Remove LUA_DECLARE(GetElementBoundingBox), keep LUA_DECLARE_OOP(GetElementBoundingBox).

For your reference, this is how they work:

#define LUA_DECLARE(x) static int x ( lua_State * luaVM );
#define LUA_DECLARE_OOP(x) LUA_DECLARE(x) LUA_DECLARE(OOP_##x)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, alright, thanks :)

@Addlibs
Copy link
Contributor

Addlibs commented Aug 6, 2018

I think the 510990e (min_mta_version tag in meta) solution is more elegant than a bool argument for legacy style

@patrikjuvonen
Copy link
Contributor

patrikjuvonen commented Aug 7, 2018

Reminder for committer: MIN_CLIENT_REQ_GETBOUNDINGBOX_OOP needs to be bumped before merge.

@qaisjp qaisjp merged commit 6ac18eb into multitheftauto:master Aug 10, 2018
@qaisjp
Copy link
Contributor

qaisjp commented Aug 10, 2018

Thank you!

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.

4 participants