Use time-played from database
This commit is contained in:
parent
8ad3cbdff9
commit
8f8d5f8814
@ -86,10 +86,9 @@ Server::Server(const XMLNode& server_info) : m_supports_encrytion(true)
|
||||
std::get<1>(t) = StringUtils::utf8ToWide(username);
|
||||
p.first = StringUtils::toLowerCase(username);
|
||||
player_info->get("scores", &std::get<2>(t));
|
||||
int cur_time = StkTime::getTimeSinceEpoch();
|
||||
player_info->get("connected-since", &cur_time);
|
||||
std::get<3>(t) = (float)(StkTime::getTimeSinceEpoch() - cur_time)
|
||||
/ 60.0f;
|
||||
float time_played = 0.0f;
|
||||
player_info->get("time-played", &time_played);
|
||||
std::get<3>(t) = time_played;
|
||||
m_players.emplace_back(std::move(p));
|
||||
}
|
||||
// Sort by rank
|
||||
|
Loading…
x
Reference in New Issue
Block a user