1
0

Fixed bug where wolfs would teleport while they were sitting.

This commit is contained in:
STRWarrior 2014-01-26 13:27:35 +01:00
parent a533386144
commit 4c780e7b44

View File

@ -201,9 +201,12 @@ void cWolf::TickFollowPlayer()
// The player is present in the world, follow him: // The player is present in the world, follow him:
double Distance = (Callback.OwnerPos - GetPosition()).Length(); double Distance = (Callback.OwnerPos - GetPosition()).Length();
if (Distance > 30) if (Distance > 30)
{
if (!IsSitting())
{ {
TeleportToCoords(Callback.OwnerPos.x, Callback.OwnerPos.y, Callback.OwnerPos.z); TeleportToCoords(Callback.OwnerPos.x, Callback.OwnerPos.y, Callback.OwnerPos.z);
} }
}
else else
{ {
m_FinalDestination = Callback.OwnerPos; m_FinalDestination = Callback.OwnerPos;