Skip to content

Commit 4e34ba6

Browse files
committed
remove primary breaks that havent started breaking yet on tick post
1 parent ff11290 commit 4e34ba6

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/main/kotlin/com/lambda/interaction/managers/breaking/BreakManager.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,9 @@ object BreakManager : Manager<BreakRequest>(
169169
}
170170

171171
listen<TickEvent.Post>({ Int.MIN_VALUE }) {
172+
if (primaryBreak?.breaking == false) primaryBreak = null
172173
breakInfos.forEach { it?.tickChecks() }
173-
if (breakCooldown > 0) {
174-
breakCooldown--
175-
}
174+
if (breakCooldown > 0) breakCooldown--
176175
activeRequest = null
177176
breaks = mutableListOf()
178177
breaksThisTick = 0
@@ -396,7 +395,7 @@ object BreakManager : Manager<BreakRequest>(
396395
}
397396

398397
breaks = newBreaks
399-
.take(buildConfig.maxPendingActions - request.pendingInteractions.size.coerceAtLeast(0))
398+
.take((buildConfig.maxPendingActions - request.pendingInteractions.size).coerceAtLeast(0))
400399
.toMutableList()
401400

402401
maxBreaksThisTick = breakConfig.breaksPerTick

0 commit comments

Comments
 (0)