aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2016-06-22 11:52:53 -0700
committerDiva Canto2016-06-22 11:52:53 -0700
commitf8bd3d2f2ee99c69b3196f55d785c178d97109e5 (patch)
treec87c286731005a9b9703bc7c62451b05ed32817f /OpenSim
parentCan't do it do it this low in the stack. Attachments on teleports apparently ... (diff)
downloadopensim-SC_OLD-f8bd3d2f2ee99c69b3196f55d785c178d97109e5.zip
opensim-SC_OLD-f8bd3d2f2ee99c69b3196f55d785c178d97109e5.tar.gz
opensim-SC_OLD-f8bd3d2f2ee99c69b3196f55d785c178d97109e5.tar.bz2
opensim-SC_OLD-f8bd3d2f2ee99c69b3196f55d785c178d97109e5.tar.xz
Mantis #7935: regression on transferring attachments over the HG
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs11
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs46
2 files changed, 7 insertions, 50 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index e5d725c..8beed93 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1491,7 +1491,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1491// m_log.DebugFormat( 1491// m_log.DebugFormat(
1492// "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name); 1492// "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name);
1493 1493
1494 // Compute world location of the agente position 1494 // Compute world location of the agent's position
1495 double presenceWorldX = (double)scene.RegionInfo.WorldLocX + pos.X; 1495 double presenceWorldX = (double)scene.RegionInfo.WorldLocX + pos.X;
1496 double presenceWorldY = (double)scene.RegionInfo.WorldLocY + pos.Y; 1496 double presenceWorldY = (double)scene.RegionInfo.WorldLocY + pos.Y;
1497 1497
@@ -2240,7 +2240,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2240 2240
2241// needed for current OSG or old grid code 2241// needed for current OSG or old grid code
2242 2242
2243 public GridRegion GetRegionContainingWorldLocation(IGridService pGridService, UUID pScopeID, double px, double py) 2243 protected GridRegion GetRegionContainingWorldLocation(IGridService pGridService, UUID pScopeID, double px, double py)
2244 { 2244 {
2245 // Since we don't know how big the regions could be, we have to search a very large area 2245 // Since we don't know how big the regions could be, we have to search a very large area
2246 // to find possible regions. 2246 // to find possible regions.
@@ -2253,7 +2253,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2253 // 'pSizeHint' is the size of the source region but since the destination point can be anywhere 2253 // 'pSizeHint' is the size of the source region but since the destination point can be anywhere
2254 // the size of the target region is unknown thus the search area might have to be very large. 2254 // the size of the target region is unknown thus the search area might have to be very large.
2255 // Return 'null' if no such region exists. 2255 // Return 'null' if no such region exists.
2256 public GridRegion GetRegionContainingWorldLocation(IGridService pGridService, UUID pScopeID, 2256 protected GridRegion GetRegionContainingWorldLocation(IGridService pGridService, UUID pScopeID,
2257 double px, double py, uint pSizeHint) 2257 double px, double py, uint pSizeHint)
2258 { 2258 {
2259 m_log.DebugFormat("{0} GetRegionContainingWorldLocation: call, XY=<{1},{2}>", LogHeader, px, py); 2259 m_log.DebugFormat("{0} GetRegionContainingWorldLocation: call, XY=<{1},{2}>", LogHeader, px, py);
@@ -2795,8 +2795,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2795 2795
2796 so.ResumeScripts(); 2796 so.ResumeScripts();
2797 2797
2798 if (so.RootPart.KeyframeMotion != null) 2798 // AddSceneObject already does this and doing it again messes
2799 so.RootPart.KeyframeMotion.UpdateSceneObject(so); 2799 //if (so.RootPart.KeyframeMotion != null)
2800 // so.RootPart.KeyframeMotion.UpdateSceneObject(so);
2800 } 2801 }
2801 2802
2802 return true; 2803 return true;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index c9c8639..a75b460 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2954,52 +2954,8 @@ namespace OpenSim.Region.Framework.Scenes
2954 return false; 2954 return false;
2955 } 2955 }
2956 2956
2957 // If the user is banned, we won't let any of their objects 2957 if (!EntityTransferModule.HandleIncomingSceneObject(newObject, newPosition))
2958 // enter. Period.
2959 //
2960 if (RegionInfo.EstateSettings.IsBanned(newObject.OwnerID, 36))
2961 {
2962 m_log.InfoFormat("[INTERREGION]: Denied prim crossing for banned avatar {0}", newObject.OwnerID);
2963 return false;
2964 }
2965
2966 if (newPosition != Vector3.Zero)
2967 newObject.RootPart.GroupPosition = newPosition;
2968
2969 if (!AddSceneObject(newObject))
2970 {
2971 m_log.DebugFormat(
2972 "[INTERREGION]: Problem adding scene object {0} in {1} ", newObject.UUID, RegionInfo.RegionName);
2973 return false; 2958 return false;
2974 }
2975
2976 if (!newObject.IsAttachment)
2977 {
2978 // FIXME: It would be better to never add the scene object at all rather than add it and then delete
2979 // it
2980 if (!Permissions.CanObjectEntry(newObject.UUID, true, newObject.AbsolutePosition))
2981 {
2982 // Deny non attachments based on parcel settings
2983 //
2984 m_log.Info("[INTERREGION]: Denied prim crossing because of parcel settings");
2985
2986 DeleteSceneObject(newObject, false);
2987
2988 return false;
2989 }
2990
2991 // For attachments, we need to wait until the agent is root
2992 // before we restart the scripts, or else some functions won't work.
2993 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject));
2994 newObject.ResumeScripts();
2995
2996 // AddSceneObject already does this and doing it again messes
2997 // up region crossings, so don't.
2998 //if (newObject.RootPart.KeyframeMotion != null)
2999 // newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject);
3000 }
3001
3002
3003 2959
3004 // Do this as late as possible so that listeners have full access to the incoming object 2960 // Do this as late as possible so that listeners have full access to the incoming object
3005 EventManager.TriggerOnIncomingSceneObject(newObject); 2961 EventManager.TriggerOnIncomingSceneObject(newObject);