streamer mode wip

This commit is contained in:
minjaesong
2021-10-06 00:18:39 +09:00
parent 907dc9a936
commit 2c6dc8750a
19 changed files with 82 additions and 57 deletions

View File

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

View File

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