Wolf: If Owner tag is missing a normal ownerless wolf will spawn.
This commit is contained in:
parent
550a09020d
commit
c7e4ade7c3
@ -1879,16 +1879,13 @@ void cWSSAnvil::LoadWolfFromNBT(cEntityList & a_Entities, const cParsedNBT & a_N
|
|||||||
int OwnerIdx = a_NBT.FindChildByName(a_TagIdx, "Owner");
|
int OwnerIdx = a_NBT.FindChildByName(a_TagIdx, "Owner");
|
||||||
if (OwnerIdx < 0)
|
if (OwnerIdx < 0)
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
AString OwnerName = a_NBT.GetString(OwnerIdx);
|
AString OwnerName = a_NBT.GetString(OwnerIdx);
|
||||||
if (OwnerName != "")
|
if (OwnerName != "")
|
||||||
{
|
{
|
||||||
Monster->SetOwner(OwnerName);
|
Monster->SetOwner(OwnerName);
|
||||||
Monster->SetIsTame(true);
|
Monster->SetIsTame(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
a_Entities.push_back(Monster.release());
|
a_Entities.push_back(Monster.release());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user