From 41451100c171af3c21e10141d6651b1ef89477b6 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 7 Nov 2013 22:33:46 +0000 Subject: Added hardcore client effect Also fixed multiple world comments issue. --- source/Protocol/Protocol17x.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/Protocol') diff --git a/source/Protocol/Protocol17x.cpp b/source/Protocol/Protocol17x.cpp index daea79578..d45528c5f 100644 --- a/source/Protocol/Protocol17x.cpp +++ b/source/Protocol/Protocol17x.cpp @@ -420,7 +420,7 @@ void cProtocol172::SendLogin(const cPlayer & a_Player, const cWorld & a_World) { cPacketizer Pkt(*this, 0x01); // Join Game packet Pkt.WriteInt(a_Player.GetUniqueID()); - Pkt.WriteByte((Byte)a_Player.GetEffectiveGameMode()); + Pkt.WriteByte((Byte)a_Player.GetEffectiveGameMode() | (cRoot::Get()->GetServer()->IsHardcore() ? 0x08 : 0)); // Hardcore flag bit 4 Pkt.WriteChar((char)a_World.GetDimension()); Pkt.WriteByte(2); // TODO: Difficulty (set to Normal) Pkt.WriteByte(cRoot::Get()->GetServer()->GetMaxPlayers()); -- cgit v1.2.3