From be4a5a0803e17e5e7a54fb8ef98935d022846c0f Mon Sep 17 00:00:00 2001 From: jan64 Date: Sun, 7 Jun 2015 15:21:18 +0200 Subject: Fix incorrent experience sending for 1.7 clients --- src/Protocol/Protocol17x.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index e043698dd..3d96071b5 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1105,8 +1105,8 @@ void cProtocol172::SendExperience (void) cPacketizer Pkt(*this, 0x1f); // Experience Packet cPlayer * Player = m_Client->GetPlayer(); Pkt.WriteBEFloat(Player->GetXpPercentage()); - Pkt.WriteBEInt16(static_cast(std::max(Player->GetXpLevel(), std::numeric_limits::max()))); - Pkt.WriteBEInt16(static_cast(std::max(Player->GetCurrentXp(), std::numeric_limits::max()))); + Pkt.WriteBEInt16(static_cast(std::min(Player->GetXpLevel(), std::numeric_limits::max()))); + Pkt.WriteBEInt16(static_cast(std::min(Player->GetCurrentXp(), std::numeric_limits::max()))); } -- cgit v1.2.3