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 expecting
This commit is contained in:
Justin Clark-Casey (justincc)
2010-07-28 18:55:29 +01:00
parent a349703279
commit 5aa56b1274
3 changed files with 33 additions and 16 deletions

View File

@@ -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)