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

Fix offset by one in STYLE_LOCKON camera mode. #189

Merged
merged 2 commits into from
Nov 15, 2013

Conversation

Dovyski
Copy link
Member

@Dovyski Dovyski commented Nov 15, 2013

This pull request fixes the offset by one in STYLE_LOCKON camera mode by replacing ceil() with floor() for the targetX and targetY adjustmentns. As pointed out here, the use of floor() fixes the problem. This change does not interfere with the camera jittering fix, which remains in place and working.

@Dovyski Dovyski mentioned this pull request Nov 15, 2013
Apparently they are not necessary.
IQAndreas added a commit that referenced this pull request Nov 15, 2013
Fix offset by one in STYLE_LOCKON camera mode.
@IQAndreas IQAndreas merged commit 3128ff6 into FlixelCommunity:dev Nov 15, 2013
@WingEraser
Copy link

Lol, I just tested master and we forgot this. Run Mode and see for yourself.
FlxCamera::follow()

deadzone = new FlxRect((width-w)/2,(height-h)/2 - h * 0.25,w,h);

deadzone = new FlxRect((width-w)/2,(height-h)/2,w,h);

@IQAndreas
Copy link
Member

Lol, I just tested master and we forgot this.

http://www.youtube.com/watch?v=WWaLxFIVX1s

Well, I did some digging and found out why that extra bit was added. It seems like the offending commit that was supposed to fix problems with jittering also included changes which fixed a few minor unrelated things in FlxCamera (one of which didn't actually need fixing).

The (hopefully) final pull request can be found at #191, after which I will undo the merge and re-merge with the final changes (I would hate to have ugly commit history in there).

@IQAndreas
Copy link
Member

Lol, I just tested master and we forgot this.

Final camera bug fixed in 064b978

(I was going to close this issue as well, but turns out it's already closed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants