If a part has a sit target and an avatar is already sitting, allow another avatar to sit in the position given if no sit target was set.

Previous behave was that the second avatar could not sit.
This matches behaviour observed on the LL grid.
0.7.4.1
Justin Clark-Casey (justincc) 2012-07-10 23:55:22 +01:00
parent cdea572d2e
commit 337ea019bd
1 changed files with 4 additions and 7 deletions

View File

@ -1872,9 +1872,7 @@ namespace OpenSim.Region.Framework.Scenes
bool canSit = false;
Vector3 pos = part.AbsolutePosition + offset;
if (part.IsSitTargetSet)
{
if (part.SitTargetAvatar == UUID.Zero)
if (part.IsSitTargetSet && part.SitTargetAvatar == UUID.Zero)
{
// m_log.DebugFormat(
// "[SCENE PRESENCE]: Sitting {0} on {1} {2} because sit target is set and unoccupied",
@ -1884,7 +1882,6 @@ namespace OpenSim.Region.Framework.Scenes
sitOrientation = part.SitTargetOrientation;
canSit = true;
}
}
else
{
if (Util.GetDistanceTo(AbsolutePosition, pos) <= 10)