From 60df76314f89d8a489a7f8a3182277cf1a52925c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 3 Aug 2010 15:45:49 +0100 Subject: serialize media textures to inventory with a largely osd representation rather than .net auto-serialization THIS WILL BREAK ANY EXISTING MEDIA TEXTURE SERIALIZATIONS. If you're testing this, please start with new databases. This makes media textures serialized in the same way, which is probably better in the long term. --- OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index e9d723b..339a979 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs @@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml()); - List mediaEntries = new List(); + PrimitiveBaseShape.MediaList mediaEntries = new PrimitiveBaseShape.MediaList(); foreach (OSD osdMe in osdMeArray) { MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry()); @@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap { if (original.Shape.Media != null) { - List dupeMedia = new List(); + PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); foreach (MediaEntry me in original.Shape.Media) { @@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap CheckFaceParam(part, face); if (null == part.Shape.Media) - part.Shape.Media = new List(new MediaEntry[part.GetNumberOfSides()]); + part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); part.Shape.Media[face] = me; UpdateMediaUrl(part, UUID.Zero); @@ -439,7 +439,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap if (null == media) { // m_log.DebugFormat("[MOAP]: Setting all new media list for {0}", part.Name); - part.Shape.Media = new List(omu.FaceMedia); + part.Shape.Media = new PrimitiveBaseShape.MediaList(omu.FaceMedia); for (int i = 0; i < omu.FaceMedia.Length; i++) { -- cgit v1.1