aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs9
-rw-r--r--OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs27
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs22
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs1
8 files changed, 40 insertions, 37 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index c7f4c20..b0cee03 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -496,6 +496,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
496 SetAppearanceAssets(sp.UUID, sp.Appearance); 496 SetAppearanceAssets(sp.UUID, sp.Appearance);
497 497
498 m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); 498 m_scene.AvatarService.SetAppearance(agentid, sp.Appearance);
499
500 // Trigger this here because it's the final step in the set/queue/save process for appearance setting.
501 // Everything has been updated and stored. Ensures bakes have been persisted (if option is set to persist bakes).
502 m_scene.EventManager.TriggerAvatarAppearanceChanged(sp);
499 } 503 }
500 504
501 private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance) 505 private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance)
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 8f047ea..f6e4dbf 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1704,14 +1704,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1704 1704
1705 // Offset the positions for the new region across the border 1705 // Offset the positions for the new region across the border
1706 Vector3 oldGroupPosition = grp.RootPart.GroupPosition; 1706 Vector3 oldGroupPosition = grp.RootPart.GroupPosition;
1707 grp.RootPart.GroupPosition = pos;
1708 1707
1709 // If we fail to cross the border, then reset the position of the scene object on that border. 1708 // If we fail to cross the border, then reset the position of the scene object on that border.
1710 uint x = 0, y = 0; 1709 uint x = 0, y = 0;
1711 Utils.LongToUInts(newRegionHandle, out x, out y); 1710 Utils.LongToUInts(newRegionHandle, out x, out y);
1712 GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); 1711 GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
1713 1712
1714 if (destination == null || !CrossPrimGroupIntoNewRegion(destination, grp, silent)) 1713 if (destination == null || !CrossPrimGroupIntoNewRegion(destination, pos, grp, silent))
1715 { 1714 {
1716 m_log.InfoFormat("[ENTITY TRANSFER MODULE] cross region transfer failed for object {0}",grp.UUID); 1715 m_log.InfoFormat("[ENTITY TRANSFER MODULE] cross region transfer failed for object {0}",grp.UUID);
1717 1716
@@ -1741,7 +1740,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1741 /// true if the crossing itself was successful, false on failure 1740 /// true if the crossing itself was successful, false on failure
1742 /// FIMXE: we still return true if the crossing object was not successfully deleted from the originating region 1741 /// FIMXE: we still return true if the crossing object was not successfully deleted from the originating region
1743 /// </returns> 1742 /// </returns>
1744 protected bool CrossPrimGroupIntoNewRegion(GridRegion destination, SceneObjectGroup grp, bool silent) 1743 protected bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent)
1745 { 1744 {
1746 //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<"); 1745 //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
1747 1746
@@ -1766,7 +1765,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1766 //if (m_interregionCommsOut != null) 1765 //if (m_interregionCommsOut != null)
1767 // successYN = m_interregionCommsOut.SendCreateObject(newRegionHandle, grp, true); 1766 // successYN = m_interregionCommsOut.SendCreateObject(newRegionHandle, grp, true);
1768 if (m_aScene.SimulationService != null) 1767 if (m_aScene.SimulationService != null)
1769 successYN = m_aScene.SimulationService.CreateObject(destination, grp, true); 1768 successYN = m_aScene.SimulationService.CreateObject(destination, newPosition, grp, true);
1770 1769
1771 if (successYN) 1770 if (successYN)
1772 { 1771 {
@@ -1825,7 +1824,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1825 gobj.IsAttachment = false; 1824 gobj.IsAttachment = false;
1826 //gobj.RootPart.LastOwnerID = gobj.GetFromAssetID(); 1825 //gobj.RootPart.LastOwnerID = gobj.GetFromAssetID();
1827 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending attachment {0} to region {1}", gobj.UUID, destination.RegionName); 1826 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending attachment {0} to region {1}", gobj.UUID, destination.RegionName);
1828 CrossPrimGroupIntoNewRegion(destination, gobj, silent); 1827 CrossPrimGroupIntoNewRegion(destination, Vector3.Zero, gobj, silent);
1829 } 1828 }
1830 } 1829 }
1831 1830
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
index f367739..a6e2548 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
@@ -1210,7 +1210,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
1210 if (homeScene.TryGetScenePresence(avatarId,out avatar)) 1210 if (homeScene.TryGetScenePresence(avatarId,out avatar))
1211 { 1211 {
1212 KillAUser ku = new KillAUser(avatar,mod); 1212 KillAUser ku = new KillAUser(avatar,mod);
1213 Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true); 1213 Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true, true);
1214 } 1214 }
1215 } 1215 }
1216 1216
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index a17c6ae..85e7e94 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
315 * Object-related communications 315 * Object-related communications
316 */ 316 */
317 317
318 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 318 public bool CreateObject(GridRegion destination, Vector3 newPosition, ISceneObject sog, bool isLocalCall)
319 { 319 {
320 if (destination == null) 320 if (destination == null)
321 return false; 321 return false;
@@ -330,12 +330,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
330 // We need to make a local copy of the object 330 // We need to make a local copy of the object
331 ISceneObject sogClone = sog.CloneForNewScene(); 331 ISceneObject sogClone = sog.CloneForNewScene();
332 sogClone.SetState(sog.GetStateSnapshot(), s); 332 sogClone.SetState(sog.GetStateSnapshot(), s);
333 return s.IncomingCreateObject(sogClone); 333 return s.IncomingCreateObject(newPosition, sogClone);
334 } 334 }
335 else 335 else
336 { 336 {
337 // Use the object as it came through the wire 337 // Use the object as it came through the wire
338 return s.IncomingCreateObject(sog); 338 return s.IncomingCreateObject(newPosition, sog);
339 } 339 }
340 } 340 }
341 } 341 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index f8cea71..eaf9506 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -282,13 +282,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
282 * Object-related communications 282 * Object-related communications
283 */ 283 */
284 284
285 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 285 public bool CreateObject(GridRegion destination, Vector3 newPosition, ISceneObject sog, bool isLocalCall)
286 { 286 {
287 if (destination == null) 287 if (destination == null)
288 return false; 288 return false;
289 289
290 // Try local first 290 // Try local first
291 if (m_localBackend.CreateObject(destination, sog, isLocalCall)) 291 if (m_localBackend.CreateObject(destination, newPosition, sog, isLocalCall))
292 { 292 {
293 //m_log.Debug("[REST COMMS]: LocalBackEnd SendCreateObject succeeded"); 293 //m_log.Debug("[REST COMMS]: LocalBackEnd SendCreateObject succeeded");
294 return true; 294 return true;
@@ -296,7 +296,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
296 296
297 // else do the remote thing 297 // else do the remote thing
298 if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) 298 if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
299 return m_remoteConnector.CreateObject(destination, sog, isLocalCall); 299 return m_remoteConnector.CreateObject(destination, newPosition, sog, isLocalCall);
300 300
301 return false; 301 return false;
302 } 302 }
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