Added hardcore client effect
Also fixed multiple world comments issue.
This commit is contained in:
parent
21d835b594
commit
41451100c1
@ -420,7 +420,7 @@ void cProtocol172::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
|
|||||||
{
|
{
|
||||||
cPacketizer Pkt(*this, 0x01); // Join Game packet
|
cPacketizer Pkt(*this, 0x01); // Join Game packet
|
||||||
Pkt.WriteInt(a_Player.GetUniqueID());
|
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.WriteChar((char)a_World.GetDimension());
|
||||||
Pkt.WriteByte(2); // TODO: Difficulty (set to Normal)
|
Pkt.WriteByte(2); // TODO: Difficulty (set to Normal)
|
||||||
Pkt.WriteByte(cRoot::Get()->GetServer()->GetMaxPlayers());
|
Pkt.WriteByte(cRoot::Get()->GetServer()->GetMaxPlayers());
|
||||||
|
@ -284,9 +284,12 @@ void cRoot::LoadWorlds(cIniFile & IniFile)
|
|||||||
} // for i - Worlds
|
} // for i - Worlds
|
||||||
|
|
||||||
if (!FoundAdditionalWorlds)
|
if (!FoundAdditionalWorlds)
|
||||||
|
{
|
||||||
|
if (IniFile.GetKeyComment("Worlds", 0) != " World=secondworld")
|
||||||
{
|
{
|
||||||
IniFile.AddKeyComment("Worlds", " World=secondworld");
|
IniFile.AddKeyComment("Worlds", " World=secondworld");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user