Skip to content

Commit

Permalink
Fix missing changes of default score
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Herrera <[email protected]>
  • Loading branch information
Pablete1234 authored Sep 16, 2024
1 parent bf00343 commit 3c509fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/tc/oc/pgm/rotation/pools/VotingPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public double getMapScore(MapInfo map) {
private void tickScores(Match match) {
// If the current map isn't from this pool, ignore ticking
if (!mapScores.containsKey(match.getMap())) return;
mapScores.replaceAll((mapScores, value) -> value > DEFAULT_SCORE
? Math.max(value - constants.scoreDecay(), DEFAULT_SCORE)
: Math.min(value + constants.scoreRise(), DEFAULT_SCORE));
mapScores.replaceAll((mapScores, value) -> value > constants.defaultScore()
? Math.max(value - constants.scoreDecay(), constants.defaultScore())
: Math.min(value + constants.scoreRise(), constants.defaultScore()));
mapScores.put(
match.getMap(), constants.scoreAfterPlay().applyAsDouble(new Context(match.getDuration())));
}
Expand Down

0 comments on commit 3c509fd

Please sign in to comment.