diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/StarboundClient.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/StarboundClient.kt index 5bfdfac8..abd62afe 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/StarboundClient.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/StarboundClient.kt @@ -753,7 +753,8 @@ class StarboundClient : Closeable { private val layers = LayeredRenderer(this) private var dotsIndex = 0 - private val dotTime = 4 + private val dotTime = 7 + private var dotCountdown = dotTime private var dotInc = 1 private fun drawPerformanceBasic(onlyMemory: Boolean) { @@ -828,19 +829,22 @@ class StarboundClient : Closeable { builder.builder.begin(GeometryType.QUADS) - dotsIndex += dotInc + if (dotCountdown-- <= 0) { + dotCountdown = dotTime + dotsIndex += dotInc - if (dotsIndex < 0) { - dotsIndex = 1 - dotInc = 1 - } else if (dotsIndex > dotTime * 3) { - dotsIndex = dotTime * 3 - 1 - dotInc = -1 + if (dotsIndex < 0) { + dotsIndex = 1 + dotInc = 1 + } else if (dotsIndex >= 3) { + dotsIndex = 1 + dotInc = -1 + } } - val a = if (dotsIndex / dotTime == 0) RGBAColor.SLATE_GRAY else RGBAColor.WHITE - val b = if (dotsIndex / dotTime == 1) RGBAColor.SLATE_GRAY else RGBAColor.WHITE - val c = if (dotsIndex / dotTime == 2) RGBAColor.SLATE_GRAY else RGBAColor.WHITE + val a = if (dotsIndex == 0) RGBAColor.SLATE_GRAY else RGBAColor.WHITE + val b = if (dotsIndex == 1) RGBAColor.SLATE_GRAY else RGBAColor.WHITE + val c = if (dotsIndex == 2) RGBAColor.SLATE_GRAY else RGBAColor.WHITE builder.builder.vertex(viewportWidth * 0.5f - size - size * 4f, viewportHeight * 0.5f - size).color(a) builder.builder.vertex(viewportWidth * 0.5f + size - size * 4f, viewportHeight * 0.5f - size).color(a)