Skip to content

Commit

Permalink
Fixes MMRChange and MMRCumulChange variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Arubinu committed Apr 10, 2022
1 parent a504ff5 commit 9d93171
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions RocketStats/Managements/StatsManagement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,15 @@ void RocketStats::UpdateMMR(UniqueIDWrapper id)
{
float MMRChange = (mmr - stats[current.playlist].myMMR);

always.MMRChange += MMRChange;
always.MMRChange = MMRChange;
session.MMRChange = MMRChange;
stats[current.playlist].MMRChange = MMRChange;
always_gm[current.playlist].MMRChange = MMRChange;

always.MMRCumulChange += MMRChange;
for (auto it = playlist_name.begin(); it != playlist_name.end(); ++it)
{
stats[it->first].MMRCumulChange += MMRChange;
always_gm[it->first].MMRCumulChange += MMRChange;
}
session.MMRCumulChange += MMRChange;
stats[current.playlist].MMRCumulChange += MMRChange;
always_gm[current.playlist].MMRCumulChange += MMRChange;
}
else
stats[current.playlist].isInit = true;
Expand Down Expand Up @@ -201,7 +200,6 @@ void RocketStats::SessionStats()

for (auto it = playlist_name.begin(); it != playlist_name.end(); ++it)
{
tmp.MMRChange += stats[it->first].MMRChange;
tmp.MMRCumulChange += stats[it->first].MMRChange;
tmp.win += stats[it->first].win;
tmp.loss += stats[it->first].loss;
Expand All @@ -212,8 +210,7 @@ void RocketStats::SessionStats()
}

session.myMMR = stats[current.playlist].myMMR;
session.MMRChange = tmp.MMRChange;
session.MMRCumulChange = tmp.MMRCumulChange;
session.MMRChange = stats[current.playlist].MMRChange;
session.win = tmp.win;
session.loss = tmp.loss;
session.demo = tmp.demo;
Expand Down Expand Up @@ -244,4 +241,4 @@ void RocketStats::ResetBasicStats()
{
current.demo = 0;
current.death = 0;
}
}

0 comments on commit 9d93171

Please sign in to comment.