sitting avatars hidding by their position. This is not as SL that uses

avatar sitting on root prim. All cases have good and bad situations, this is
simpler. Only SOG position changes triggers checks, rotation alone will
not. ( as happens in other cases ) (UNTESTED, as usual )
avinationmerge
UbitUmarov 2014-08-01 19:52:55 +01:00
parent ef1f37cf20
commit e296f25445
2 changed files with 40 additions and 1 deletions

View File

@ -701,6 +701,11 @@ namespace OpenSim.Region.Framework.Scenes
part.GroupPosition = val;
}
foreach (ScenePresence av in m_linkedAvatars)
{
av.sitSOGmoved();
}
// now that position is changed tell it to scripts
if (triggerScriptEvent)
{

View File

@ -163,6 +163,7 @@ namespace OpenSim.Region.Framework.Scenes
}
m_currentParcelUUID = value;
m_currentParcelHide = false;
ILandObject land = m_scene.LandChannel.GetLandObject(AbsolutePosition.X, AbsolutePosition.Y);
if (land != null && !land.LandData.SeeAVs)
m_currentParcelHide = true;
@ -172,6 +173,23 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void sitSOGmoved()
{
if (IsDeleted || !IsSatOnObject)
//what me? nahh
return;
if (IsInTransit)
return;
ILandObject land = m_scene.LandChannel.GetLandObject(AbsolutePosition.X, AbsolutePosition.Y);
if (land == null)
return; //??
UUID parcelID = land.LandData.GlobalID;
if (m_currentParcelUUID != parcelID)
currentParcelUUID = parcelID;
}
public bool ParcelAllowThisAvatarSounds
{
get
@ -2707,7 +2725,7 @@ namespace OpenSim.Region.Framework.Scenes
if (satOnObject)
{
SendAvatarDataToAllAgents();
// SendAvatarDataToAllAgents();
m_requestedSitTargetID = 0;
part.RemoveSittingAvatar(UUID);
@ -2719,6 +2737,22 @@ namespace OpenSim.Region.Framework.Scenes
AddToPhysicalScene(false);
Animator.TrySetMovementAnimation("STAND");
if (satOnObject)
{
ILandObject land = m_scene.LandChannel.GetLandObject(AbsolutePosition.X,AbsolutePosition.Y);
if (land != null)
{
UUID parcelID = land.LandData.GlobalID;
if (m_currentParcelUUID != parcelID)
currentParcelUUID = parcelID;
else
SendAvatarDataToAllAgents();
}
else
SendAvatarDataToAllAgents();
}
TriggerScenePresenceUpdated();
}