Merge commit '62a63f834b7cc056ee37c396034d0e268f66b4a8' into bigmerge
Conflicts: OpenSim/Region/Framework/Scenes/ScenePresence.csavinationmerge
commit
b7237ef059
|
@ -1260,6 +1260,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
set { m_occupied = value; }
|
set { m_occupied = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ID of the avatar that is sat on us. If there is no such avatar then is UUID.Zero
|
||||||
|
/// </summary>
|
||||||
public UUID SitTargetAvatar
|
public UUID SitTargetAvatar
|
||||||
{
|
{
|
||||||
get { return m_sitTargetAvatar; }
|
get { return m_sitTargetAvatar; }
|
||||||
|
@ -1942,11 +1945,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID GetAvatarOnSitTarget()
|
|
||||||
{
|
|
||||||
return m_sitTargetAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool GetDieAtEdge()
|
public bool GetDieAtEdge()
|
||||||
{
|
{
|
||||||
if (m_parentGroup.IsDeleted)
|
if (m_parentGroup.IsDeleted)
|
||||||
|
|
|
@ -1994,9 +1994,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part.TaskInventory.LockItemsForRead(false);
|
part.TaskInventory.LockItemsForRead(false);
|
||||||
|
|
||||||
// Reset sit target.
|
// Reset sit target.
|
||||||
if (part.GetAvatarOnSitTarget() == UUID)
|
if (part.SitTargetAvatar == UUID)
|
||||||
part.SitTargetAvatar = UUID.Zero;
|
part.SitTargetAvatar = UUID.Zero;
|
||||||
|
|
||||||
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
|
|
||||||
ParentPosition = part.GetWorldPosition();
|
ParentPosition = part.GetWorldPosition();
|
||||||
|
@ -2083,10 +2085,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Is a sit target available?
|
// Is a sit target available?
|
||||||
Vector3 avSitOffSet = part.SitTargetPosition;
|
Vector3 avSitOffSet = part.SitTargetPosition;
|
||||||
Quaternion avSitOrientation = part.SitTargetOrientation;
|
Quaternion avSitOrientation = part.SitTargetOrientation;
|
||||||
UUID avOnTargetAlready = part.GetAvatarOnSitTarget();
|
UUID avOnTargetAlready = part.SitTargetAvatar;
|
||||||
bool SitTargetOccupied = (avOnTargetAlready != UUID.Zero);
|
|
||||||
|
bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero));
|
||||||
bool SitTargetisSet = (Vector3.Zero != avSitOffSet); //NB Latest SL Spec shows Sit Rotation setting is ignored.
|
bool SitTargetisSet = (Vector3.Zero != avSitOffSet); //NB Latest SL Spec shows Sit Rotation setting is ignored.
|
||||||
if (SitTargetisSet && !SitTargetOccupied)
|
|
||||||
|
if (SitTargetisSet && SitTargetUnOccupied)
|
||||||
{
|
{
|
||||||
//switch the target to this prim
|
//switch the target to this prim
|
||||||
return part;
|
return part;
|
||||||
|
@ -2525,8 +2529,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("Link #{0}, Rot {1}", part.LinkNum, part.GetWorldRotation());
|
if (part.SitTargetAvatar == UUID)
|
||||||
if (part.GetAvatarOnSitTarget() == UUID)
|
|
||||||
{
|
{
|
||||||
//Console.WriteLine("Scripted Sit");
|
//Console.WriteLine("Scripted Sit");
|
||||||
// Scripted sit
|
// Scripted sit
|
||||||
|
@ -2607,7 +2610,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_parentID = m_requestedSitTargetID;
|
m_parentID = m_requestedSitTargetID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (part.GetAvatarOnSitTarget() != UUID)
|
if (part.SitTargetAvatar != UUID)
|
||||||
{
|
{
|
||||||
m_offsetRotation = m_offsetRotation / part.RotationOffset;
|
m_offsetRotation = m_offsetRotation / part.RotationOffset;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6809,7 +6809,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_String llAvatarOnSitTarget()
|
public LSL_String llAvatarOnSitTarget()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
return m_host.GetAvatarOnSitTarget().ToString();
|
return m_host.SitTargetAvatar.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget
|
// http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget
|
||||||
|
|
Loading…
Reference in New Issue