From 300ee0183ed200b13a1020a179d48a107061dc3c Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 24 May 2021 10:51:32 -0400 Subject: [PATCH] Add a max initial boost --- src/routes/getSkipSegments.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/getSkipSegments.ts b/src/routes/getSkipSegments.ts index 8b8db40..30c965b 100644 --- a/src/routes/getSkipSegments.ts +++ b/src/routes/getSkipSegments.ts @@ -169,7 +169,7 @@ function getWeightedRandomChoice(choices: T[], amountOf //assign a weight to each choice let totalWeight = 0; let choicesWithWeights: TWithWeight[] = choices.map(choice => { - const boost = Math.min(choice.reputation, Math.max(0, choice.votes * 2)); + const boost = Math.min(choice.reputation, 4); //The 3 makes -2 the minimum votes before being ignored completely //this can be changed if this system increases in popularity.