diff options
author | Justin Clark-Casey (justincc) | 2010-07-12 21:33:27 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-07-26 23:34:20 +0100 |
commit | 43f480864bcca2990b809568eaed04bd27cecf60 (patch) | |
tree | 771a5ae747f5e5b61085747e03ebede078c9d62a /OpenSim | |
parent | factor out common code for updating the media url (diff) | |
download | opensim-SC-43f480864bcca2990b809568eaed04bd27cecf60.zip opensim-SC-43f480864bcca2990b809568eaed04bd27cecf60.tar.gz opensim-SC-43f480864bcca2990b809568eaed04bd27cecf60.tar.bz2 opensim-SC-43f480864bcca2990b809568eaed04bd27cecf60.tar.xz |
fix problem persisting when only one face had a media texture
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 7 |
2 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index fc9667b..51f4cef 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -1867,7 +1867,10 @@ namespace OpenSim.Data.SQLite | |||
1867 | 1867 | ||
1868 | List<MediaEntry> mediaEntries = new List<MediaEntry>(); | 1868 | List<MediaEntry> mediaEntries = new List<MediaEntry>(); |
1869 | foreach (OSD osdMe in osdMeArray) | 1869 | foreach (OSD osdMe in osdMeArray) |
1870 | mediaEntries.Add(MediaEntry.FromOSD(osdMe)); | 1870 | { |
1871 | MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry()); | ||
1872 | mediaEntries.Add(me); | ||
1873 | } | ||
1871 | 1874 | ||
1872 | s.Media = mediaEntries; | 1875 | s.Media = mediaEntries; |
1873 | } | 1876 | } |
@@ -1918,7 +1921,10 @@ namespace OpenSim.Data.SQLite | |||
1918 | 1921 | ||
1919 | OSDArray meArray = new OSDArray(); | 1922 | OSDArray meArray = new OSDArray(); |
1920 | foreach (MediaEntry me in s.Media) | 1923 | foreach (MediaEntry me in s.Media) |
1921 | meArray.Add(me.GetOSD()); | 1924 | { |
1925 | OSD osd = (null == me ? new OSD() : me.GetOSD()); | ||
1926 | meArray.Add(osd); | ||
1927 | } | ||
1922 | 1928 | ||
1923 | row["Media"] = OSDParser.SerializeLLSDXmlString(meArray); | 1929 | row["Media"] = OSDParser.SerializeLLSDXmlString(meArray); |
1924 | } | 1930 | } |
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 242ff6c..93a1ae8 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -212,6 +212,13 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
212 | } | 212 | } |
213 | 213 | ||
214 | m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); | 214 | m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); |
215 | |||
216 | // for (int i = 0; i < omu.FaceMedia.Length; i++) | ||
217 | // { | ||
218 | // MediaEntry me = omu.FaceMedia[i]; | ||
219 | // string v = (null == me ? "null": OSDParser.SerializeLLSDXmlString(me.GetOSD())); | ||
220 | // m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v); | ||
221 | // } | ||
215 | 222 | ||
216 | part.Shape.Media = new List<MediaEntry>(omu.FaceMedia); | 223 | part.Shape.Media = new List<MediaEntry>(omu.FaceMedia); |
217 | 224 | ||