Skip to content
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

Remove magic grabPoint index logic #44

Open
stijnwop opened this issue Feb 21, 2018 · 0 comments
Open

Remove magic grabPoint index logic #44

stijnwop opened this issue Feb 21, 2018 · 0 comments
Assignees

Comments

@stijnwop
Copy link
Owner

stijnwop commented Feb 21, 2018

There are checks all over the place checking if the current index > 1 or the inverted checks.

Fix this by setting the first and last index in the xml. This will also allows it to add more grabPoints.

e.g:

table.insert(grabPoints, index > 1 and self.object.grabPoints[1] or self.object.grabPoints[#self.object.grabPoints])

local moveDir = grabPoint.id > 1 and -1 or 1

Nasty stuff.

@stijnwop stijnwop self-assigned this Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant