Skip to content

Commit

Permalink
mpleaderboards are 100% broken
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 30, 2018
1 parent 0e4d75c commit ad12946
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ t.JudgmentMessageCommand = function(self, params)
local old = curScore.curWifeScore
curScore.curWifeScore = notShit.floor(params.WifePercent * 100) / 10000
if isMulti then
multiScores = NSMAN:GetMPLeaderboard()
scoreboard = NSMAN:GetMPLeaderboard()
end
if old ~= curScore.curWifeScore then
table.sort(scoreboard, sortFunction)
Expand Down
6 changes: 3 additions & 3 deletions src/NetworkSyncManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ std::map<std::string, ETTServerMessageTypes> ettServerMessageMap = {
{ "chat", ettps_recievechat },
{ "login", ettps_loginresponse },
{ "score", ettps_recievescore },
{ "leaderboard", ettps_gameplayleaderboard },
{ "leaderboard", ettps_mpleaderboardupdate },
{ "createroom", ettps_createroomresponse },
{ "enterroom", ettps_enterroomresponse },
{ "selectchart", ettps_selectchart },
Expand Down Expand Up @@ -823,7 +823,7 @@ ETTProtocol::Update(NetworkSyncManager* n, float fDeltaTime)
msg.SetParam("type", type);
MESSAGEMAN->Broadcast(msg);
} break;
case ettps_gameplayleaderboard: {
case ettps_mpleaderboardupdate: {
auto& scores = (*payload)["scores"];
for (json::iterator it = scores.begin(); it != scores.end();
++it) {
Expand Down Expand Up @@ -1047,7 +1047,7 @@ ETTProtocol::SendMPLeaderboardUpdate(float wife, RString& jdgstr)
if (ws == nullptr)
return;
json j;
j["type"] = ettClientMessageMap[ettpc_mpleaderboardupdate];
j["type"] = "leaderboard";
auto& payload = j["payload"];
payload["wife"] = wife;
payload["jdgstr"] = jdgstr;
Expand Down
2 changes: 1 addition & 1 deletion src/NetworkSyncManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ enum ETTServerMessageTypes
ettps_loginresponse,
ettps_roomlist,
ettps_recievescore,
ettps_gameplayleaderboard,
ettps_mpleaderboardupdate,
ettps_createroomresponse,
ettps_enterroomresponse,
ettps_selectchart,
Expand Down

0 comments on commit ad12946

Please sign in to comment.