mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 04:54:05 +09:00
streamer mode wip
This commit is contained in:
@@ -167,8 +167,8 @@ object LightmapRenderer {
|
||||
|
||||
for_x_end = for_x_start + WorldCamera.zoomedWidth / TILE_SIZE + 3
|
||||
for_y_end = for_y_start + WorldCamera.zoomedHeight / TILE_SIZE + 3 // same fix as above
|
||||
for_draw_x_end = for_draw_x_start + WorldCamera.width / TILE_SIZE + 1 + LIGHTMAP_OVERRENDER
|
||||
for_draw_y_end = for_draw_y_start + WorldCamera.height / TILE_SIZE + 1 + LIGHTMAP_OVERRENDER
|
||||
for_draw_x_end = for_draw_x_start + WorldCamera.width / TILE_SIZE + 3 + LIGHTMAP_OVERRENDER
|
||||
for_draw_y_end = for_draw_y_start + WorldCamera.height / TILE_SIZE + 3 + LIGHTMAP_OVERRENDER
|
||||
|
||||
camX = WorldCamera.x / TILE_SIZE
|
||||
camY = WorldCamera.y / TILE_SIZE
|
||||
|
||||
@@ -99,7 +99,8 @@ object WorldCamera {
|
||||
|
||||
|
||||
val oldX = x.toFloat()
|
||||
val newX1 = (player.hitbox.centeredX).toFloat() - (width / 2)
|
||||
val newX1 = (player.hitbox.centeredX).toFloat() - (width / 2) +
|
||||
if (App.getConfigBoolean("fx_streamerslayout")) App.scr.chatWidth / 2 else 0
|
||||
val newX2 = newX1 + worldWidth
|
||||
val newX = if (Math.abs(newX1 - oldX) < Math.abs(newX2 - oldX)) newX1 else newX2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user