diff options
author | thenecromancer <none@none> | 2010-04-21 19:08:39 +0200 |
---|---|---|
committer | thenecromancer <none@none> | 2010-04-21 19:08:39 +0200 |
commit | 2d994648a1ceaec9a6a9e116349de952a6c8dc1a (patch) | |
tree | 29c56a7fd1d8f92aeced8b7dc0249cd1560b9fd4 | |
parent | 3d52a41e6b0293614d118824f638aa50ab4ba985 (diff) |
Don't loose arena points in case of rating lower than 1000 ( don't know if this is season dependant, as it was quite hard to loose that much rating )
--HG--
branch : trunk
-rw-r--r-- | src/game/ArenaTeam.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp index 0a7648030af..64fb4626a57 100644 --- a/src/game/ArenaTeam.cpp +++ b/src/game/ArenaTeam.cpp @@ -550,7 +550,7 @@ uint32 ArenaTeam::GetPoints(uint32 MemberRating) if (rating <= 1500) { - if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) < 5) + if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) < 6) points = (float)rating * 0.22f + 14.0f; else points = 344; @@ -620,8 +620,13 @@ int32 ArenaTeam::LostAgainst(uint32 againstRating) // called when the team has lost //'chance' calculation - to loose to the opponent float chance = GetChanceAgainst(m_stats.rating, againstRating); - float K = (m_stats.rating < 1000) ? 48.0f : 32.0f; - // calculate the rating modification (ELO system with k=32 or k=48 if rating<1000) + if (m_stats.rating < 1000) + { + FinishGame(0); + return 0; + } + + float K = 32.0f; int32 mod = (int32)ceil(K * (0.0f - chance)); // modify the team stats accordingly FinishGame(mod); |