diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
3 files changed, 25 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 1c503aa..f6d4b40 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -94,8 +94,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
94 | 94 | ||
95 | // caches ExtendedLandData | 95 | // caches ExtendedLandData |
96 | private Cache parcelInfoCache; | 96 | private Cache parcelInfoCache; |
97 | private Dictionary<UUID, Vector3> forcedPosition = | 97 | |
98 | new Dictionary<UUID, Vector3>(); | 98 | /// <summary> |
99 | /// Record positions that avatar's are currently being forced to move to due to parcel entry restrictions. | ||
100 | /// </summary> | ||
101 | private Dictionary<UUID, Vector3> forcedPosition = new Dictionary<UUID, Vector3>(); | ||
99 | 102 | ||
100 | #region INonSharedRegionModule Members | 103 | #region INonSharedRegionModule Members |
101 | 104 | ||
@@ -224,22 +227,34 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
224 | //When the avatar walks into a ban line on the ground, it prevents getting stuck | 227 | //When the avatar walks into a ban line on the ground, it prevents getting stuck |
225 | agentData.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; | 228 | agentData.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; |
226 | 229 | ||
227 | |||
228 | //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines | 230 | //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines |
229 | if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2) | 231 | if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2) |
230 | { | 232 | { |
231 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); | 233 | // m_log.DebugFormat( |
234 | // "[LAND MANAGEMENT MODULE]: Stopping force position of {0} because {1} is close enough to {2}", | ||
235 | // clientAvatar.Name, clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]); | ||
236 | |||
232 | forcedPosition.Remove(remoteClient.AgentId); | 237 | forcedPosition.Remove(remoteClient.AgentId); |
233 | } | 238 | } |
234 | //if we are far away, teleport | 239 | //if we are far away, teleport |
235 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3) | 240 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3) |
236 | { | 241 | { |
237 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); | 242 | Vector3 forcePosition = forcedPosition[remoteClient.AgentId]; |
238 | clientAvatar.Teleport(forcedPosition[remoteClient.AgentId]); | 243 | // m_log.DebugFormat( |
244 | // "[LAND MANAGEMENT MODULE]: Teleporting out {0} because {1} is too far from avatar position {2}", | ||
245 | // clientAvatar.Name, clientAvatar.AbsolutePosition, forcePosition); | ||
246 | |||
247 | m_scene.RequestTeleportLocation(remoteClient, m_scene.RegionInfo.RegionHandle, | ||
248 | forcePosition, clientAvatar.Lookat, (uint)Constants.TeleportFlags.ForceRedirect); | ||
249 | |||
239 | forcedPosition.Remove(remoteClient.AgentId); | 250 | forcedPosition.Remove(remoteClient.AgentId); |
240 | } | 251 | } |
241 | else | 252 | else |
242 | { | 253 | { |
254 | // m_log.DebugFormat( | ||
255 | // "[LAND MANAGEMENT MODULE]: Forcing {0} from {1} to {2}", | ||
256 | // clientAvatar.Name, clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]); | ||
257 | |||
243 | //Forces them toward the forced position we want if they aren't there yet | 258 | //Forces them toward the forced position we want if they aren't there yet |
244 | agentData.UseClientAgentPosition = true; | 259 | agentData.UseClientAgentPosition = true; |
245 | agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId]; | 260 | agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId]; |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index f3c6a30..7023984 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -677,18 +677,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
677 | bool permission = false; | 677 | bool permission = false; |
678 | bool locked = false; | 678 | bool locked = false; |
679 | 679 | ||
680 | if (!m_scene.Entities.ContainsKey(objId)) | 680 | SceneObjectPart part = m_scene.GetSceneObjectPart(objId); |
681 | { | ||
682 | return false; | ||
683 | } | ||
684 | 681 | ||
685 | // If it's not an object, we cant edit it. | 682 | if (part == null) |
686 | if ((!(m_scene.Entities[objId] is SceneObjectGroup))) | ||
687 | { | ||
688 | return false; | 683 | return false; |
689 | } | ||
690 | 684 | ||
691 | SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objId]; | 685 | SceneObjectGroup group = part.ParentGroup; |
692 | 686 | ||
693 | UUID objectOwner = group.OwnerID; | 687 | UUID objectOwner = group.OwnerID; |
694 | locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); | 688 | locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); |
@@ -977,16 +971,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
977 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 971 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
978 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 972 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
979 | 973 | ||
980 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); | ||
981 | |||
982 | // If we selected a sub-prim to edit, the objectID won't represent the object, but only a part. | ||
983 | // We have to check the permissions of the group, though. | ||
984 | if (part.ParentID != 0) | ||
985 | { | ||
986 | objectID = part.ParentUUID; | ||
987 | part = m_scene.GetSceneObjectPart(objectID); | ||
988 | } | ||
989 | |||
990 | return GenericObjectPermission(editorID, objectID, false); | 974 | return GenericObjectPermission(editorID, objectID, false); |
991 | } | 975 | } |
992 | 976 | ||
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index b315d2c..74b047b 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -351,6 +351,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
351 | process, | 351 | process, |
352 | string.Format("MapItemRequestThread ({0})", m_scene.RegionInfo.RegionName), | 352 | string.Format("MapItemRequestThread ({0})", m_scene.RegionInfo.RegionName), |
353 | ThreadPriority.BelowNormal, | 353 | ThreadPriority.BelowNormal, |
354 | true, | ||
354 | true); | 355 | true); |
355 | } | 356 | } |
356 | 357 | ||