Browse Source

General bug fixes

pull/3/head
Jessica James 9 years ago
parent
commit
7bc73621da
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 2
      RenX.Core/RenX_LadderDatabase.cpp
  3. 13
      RenX.Core/RenX_Tags.cpp
  4. 2
      RenX.Ladder/RenX_Ladder.cpp

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

2
RenX.Core/RenX_LadderDatabase.cpp

@ -460,7 +460,7 @@ void RenX::LadderDatabase::updateLadder(RenX::Server *server, const RenX::TeamTy
{ {
Jupiter::StringS str = Jupiter::StringS::Format("Ladder: %u entries sorted in %f seconds; Database written in %f seconds." ENDL, Jupiter::StringS str = Jupiter::StringS::Format("Ladder: %u entries sorted in %f seconds; Database written in %f seconds." ENDL,
RenX::LadderDatabase::getEntries(), RenX::LadderDatabase::getEntries(),
static_cast<double>(sort_duration.count()) * (static_cast<double>(std::chrono::steady_clock::duration::period::num / static_cast<double>(std::chrono::steady_clock::duration::period::den) * static_cast<double>(std::chrono::seconds::duration::period::den / std::chrono::seconds::duration::period::num))), static_cast<double>(sort_duration.count()) * (static_cast<double>(std::chrono::steady_clock::duration::period::num) / static_cast<double>(std::chrono::steady_clock::duration::period::den) * static_cast<double>(std::chrono::seconds::duration::period::den / std::chrono::seconds::duration::period::num)),
static_cast<double>(write_duration.count()) * (static_cast<double>(std::chrono::steady_clock::duration::period::num) / static_cast<double>(std::chrono::steady_clock::duration::period::den) * static_cast<double>(std::chrono::seconds::duration::period::den / std::chrono::seconds::duration::period::num))); static_cast<double>(write_duration.count()) * (static_cast<double>(std::chrono::steady_clock::duration::period::num) / static_cast<double>(std::chrono::steady_clock::duration::period::den) * static_cast<double>(std::chrono::seconds::duration::period::den / std::chrono::seconds::duration::period::num)));
str.println(stdout); str.println(stdout);
server->sendLogChan(str); server->sendLogChan(str);

13
RenX.Core/RenX_Tags.cpp

@ -518,7 +518,6 @@ void TagsImp::processTags(Jupiter::StringType &msg, const RenX::LadderDatabase::
{ {
size_t index; size_t index;
uint32_t total_tied_games = entry.total_wins - entry.total_gdi_wins - entry.total_nod_wins; uint32_t total_tied_games = entry.total_wins - entry.total_gdi_wins - entry.total_nod_wins;
uint32_t total_nontied_games = entry.total_games - total_tied_games;
PROCESS_TAG(this->INTERNAL_NAME_TAG, entry.most_recent_name); PROCESS_TAG(this->INTERNAL_NAME_TAG, entry.most_recent_name);
PROCESS_TAG(this->INTERNAL_STEAM_TAG, Jupiter::StringS::Format("%llu", entry.steam_id)); PROCESS_TAG(this->INTERNAL_STEAM_TAG, Jupiter::StringS::Format("%llu", entry.steam_id));
@ -544,13 +543,13 @@ void TagsImp::processTags(Jupiter::StringType &msg, const RenX::LadderDatabase::
PROCESS_TAG(this->INTERNAL_GDI_WINS_TAG, Jupiter::StringS::Format("%u", entry.total_gdi_wins)); PROCESS_TAG(this->INTERNAL_GDI_WINS_TAG, Jupiter::StringS::Format("%u", entry.total_gdi_wins));
PROCESS_TAG(this->INTERNAL_NOD_WINS_TAG, Jupiter::StringS::Format("%u", entry.total_nod_wins)); PROCESS_TAG(this->INTERNAL_NOD_WINS_TAG, Jupiter::StringS::Format("%u", entry.total_nod_wins));
PROCESS_TAG(this->INTERNAL_TIES_TAG, Jupiter::StringS::Format("%u", total_tied_games)); PROCESS_TAG(this->INTERNAL_TIES_TAG, Jupiter::StringS::Format("%u", total_tied_games));
PROCESS_TAG(this->INTERNAL_LOSSES_TAG, Jupiter::StringS::Format("%u", total_nontied_games - entry.total_wins)); PROCESS_TAG(this->INTERNAL_LOSSES_TAG, Jupiter::StringS::Format("%u", entry.total_games - entry.total_wins));
PROCESS_TAG(this->INTERNAL_GDI_LOSSES_TAG, Jupiter::StringS::Format("%u", total_nontied_games - entry.total_gdi_wins)); PROCESS_TAG(this->INTERNAL_GDI_LOSSES_TAG, Jupiter::StringS::Format("%u", entry.total_gdi_games - entry.total_gdi_wins));
PROCESS_TAG(this->INTERNAL_NOD_LOSSES_TAG, Jupiter::StringS::Format("%u", total_nontied_games - entry.total_nod_wins)); PROCESS_TAG(this->INTERNAL_NOD_LOSSES_TAG, Jupiter::StringS::Format("%u", entry.total_nod_games - entry.total_nod_wins));
PROCESS_TAG(this->INTERNAL_WIN_LOSS_RATIO_TAG, Jupiter::StringS::Format("%.2f", get_ratio(static_cast<double>(entry.total_wins), static_cast<double>(total_nontied_games - entry.total_wins)))); PROCESS_TAG(this->INTERNAL_WIN_LOSS_RATIO_TAG, Jupiter::StringS::Format("%.2f", get_ratio(static_cast<double>(entry.total_wins), static_cast<double>(entry.total_games - entry.total_wins))));
PROCESS_TAG(this->INTERNAL_GDI_WIN_LOSS_RATIO_TAG, Jupiter::StringS::Format("%.2f", get_ratio(static_cast<double>(entry.total_gdi_wins), static_cast<double>(total_nontied_games - entry.total_gdi_wins)))); PROCESS_TAG(this->INTERNAL_GDI_WIN_LOSS_RATIO_TAG, Jupiter::StringS::Format("%.2f", get_ratio(static_cast<double>(entry.total_gdi_wins), static_cast<double>(entry.total_gdi_games - entry.total_gdi_wins))));
PROCESS_TAG(this->INTERNAL_NOD_WIN_LOSS_RATIO_TAG, Jupiter::StringS::Format("%.2f", get_ratio(static_cast<double>(entry.total_nod_wins), static_cast<double>(total_nontied_games - entry.total_nod_wins)))); PROCESS_TAG(this->INTERNAL_NOD_WIN_LOSS_RATIO_TAG, Jupiter::StringS::Format("%.2f", get_ratio(static_cast<double>(entry.total_nod_wins), static_cast<double>(entry.total_nod_games - entry.total_nod_wins))));
PROCESS_TAG(this->INTERNAL_BEACON_PLACEMENTS_TAG, Jupiter::StringS::Format("%u", entry.total_beacon_placements)); PROCESS_TAG(this->INTERNAL_BEACON_PLACEMENTS_TAG, Jupiter::StringS::Format("%u", entry.total_beacon_placements));
PROCESS_TAG(this->INTERNAL_BEACON_DISARMS_TAG, Jupiter::StringS::Format("%u", entry.total_beacon_disarms)); PROCESS_TAG(this->INTERNAL_BEACON_DISARMS_TAG, Jupiter::StringS::Format("%u", entry.total_beacon_disarms));
PROCESS_TAG(this->INTERNAL_PROXY_PLACEMENTS_TAG, Jupiter::StringS::Format("%u", entry.total_proxy_placements)); PROCESS_TAG(this->INTERNAL_PROXY_PLACEMENTS_TAG, Jupiter::StringS::Format("%u", entry.total_proxy_placements));

2
RenX.Ladder/RenX_Ladder.cpp

@ -48,7 +48,7 @@ void RenX_LadderPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winT
if (server->hasSeenStart() && server->players.size() != server->getBotCount()) // the first game doesn't count! if (server->hasSeenStart() && server->players.size() != server->getBotCount()) // the first game doesn't count!
{ {
char chr = static_cast<char>(team); char chr = static_cast<char>(team);
server->varData.set(this->name, "t"_jrs, Jupiter::ReferenceString(chr)); server->varData.set(this->name, "t"_jrs, Jupiter::ReferenceString(&chr, 1));
server->varData.set(this->name, "w"_jrs, "1"_jrs); server->varData.set(this->name, "w"_jrs, "1"_jrs);
server->updateClientList(); server->updateClientList();
} }

Loading…
Cancel
Save