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,18 +1872,15 @@ namespace OpenSim.Region.Framework.Scenes
bool canSit = false;
Vector3 pos = part.AbsolutePosition + offset;
if (part.IsSitTargetSet)
if (part.IsSitTargetSet && part.SitTargetAvatar == UUID.Zero)
{
if (part.SitTargetAvatar == UUID.Zero)
{
// m_log.DebugFormat(
// "[SCENE PRESENCE]: Sitting {0} on {1} {2} because sit target is set and unoccupied",
// Name, part.Name, part.LocalId);
offset = part.SitTargetPosition;
sitOrientation = part.SitTargetOrientation;
canSit = true;
}
offset = part.SitTargetPosition;
sitOrientation = part.SitTargetOrientation;
canSit = true;
}
else
{