Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

Commit

Permalink
changed name of variable
Browse files Browse the repository at this point in the history
  • Loading branch information
namidaka authored and namidaka committed Aug 6, 2023
1 parent 565d1c1 commit e2fd767
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Module.Server/Balancing/ClanGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void Add(WeightedCrpgUser user)

public float Weight(float p = MatchBalancer.PowerParameter)
{
float clanGroupSizePenalty = CrpgServerConfiguration.ClanGroupSizePenalty;
float clanGroupSizePenalty = CrpgServerConfiguration.TeamBalancerClanGroupSizePenalty;
return MathHelper.PowerSumBy(Members, u => u.Weight, p) * (1 + Size * clanGroupSizePenalty);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Module.Server/Balancing/MatchBalancer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public GameMatch BannerBalancingWithEdgeCases(GameMatch gameMatch, bool firstBal
// This are failcases in case bannerbalance was not enough
Debug.Print("ratio difference is above 10%");
// to rewrite to work with all penalty values
if (CrpgServerConfiguration.ClanGroupSizePenalty == 0f)
if (CrpgServerConfiguration.TeamBalancerClanGroupSizePenalty == 0f)
{
balancedBannerGameMatch = BalanceTeamOfSimilarSizes(balancedBannerGameMatch, bannerBalance: false, 0.10f);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Module.Server/Common/CrpgServerConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ public static void Init()
public static CrpgRegion Region { get; }
public static string Service { get; }
public static string Instance { get; }
public static float ClanGroupSizePenalty { get; private set; } = 0f;
public static float TeamBalancerClanGroupSizePenalty { get; private set; } = 0f;
public static float ServerExperienceMultiplier { get; private set; } = 1.0f;
public static int RewardTick { get; private set; } = 60;
public static bool TeamBalanceOnce { get; private set; }
public static Tuple<TimeSpan, TimeSpan, TimeZoneInfo>? HappyHours { get; private set; }

[UsedImplicitly]
[ConsoleCommandMethod("crpg_clangroup_size_penalty", "Apply a rating increase to members of the same clan that are playing in the same team")]
[ConsoleCommandMethod("crpg_team_balancer_clan_group_size_penalty", "Apply a rating increase to members of the same clan that are playing in the same team")]
private static void SetClanGroupSizePenalty(string? sizePenaltyStr)
{
if (sizePenaltyStr == null
Expand All @@ -43,7 +43,7 @@ private static void SetClanGroupSizePenalty(string? sizePenaltyStr)
return;
}

ClanGroupSizePenalty = sizePenalty;
TeamBalancerClanGroupSizePenalty = sizePenalty;
Debug.Print($"Set ClanGroup Size Penalty to {sizePenalty}");
}

Expand Down

0 comments on commit e2fd767

Please sign in to comment.