mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Mantis #2442
Attempt to reinstate the Object Entry flag in parcel settings
This commit is contained in:
@@ -403,7 +403,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
#endregion
|
||||
|
||||
#region OBJECT ENTRY
|
||||
public delegate bool CanObjectEntryHandler(UUID objectID, Vector3 newPoint, Scene scene);
|
||||
public delegate bool CanObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene);
|
||||
private List<CanObjectEntryHandler> CanObjectEntryCheckFunctions = new List<CanObjectEntryHandler>();
|
||||
|
||||
public void AddObjectEntryHandler(CanObjectEntryHandler delegateFunc)
|
||||
@@ -418,11 +418,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
CanObjectEntryCheckFunctions.Remove(delegateFunc);
|
||||
}
|
||||
|
||||
public bool CanObjectEntry(UUID objectID, Vector3 newPoint)
|
||||
public bool CanObjectEntry(UUID objectID, bool enteringRegion, Vector3 newPoint)
|
||||
{
|
||||
foreach (CanObjectEntryHandler check in CanObjectEntryCheckFunctions)
|
||||
{
|
||||
if (check(objectID, newPoint, m_scene) == false)
|
||||
if (check(objectID, enteringRegion, newPoint, m_scene) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2157,12 +2157,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
if (XMLMethod == 0)
|
||||
{
|
||||
SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData);
|
||||
|
||||
AddRestoredSceneObject(sceneObject, true, false);
|
||||
|
||||
SceneObjectPart RootPrim = GetSceneObjectPart(primID);
|
||||
if (RootPrim != null)
|
||||
{
|
||||
if (m_regInfo.EstateSettings.IsBanned(RootPrim.OwnerID))
|
||||
if (m_regInfo.EstateSettings.IsBanned(RootPrim.OwnerID) ||
|
||||
Permissions.CanObjectEntry(RootPrim.UUID, true, RootPrim.AbsolutePosition))
|
||||
{
|
||||
SceneObjectGroup grp = RootPrim.ParentGroup;
|
||||
if (grp != null)
|
||||
|
||||
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment)
|
||||
if ((m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId) && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos)) || group.IsAttachment)
|
||||
{
|
||||
group.UpdateGroupPosition(pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user