mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
fix: zooming would not properly center the cam if streamers mode is on (2)
This commit is contained in:
@@ -37,7 +37,10 @@ object WorldCamera {
|
||||
// zoomed coords. Currently only being used by the lightmaprenderer.
|
||||
// What about others? We just waste 3/4 of the framebuffer
|
||||
val zoomedX: Int
|
||||
get() = x + (width * zoomSamplePoint).toInt()
|
||||
get() {
|
||||
val t = (if (App.getConfigBoolean("fx_streamerslayout")) App.scr.chatWidth / 2 else 0).toFloat()
|
||||
return x + (width * zoomSamplePoint - (t * (zoom - 1f)) / 2f).toInt()
|
||||
}
|
||||
val zoomedY: Int
|
||||
get() = y + (height * zoomSamplePoint).toInt()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user