diff --git a/source/Protocol/Protocol17x.cpp b/source/Protocol/Protocol17x.cpp index daea7957..d45528c5 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()); diff --git a/source/Root.cpp b/source/Root.cpp index 8ec94629..4760c3ef 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -285,7 +285,10 @@ void cRoot::LoadWorlds(cIniFile & IniFile) if (!FoundAdditionalWorlds) { - IniFile.AddKeyComment("Worlds", " World=secondworld"); + if (IniFile.GetKeyComment("Worlds", 0) != " World=secondworld") + { + IniFile.AddKeyComment("Worlds", " World=secondworld"); + } } }