mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
This commit is contained in:
@@ -1564,6 +1564,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void TriggerRequestChangeWaterHeight(float height)
|
||||
{
|
||||
if (height < 0)
|
||||
{
|
||||
// ignore negative water height
|
||||
return;
|
||||
}
|
||||
|
||||
RequestChangeWaterHeight handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight;
|
||||
if (handlerRequestChangeWaterHeight != null)
|
||||
{
|
||||
|
||||
@@ -116,18 +116,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="remoteClient"></param>
|
||||
public void RequestPrim(uint primLocalID, IClientAPI remoteClient)
|
||||
{
|
||||
EntityBase[] entityList = GetEntities();
|
||||
foreach (EntityBase ent in entityList)
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
{
|
||||
if (((SceneObjectGroup)ent).LocalId == primLocalID)
|
||||
{
|
||||
((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
SceneObjectGroup sog = GetGroupByPrim(primLocalID);
|
||||
|
||||
if (sog != null)
|
||||
sog.SendFullUpdateToClient(remoteClient);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -137,45 +129,65 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="remoteClient"></param>
|
||||
public void SelectPrim(uint primLocalID, IClientAPI remoteClient)
|
||||
{
|
||||
EntityBase[] entityList = GetEntities();
|
||||
foreach (EntityBase ent in entityList)
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
{
|
||||
if (((SceneObjectGroup) ent).LocalId == primLocalID)
|
||||
{
|
||||
((SceneObjectGroup) ent).SendPropertiesToClient(remoteClient);
|
||||
((SceneObjectGroup) ent).IsSelected = true;
|
||||
// A prim is only tainted if it's allowed to be edited by the person clicking it.
|
||||
if (Permissions.CanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId)
|
||||
|| Permissions.CanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
|
||||
{
|
||||
EventManager.TriggerParcelPrimCountTainted();
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// We also need to check the children of this prim as they
|
||||
// can be selected as well and send property information
|
||||
bool foundPrim = false;
|
||||
|
||||
SceneObjectGroup sog = ent as SceneObjectGroup;
|
||||
SceneObjectPart part = GetSceneObjectPart(primLocalID);
|
||||
|
||||
SceneObjectPart[] partList = sog.Parts;
|
||||
foreach (SceneObjectPart part in partList)
|
||||
{
|
||||
if (part.LocalId == primLocalID)
|
||||
{
|
||||
part.SendPropertiesToClient(remoteClient);
|
||||
foundPrim = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundPrim)
|
||||
break;
|
||||
}
|
||||
if (null == part)
|
||||
return;
|
||||
|
||||
if (part.IsRoot)
|
||||
{
|
||||
SceneObjectGroup sog = part.ParentGroup;
|
||||
sog.SendPropertiesToClient(remoteClient);
|
||||
sog.IsSelected = true;
|
||||
|
||||
// A prim is only tainted if it's allowed to be edited by the person clicking it.
|
||||
if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId)
|
||||
|| Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId))
|
||||
{
|
||||
EventManager.TriggerParcelPrimCountTainted();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
part.SendPropertiesToClient(remoteClient);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle the update of an object's user group.
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="groupID"></param>
|
||||
/// <param name="objectLocalID"></param>
|
||||
/// <param name="Garbage"></param>
|
||||
private void HandleObjectGroupUpdate(
|
||||
IClientAPI remoteClient, UUID groupID, uint objectLocalID, UUID Garbage)
|
||||
{
|
||||
if (m_groupsModule == null)
|
||||
return;
|
||||
|
||||
// XXX: Might be better to get rid of this special casing and have GetMembershipData return something
|
||||
// reasonable for a UUID.Zero group.
|
||||
if (groupID != UUID.Zero)
|
||||
{
|
||||
GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, remoteClient.AgentId);
|
||||
|
||||
if (gmd == null)
|
||||
{
|
||||
// m_log.WarnFormat(
|
||||
// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group",
|
||||
// remoteClient.Name, GroupID, objectLocalID);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SceneObjectGroup so = ((Scene)remoteClient.Scene).GetGroupByPrim(objectLocalID);
|
||||
if (so != null)
|
||||
{
|
||||
if (so.OwnerID == remoteClient.AgentId)
|
||||
{
|
||||
so.SetGroup(groupID, remoteClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -250,121 +262,81 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
||||
{
|
||||
EntityBase[] EntityList = GetEntities();
|
||||
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||
|
||||
if (part == null)
|
||||
return;
|
||||
|
||||
SceneObjectGroup obj = part.ParentGroup;
|
||||
|
||||
SurfaceTouchEventArgs surfaceArg = null;
|
||||
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
||||
surfaceArg = surfaceArgs[0];
|
||||
|
||||
foreach (EntityBase ent in EntityList)
|
||||
// Currently only grab/touch for the single prim
|
||||
// the client handles rez correctly
|
||||
obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
|
||||
|
||||
// If the touched prim handles touches, deliver it
|
||||
// If not, deliver to root prim
|
||||
if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
|
||||
EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
||||
|
||||
// Deliver to the root prim if the touched prim doesn't handle touches
|
||||
// or if we're meant to pass on touches anyway. Don't send to root prim
|
||||
// if prim touched is the root prim as we just did it
|
||||
if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
|
||||
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
{
|
||||
SceneObjectGroup obj = ent as SceneObjectGroup;
|
||||
if (obj != null)
|
||||
{
|
||||
// Is this prim part of the group
|
||||
if (obj.HasChildPrim(localID))
|
||||
{
|
||||
// Currently only grab/touch for the single prim
|
||||
// the client handles rez correctly
|
||||
obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
|
||||
|
||||
SceneObjectPart part = obj.GetChildPart(localID);
|
||||
|
||||
// If the touched prim handles touches, deliver it
|
||||
// If not, deliver to root prim
|
||||
if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
|
||||
EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
||||
// Deliver to the root prim if the touched prim doesn't handle touches
|
||||
// or if we're meant to pass on touches anyway. Don't send to root prim
|
||||
// if prim touched is the root prim as we just did it
|
||||
if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
|
||||
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
|
||||
{
|
||||
EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ProcessObjectGrabUpdate(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
||||
public virtual void ProcessObjectGrabUpdate(
|
||||
UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
||||
{
|
||||
EntityBase[] EntityList = GetEntities();
|
||||
SceneObjectPart part = GetSceneObjectPart(objectID);
|
||||
if (part == null)
|
||||
return;
|
||||
|
||||
SceneObjectGroup obj = part.ParentGroup;
|
||||
|
||||
SurfaceTouchEventArgs surfaceArg = null;
|
||||
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
||||
surfaceArg = surfaceArgs[0];
|
||||
|
||||
foreach (EntityBase ent in EntityList)
|
||||
// If the touched prim handles touches, deliver it
|
||||
// If not, deliver to root prim
|
||||
if ((part.ScriptEvents & scriptEvents.touch) != 0)
|
||||
EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
||||
// Deliver to the root prim if the touched prim doesn't handle touches
|
||||
// or if we're meant to pass on touches anyway. Don't send to root prim
|
||||
// if prim touched is the root prim as we just did it
|
||||
if (((part.ScriptEvents & scriptEvents.touch) == 0) ||
|
||||
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
{
|
||||
SceneObjectGroup obj = ent as SceneObjectGroup;
|
||||
if (obj != null)
|
||||
{
|
||||
// Is this prim part of the group
|
||||
if (obj.HasChildPrim(objectID))
|
||||
{
|
||||
SceneObjectPart part = obj.GetChildPart(objectID);
|
||||
|
||||
// If the touched prim handles touches, deliver it
|
||||
// If not, deliver to root prim
|
||||
if ((part.ScriptEvents & scriptEvents.touch) != 0)
|
||||
EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
||||
// Deliver to the root prim if the touched prim doesn't handle touches
|
||||
// or if we're meant to pass on touches anyway. Don't send to root prim
|
||||
// if prim touched is the root prim as we just did it
|
||||
if (((part.ScriptEvents & scriptEvents.touch) == 0) ||
|
||||
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
|
||||
{
|
||||
EventManager.TriggerObjectGrabbing(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
EventManager.TriggerObjectGrabbing(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
||||
{
|
||||
EntityBase[] EntityList = GetEntities();
|
||||
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||
if (part == null)
|
||||
return;
|
||||
|
||||
SceneObjectGroup obj = part.ParentGroup;
|
||||
|
||||
SurfaceTouchEventArgs surfaceArg = null;
|
||||
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
||||
surfaceArg = surfaceArgs[0];
|
||||
|
||||
foreach (EntityBase ent in EntityList)
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
{
|
||||
SceneObjectGroup obj = ent as SceneObjectGroup;
|
||||
|
||||
// Is this prim part of the group
|
||||
if (obj.HasChildPrim(localID))
|
||||
{
|
||||
SceneObjectPart part=obj.GetChildPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
// If the touched prim handles touches, deliver it
|
||||
// If not, deliver to root prim
|
||||
if ((part.ScriptEvents & scriptEvents.touch_end) != 0)
|
||||
EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient, surfaceArg);
|
||||
else
|
||||
EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// If the touched prim handles touches, deliver it
|
||||
// If not, deliver to root prim
|
||||
if ((part.ScriptEvents & scriptEvents.touch_end) != 0)
|
||||
EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient, surfaceArg);
|
||||
else
|
||||
EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
|
||||
}
|
||||
|
||||
public void ProcessAvatarPickerRequest(IClientAPI client, UUID avatarID, UUID RequestID, string query)
|
||||
|
||||
@@ -139,6 +139,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
protected IDialogModule m_dialogModule;
|
||||
protected IEntityTransferModule m_teleportModule;
|
||||
protected ICapabilitiesModule m_capsModule;
|
||||
protected IGroupsModule m_groupsModule;
|
||||
|
||||
/// <summary>
|
||||
/// Current scene frame number
|
||||
@@ -1164,6 +1165,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_dialogModule = RequestModuleInterface<IDialogModule>();
|
||||
m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
|
||||
m_teleportModule = RequestModuleInterface<IEntityTransferModule>();
|
||||
m_groupsModule = RequestModuleInterface<IGroupsModule>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -2733,6 +2735,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
client.OnObjectDescription += m_sceneGraph.PrimDescription;
|
||||
client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable;
|
||||
client.OnObjectOwner += ObjectOwner;
|
||||
client.OnObjectGroupRequest += HandleObjectGroupUpdate;
|
||||
}
|
||||
|
||||
public virtual void SubscribeToClientPrimRezEvents(IClientAPI client)
|
||||
@@ -2776,7 +2779,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public virtual void SubscribeToClientParcelEvents(IClientAPI client)
|
||||
{
|
||||
client.OnObjectGroupRequest += m_sceneGraph.HandleObjectGroupUpdate;
|
||||
client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel;
|
||||
client.OnParcelSetOtherCleanTime += LandChannel.SetParcelOtherCleanTime;
|
||||
client.OnParcelBuy += ProcessParcelBuy;
|
||||
@@ -2903,7 +2905,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public virtual void UnSubscribeToClientParcelEvents(IClientAPI client)
|
||||
{
|
||||
client.OnObjectGroupRequest -= m_sceneGraph.HandleObjectGroupUpdate;
|
||||
client.OnParcelReturnObjectsRequest -= LandChannel.ReturnObjectsInParcel;
|
||||
client.OnParcelSetOtherCleanTime -= LandChannel.SetParcelOtherCleanTime;
|
||||
client.OnParcelBuy -= ProcessParcelBuy;
|
||||
@@ -3522,15 +3523,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!");
|
||||
}
|
||||
|
||||
IGroupsModule groupsModule =
|
||||
RequestModuleInterface<IGroupsModule>();
|
||||
|
||||
List<UUID> agentGroups = new List<UUID>();
|
||||
|
||||
if (groupsModule != null)
|
||||
if (m_groupsModule != null)
|
||||
{
|
||||
GroupMembershipData[] GroupMembership =
|
||||
groupsModule.GetMembershipData(agent.AgentID);
|
||||
GroupMembershipData[] GroupMembership = m_groupsModule.GetMembershipData(agent.AgentID);
|
||||
|
||||
if (GroupMembership != null)
|
||||
{
|
||||
@@ -4287,7 +4284,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Get a scene object group that contains the prim with the given local id
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <returns>null if no scene object group containing that prim is found</returns>
|
||||
/// <returns>null if no scene object group containing that prim is found</returns>
|
||||
public SceneObjectGroup GetGroupByPrim(uint localID)
|
||||
{
|
||||
return m_sceneGraph.GetGroupByPrim(localID);
|
||||
|
||||
@@ -575,20 +575,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
protected internal void HandleObjectGroupUpdate(
|
||||
IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage)
|
||||
{
|
||||
if (!remoteClient.IsGroupMember(GroupID))
|
||||
return;
|
||||
|
||||
SceneObjectGroup group = GetGroupByPrim(objectLocalID);
|
||||
if (group != null)
|
||||
{
|
||||
if (group.OwnerID == remoteClient.AgentId)
|
||||
group.SetGroup(GroupID, remoteClient);
|
||||
}
|
||||
}
|
||||
|
||||
protected internal ScenePresence CreateAndAddChildScenePresence(
|
||||
IClientAPI client, AvatarAppearance appearance, PresenceType type)
|
||||
{
|
||||
|
||||
@@ -1373,19 +1373,23 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
#endregion
|
||||
|
||||
// Send the parts of this SOG to a single client
|
||||
// Used when the client initially connects and when client sends RequestPrim packet
|
||||
/// <summary>
|
||||
/// Send the parts of this SOG to a single client
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Used when the client initially connects and when client sends RequestPrim packet
|
||||
/// </remarks>
|
||||
/// <param name="remoteClient"></param>
|
||||
public void SendFullUpdateToClient(IClientAPI remoteClient)
|
||||
{
|
||||
RootPart.SendFullUpdate(
|
||||
remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID));
|
||||
RootPart.SendFullUpdate(remoteClient);
|
||||
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
SceneObjectPart part = parts[i];
|
||||
if (part != RootPart)
|
||||
part.SendFullUpdate(remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID));
|
||||
part.SendFullUpdate(remoteClient);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1679,10 +1683,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
/// <summary>
|
||||
/// Reset the UUIDs for all the prims that make up this group.
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is called by methods which want to add a new group to an existing scene, in order
|
||||
/// to ensure that there are no clashes with groups already present.
|
||||
/// </summary>
|
||||
/// </remarks>
|
||||
public void ResetIDs()
|
||||
{
|
||||
lock (m_parts.SyncRoot)
|
||||
@@ -3206,6 +3211,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
part.Inventory.ChangeInventoryGroup(GroupID);
|
||||
}
|
||||
|
||||
HasGroupChanged = true;
|
||||
|
||||
// Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
|
||||
// for the same object with very different properties. The caller must schedule the update.
|
||||
//ScheduleGroupForFullUpdate();
|
||||
|
||||
@@ -2836,8 +2836,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Send a full update to the client for the given part
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="clientFlags"></param>
|
||||
protected internal void SendFullUpdate(IClientAPI remoteClient, uint clientFlags)
|
||||
protected internal void SendFullUpdate(IClientAPI remoteClient)
|
||||
{
|
||||
if (ParentGroup == null)
|
||||
return;
|
||||
@@ -2849,16 +2848,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
if (ParentGroup.IsAttachment)
|
||||
{
|
||||
SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags);
|
||||
SendFullUpdateToClient(remoteClient, AttachedPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendFullUpdateToClient(remoteClient, AbsolutePosition, clientFlags);
|
||||
SendFullUpdateToClient(remoteClient, AbsolutePosition);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SendFullUpdateToClient(remoteClient, clientFlags);
|
||||
SendFullUpdateToClient(remoteClient);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2872,7 +2871,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
||||
{
|
||||
SendFullUpdate(avatar.ControllingClient, avatar.GenerateClientFlags(UUID));
|
||||
SendFullUpdate(avatar.ControllingClient);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2880,12 +2879,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Sends a full update to the client
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="clientFlags"></param>
|
||||
public void SendFullUpdateToClient(IClientAPI remoteClient, uint clientflags)
|
||||
public void SendFullUpdateToClient(IClientAPI remoteClient)
|
||||
{
|
||||
Vector3 lPos;
|
||||
lPos = OffsetPosition;
|
||||
SendFullUpdateToClient(remoteClient, lPos, clientflags);
|
||||
SendFullUpdateToClient(remoteClient, OffsetPosition);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2893,8 +2889,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="lPos"></param>
|
||||
/// <param name="clientFlags"></param>
|
||||
public void SendFullUpdateToClient(IClientAPI remoteClient, Vector3 lPos, uint clientFlags)
|
||||
public void SendFullUpdateToClient(IClientAPI remoteClient, Vector3 lPos)
|
||||
{
|
||||
if (ParentGroup == null)
|
||||
return;
|
||||
@@ -2911,15 +2906,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
(ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))
|
||||
return;
|
||||
|
||||
clientFlags &= ~(uint) PrimFlags.CreateSelected;
|
||||
|
||||
if (remoteClient.AgentId == OwnerID)
|
||||
{
|
||||
if ((Flags & PrimFlags.CreateSelected) != 0)
|
||||
{
|
||||
clientFlags |= (uint) PrimFlags.CreateSelected;
|
||||
Flags &= ~PrimFlags.CreateSelected;
|
||||
}
|
||||
}
|
||||
//bool isattachment = IsAttachment;
|
||||
//if (LocalId != ParentGroup.RootPart.LocalId)
|
||||
@@ -3354,6 +3344,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void SetGroup(UUID groupID, IClientAPI client)
|
||||
{
|
||||
// Scene.AddNewPrims() calls with client == null so can't use this.
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE OBJECT PART]: Setting group for {0} to {1} for {2}",
|
||||
// Name, groupID, OwnerID);
|
||||
|
||||
GroupID = groupID;
|
||||
if (client != null)
|
||||
SendPropertiesToClient(client);
|
||||
|
||||
@@ -784,7 +784,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public void RegisterToEvents()
|
||||
{
|
||||
ControllingClient.OnCompleteMovementToRegion += CompleteMovement;
|
||||
//ControllingClient.OnCompleteMovementToRegion += SendInitialData;
|
||||
ControllingClient.OnAgentUpdate += HandleAgentUpdate;
|
||||
ControllingClient.OnAgentRequestSit += HandleAgentRequestSit;
|
||||
ControllingClient.OnAgentSit += HandleAgentSit;
|
||||
@@ -832,11 +831,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
#endregion
|
||||
|
||||
public uint GenerateClientFlags(UUID ObjectID)
|
||||
{
|
||||
return m_scene.Permissions.GenerateClientFlags(m_uuid, ObjectID);
|
||||
}
|
||||
|
||||
#region Status Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -2538,7 +2532,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// again here... this comes after the cached appearance check because the avatars
|
||||
// appearance goes into the avatar update packet
|
||||
SendAvatarDataToAllAgents();
|
||||
SendAppearanceToAgent(this);
|
||||
|
||||
// Sending us our own appearance does not seem to be necessary, and the viewer warns in the log if you do
|
||||
// this.
|
||||
// SendAppearanceToAgent(this);
|
||||
|
||||
// If we are using the the cached appearance then send it out to everyone
|
||||
if (cachedappearance)
|
||||
@@ -2673,7 +2670,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public void SendAppearanceToAgent(ScenePresence avatar)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE PRESENCE] Send appearance from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID);
|
||||
// "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID);
|
||||
|
||||
avatar.ControllingClient.SendAppearance(
|
||||
UUID, Appearance.VisualParams, Appearance.Texture.GetBytes());
|
||||
|
||||
Reference in New Issue
Block a user