fix: zooming would not properly center the cam if streamers mode is on (2)

This commit is contained in:
minjaesong
2024-03-01 18:21:22 +09:00
parent 7d38ba866c
commit ddfa2f5bf0

View File

@@ -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()