Skip to content

Commit bd51320

Browse files
authored
Merge pull request #164 from runejs/fix-zoom-limits
fix: clamp zoom between allowed values
2 parents 3ab57cf + 1aea8c0 commit bd51320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/runejs/client/scene/camera/SphericalCamera.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public int getZoom() {
7171
}
7272

7373
public void setZoom(int zoom) {
74-
this.zoom = zoom;
74+
this.zoom = Math.max(150, Math.min(zoom, 1600));
7575
}
7676

7777
/**

0 commit comments

Comments
 (0)