Merge branch 'master' into WorldLoader
This commit is contained in:
commit
2832685c02
@ -576,7 +576,7 @@ void cProtocol180::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
|
|||||||
// Send the spawn position:
|
// Send the spawn position:
|
||||||
{
|
{
|
||||||
cPacketizer Pkt(*this, 0x05); // Spawn Position packet
|
cPacketizer Pkt(*this, 0x05); // Spawn Position packet
|
||||||
Pkt.WritePosition(a_World.GetSpawnX(), a_World.GetSpawnY(), a_World.GetSpawnZ());
|
Pkt.WritePosition((int)a_World.GetSpawnX(), (int)a_World.GetSpawnY(), (int)a_World.GetSpawnZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the server difficulty:
|
// Send the server difficulty:
|
||||||
@ -633,7 +633,7 @@ void cProtocol180::SendPaintingSpawn(const cPainting & a_Painting)
|
|||||||
cPacketizer Pkt(*this, 0x10); // Spawn Painting packet
|
cPacketizer Pkt(*this, 0x10); // Spawn Painting packet
|
||||||
Pkt.WriteVarInt(a_Painting.GetUniqueID());
|
Pkt.WriteVarInt(a_Painting.GetUniqueID());
|
||||||
Pkt.WriteString(a_Painting.GetName().c_str());
|
Pkt.WriteString(a_Painting.GetName().c_str());
|
||||||
Pkt.WritePosition(PosX, PosY, PosZ);
|
Pkt.WritePosition((int)PosX, (int)PosY, (int)PosZ);
|
||||||
Pkt.WriteChar(a_Painting.GetDirection());
|
Pkt.WriteChar(a_Painting.GetDirection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2493,19 +2493,19 @@ void cWSSAnvil::LoadWolfFromNBT(cEntityList & a_Entities, const cParsedNBT & a_N
|
|||||||
LoadWolfOwner(*Monster.get(), a_NBT, a_TagIdx);
|
LoadWolfOwner(*Monster.get(), a_NBT, a_TagIdx);
|
||||||
|
|
||||||
int SittingIdx = a_NBT.FindChildByName(a_TagIdx, "Sitting");
|
int SittingIdx = a_NBT.FindChildByName(a_TagIdx, "Sitting");
|
||||||
if (SittingIdx > 0)
|
if ((SittingIdx > 0) && (a_NBT.GetType(SittingIdx) == TAG_Byte))
|
||||||
{
|
{
|
||||||
bool Sitting = ((a_NBT.GetByte(SittingIdx) == 1) ? true : false);
|
bool Sitting = ((a_NBT.GetByte(SittingIdx) == 1) ? true : false);
|
||||||
Monster->SetIsSitting(Sitting);
|
Monster->SetIsSitting(Sitting);
|
||||||
}
|
}
|
||||||
int AngryIdx = a_NBT.FindChildByName(a_TagIdx, "Angry");
|
int AngryIdx = a_NBT.FindChildByName(a_TagIdx, "Angry");
|
||||||
if (AngryIdx > 0)
|
if ((AngryIdx > 0) && (a_NBT.GetType(AngryIdx) == TAG_Byte))
|
||||||
{
|
{
|
||||||
bool Angry = ((a_NBT.GetByte(AngryIdx) == 1) ? true : false);
|
bool Angry = ((a_NBT.GetByte(AngryIdx) == 1) ? true : false);
|
||||||
Monster->SetIsAngry(Angry);
|
Monster->SetIsAngry(Angry);
|
||||||
}
|
}
|
||||||
int CollarColorIdx = a_NBT.FindChildByName(a_TagIdx, "CollarColor");
|
int CollarColorIdx = a_NBT.FindChildByName(a_TagIdx, "CollarColor");
|
||||||
if (CollarColorIdx > 0)
|
if ((CollarColorIdx > 0) && (a_NBT.GetType(CollarColorIdx) == TAG_Int))
|
||||||
{
|
{
|
||||||
int CollarColor = a_NBT.GetInt(CollarColorIdx);
|
int CollarColor = a_NBT.GetInt(CollarColorIdx);
|
||||||
Monster->SetCollarColor(CollarColor);
|
Monster->SetCollarColor(CollarColor);
|
||||||
|
Loading…
Reference in New Issue
Block a user