Skip to content

Commit

Permalink
balance: Reverted ef91605 because it wasn't really doing anything. Im…
Browse files Browse the repository at this point in the history
…plemented it properly this time.
  • Loading branch information
MinoMino committed Jan 25, 2016
1 parent b0087d1 commit 000f4ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,16 @@ def fetch_ratings(self, players, request_id):
p[gt]["time"] = t
p[gt]["local"] = False
self.ratings[sid][gt] = p[gt]
if self.ratings[sid][gt]["elo"] == 0 and self.ratings[sid][gt]["games"] == 0:
self.ratings[sid][gt]["elo"] = DEFAULT_RATING

if sid in players and gt == players[sid]:
# The API gave us the game type we wanted, so we remove it.
del players[sid]

# Fill the rest of the game types the API didn't return but supports.
for gt in SUPPORTED_GAMETYPES:
if gt not in self.ratings[sid] or (gt in self.ratings[sid] and self.ratings[sid][gt] == 0):
if gt not in self.ratings[sid]:
self.ratings[sid][gt] = {"games": -1, "elo": DEFAULT_RATING, "local": False, "time": time.time()}

# If the API didn't return all the players, we set them to the default rating.
Expand Down

3 comments on commit 000f4ef

@Yakumounr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mod this so if someone rage quits in the last round, it does not spec the bottom player on the other team, it's really unfair to get penalised that way.

@cstewart90
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yakumounr The balance plugin does not move players to spectator to balance teams. That is some other plugin which does that, either autospec or mybalance by @dsverdlo (iouonegirl).

@Yakumounr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks, I didn't know what the server was running and never really looked into the .py, sorry.

Please sign in to comment.