Skip to content

Commit

Permalink
Fixed bug with Camera::centerOn
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidityC committed Dec 5, 2016
1 parent 5bd4510 commit 97beeb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ namespace flat2d
return box;
}

void Camera::centerOn(int x, int y) {
x = x - (w/2);
y = y - (h/2);
void Camera::centerOn(int xpos, int ypos) {
x = xpos - (w/2);
y = ypos - (h/2);

if (x > mapWidth - w) {
x = mapWidth - w;
Expand Down

0 comments on commit 97beeb8

Please sign in to comment.