Fix problem where changes to media textures for prims duplicated by shify copy would change both prims until server restart
I also found out that you can crash the current viewer by giving it more media entrys than it's expectingprebuild-update
parent
a349703279
commit
5aa56b1274
|
@ -350,9 +350,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
|
|||
|
||||
if (null == part)
|
||||
{
|
||||
// m_log.WarnFormat(
|
||||
// "[MOAP]: Received a GET ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
|
||||
// primId, m_scene.RegionInfo.RegionName);
|
||||
m_log.WarnFormat(
|
||||
"[MOAP]: Received a GET ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
|
||||
primId, m_scene.RegionInfo.RegionName);
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
|
@ -386,9 +386,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
|
|||
|
||||
if (null == part)
|
||||
{
|
||||
// m_log.WarnFormat(
|
||||
// "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
|
||||
// primId, m_scene.RegionInfo.RegionName);
|
||||
m_log.WarnFormat(
|
||||
"[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
|
||||
primId, m_scene.RegionInfo.RegionName);
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
|
@ -403,9 +403,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
|
|||
|
||||
if (omu.FaceMedia.Length > part.GetNumberOfSides())
|
||||
{
|
||||
// m_log.WarnFormat(
|
||||
// "[MOAP]: Received {0} media entries from client for prim {1} {2} but this prim has only {3} faces. Dropping request.",
|
||||
// omu.FaceMedia.Length, part.Name, part.UUID, part.GetNumberOfSides());
|
||||
m_log.WarnFormat(
|
||||
"[MOAP]: Received {0} media entries from client for prim {1} {2} but this prim has only {3} faces. Dropping request.",
|
||||
omu.FaceMedia.Length, part.Name, part.UUID, part.GetNumberOfSides());
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
|
|
|
@ -1923,9 +1923,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
if (null == me)
|
||||
return true;
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[PERMISSIONS]: Checking CanControlPrimMedia for {0} on {1} face {2} with control permissions {3}",
|
||||
agentID, primID, face, me.ControlPermissions);
|
||||
// m_log.DebugFormat(
|
||||
// "[PERMISSIONS]: Checking CanControlPrimMedia for {0} on {1} face {2} with control permissions {3}",
|
||||
// agentID, primID, face, me.ControlPermissions);
|
||||
|
||||
return GenericPrimMediaPermission(part, agentID, me.ControlPermissions);
|
||||
}
|
||||
|
@ -1949,9 +1949,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
if (null == me)
|
||||
return true;
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}",
|
||||
agentID, primID, face, me.InteractPermissions);
|
||||
// m_log.DebugFormat(
|
||||
// "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}",
|
||||
// agentID, primID, face, me.InteractPermissions);
|
||||
|
||||
return GenericPrimMediaPermission(part, agentID, me.InteractPermissions);
|
||||
}
|
||||
|
|
|
@ -1617,7 +1617,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||
}
|
||||
|
||||
return dupe;
|
||||
if (Shape.Media != null)
|
||||
{
|
||||
List<MediaEntry> dupeMedia = new List<MediaEntry>();
|
||||
|
||||
foreach (MediaEntry me in Shape.Media)
|
||||
{
|
||||
if (me != null)
|
||||
dupeMedia.Add(MediaEntry.FromOSD(me.GetOSD()));
|
||||
else
|
||||
dupeMedia.Add(null);
|
||||
}
|
||||
|
||||
dupe.Shape.Media = dupeMedia;
|
||||
}
|
||||
|
||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID);
|
||||
|
||||
return dupe;
|
||||
}
|
||||
|
||||
protected void AssetReceived(string id, Object sender, AssetBase asset)
|
||||
|
|
Loading…
Reference in New Issue