diff options
author | Justin Clark-Casey (justincc) | 2010-07-28 19:23:30 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-07-28 19:23:30 +0100 |
commit | 0f15ccb2cf994c64fb8c7f71a64721a3e5fe3085 (patch) | |
tree | 152db712bfc35a161851f870506eb55c5006f2a4 /OpenSim/Region/CoreModules/World | |
parent | Fix problem where changes to media textures for prims duplicated by shify cop... (diff) | |
download | opensim-SC_OLD-0f15ccb2cf994c64fb8c7f71a64721a3e5fe3085.zip opensim-SC_OLD-0f15ccb2cf994c64fb8c7f71a64721a3e5fe3085.tar.gz opensim-SC_OLD-0f15ccb2cf994c64fb8c7f71a64721a3e5fe3085.tar.bz2 opensim-SC_OLD-0f15ccb2cf994c64fb8c7f71a64721a3e5fe3085.tar.xz |
relocate moap specific cloning code to MoapModule
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 6d74b8e..f4814ce 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -122,6 +122,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
122 | m_scene.EventManager.OnDeregisterCaps += OnDeregisterCaps; | 122 | m_scene.EventManager.OnDeregisterCaps += OnDeregisterCaps; |
123 | m_scene.EventManager.OnSceneObjectLoaded += OnSceneObjectLoaded; | 123 | m_scene.EventManager.OnSceneObjectLoaded += OnSceneObjectLoaded; |
124 | m_scene.EventManager.OnSceneObjectPreSave += OnSceneObjectPreSave; | 124 | m_scene.EventManager.OnSceneObjectPreSave += OnSceneObjectPreSave; |
125 | m_scene.EventManager.OnSceneObjectPartCopy += OnSceneObjectPartCopy; | ||
125 | } | 126 | } |
126 | 127 | ||
127 | public void Close() | 128 | public void Close() |
@@ -133,6 +134,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
133 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; | 134 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; |
134 | m_scene.EventManager.OnSceneObjectLoaded -= OnSceneObjectLoaded; | 135 | m_scene.EventManager.OnSceneObjectLoaded -= OnSceneObjectLoaded; |
135 | m_scene.EventManager.OnSceneObjectPreSave -= OnSceneObjectPreSave; | 136 | m_scene.EventManager.OnSceneObjectPreSave -= OnSceneObjectPreSave; |
137 | m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; | ||
136 | } | 138 | } |
137 | 139 | ||
138 | public void OnRegisterCaps(UUID agentID, Caps caps) | 140 | public void OnRegisterCaps(UUID agentID, Caps caps) |
@@ -264,6 +266,24 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
264 | } | 266 | } |
265 | } | 267 | } |
266 | 268 | ||
269 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original) | ||
270 | { | ||
271 | if (original.Shape.Media != null) | ||
272 | { | ||
273 | List<MediaEntry> dupeMedia = new List<MediaEntry>(); | ||
274 | |||
275 | foreach (MediaEntry me in original.Shape.Media) | ||
276 | { | ||
277 | if (me != null) | ||
278 | dupeMedia.Add(MediaEntry.FromOSD(me.GetOSD())); | ||
279 | else | ||
280 | dupeMedia.Add(null); | ||
281 | } | ||
282 | |||
283 | copy.Shape.Media = dupeMedia; | ||
284 | } | ||
285 | } | ||
286 | |||
267 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) | 287 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) |
268 | { | 288 | { |
269 | MediaEntry me = null; | 289 | MediaEntry me = null; |