summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-06-29 01:40:15 +0200
committerHowaner <franzi.moos@googlemail.com>2014-06-29 01:40:15 +0200
commit50e112788bc46460ec2c1972f811264c1a9b04cc (patch)
tree0e2fe234f7538a3f0da2bca1ba3e0dcc411a8e1e
parentMerge pull request #1132 from mc-server/RemoveMD5 (diff)
downloadcuberite-50e112788bc46460ec2c1972f811264c1a9b04cc.tar
cuberite-50e112788bc46460ec2c1972f811264c1a9b04cc.tar.gz
cuberite-50e112788bc46460ec2c1972f811264c1a9b04cc.tar.bz2
cuberite-50e112788bc46460ec2c1972f811264c1a9b04cc.tar.lz
cuberite-50e112788bc46460ec2c1972f811264c1a9b04cc.tar.xz
cuberite-50e112788bc46460ec2c1972f811264c1a9b04cc.tar.zst
cuberite-50e112788bc46460ec2c1972f811264c1a9b04cc.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp3
-rw-r--r--src/Protocol/Protocol17x.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 95dfaffb2..abe9a86f5 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -361,6 +361,9 @@ void cClientHandle::Authenticate(const AString & a_Name, const AString & a_UUID)
// Send scoreboard data
World->GetScoreBoard().SendTo(*this);
+ // Send statistics
+ SendStatistics(m_Player->GetStatManager());
+
// Delay the first ping until the client "settles down"
// This should fix #889, "BadCast exception, cannot convert bit to fm" error in client
cTimer t1;
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 49fef0b8e..98fabedb2 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -1221,10 +1221,9 @@ void cProtocol172::SendStatistics(const cStatManager & a_Manager)
cPacketizer Pkt(*this, 0x37);
Pkt.WriteVarInt(statCount); // TODO 2014-05-11 xdot: Optimization: Send "dirty" statistics only
- for (unsigned int i = 0; i < (unsigned int)statCount; ++i)
+ for (size_t i = 0; i < (size_t)statCount; ++i)
{
StatValue Value = a_Manager.GetValue((eStatistic) i);
-
const AString & StatName = cStatInfo::GetName((eStatistic) i);
Pkt.WriteString(StatName);