diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs index 5a6dbc8..a494ff6 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs | |||
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
84 | } | 84 | } |
85 | 85 | ||
86 | /// <summary> | 86 | /// <summary> |
87 | /// Makes a new meta entity by copying the given scene object group. | 87 | /// Makes a new meta entity by copying the given scene object group. |
88 | /// The physics boolean is just a stub right now. | 88 | /// The physics boolean is just a stub right now. |
89 | /// </summary> | 89 | /// </summary> |
90 | public MetaEntity(SceneObjectGroup orig, bool physics) | 90 | public MetaEntity(SceneObjectGroup orig, bool physics) |
@@ -160,19 +160,19 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
160 | { | 160 | { |
161 | //make new uuids | 161 | //make new uuids |
162 | Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>(); | 162 | Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>(); |
163 | foreach(SceneObjectPart part in m_Entity.Children.Values) | 163 | foreach (SceneObjectPart part in m_Entity.Children.Values) |
164 | { | 164 | { |
165 | part.ResetIDs(part.LinkNum); | 165 | part.ResetIDs(part.LinkNum); |
166 | parts.Add(part.UUID, part); | 166 | parts.Add(part.UUID, part); |
167 | } | 167 | } |
168 | 168 | ||
169 | // make new localids | 169 | // make new localids |
170 | foreach (SceneObjectPart part in m_Entity.Children.Values) | 170 | foreach (SceneObjectPart part in m_Entity.Children.Values) |
171 | part.LocalId = m_Entity.Scene.PrimIDAllocate(); | 171 | part.LocalId = m_Entity.Scene.PrimIDAllocate(); |
172 | 172 | ||
173 | //finalize | 173 | //finalize |
174 | m_Entity.UpdateParentIDs(); | 174 | m_Entity.UpdateParentIDs(); |
175 | m_Entity.RootPart.PhysActor = null; | 175 | m_Entity.RootPart.PhysActor = null; |
176 | m_Entity.Children = parts; | 176 | m_Entity.Children = parts; |
177 | } | 177 | } |
178 | 178 | ||
@@ -188,8 +188,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
188 | //This deletes the group without removing from any databases. | 188 | //This deletes the group without removing from any databases. |
189 | //This is important because we are not IN any database. | 189 | //This is important because we are not IN any database. |
190 | //m_Entity.FakeDeleteGroup(); | 190 | //m_Entity.FakeDeleteGroup(); |
191 | foreach( SceneObjectPart part in m_Entity.Children.Values) | 191 | foreach (SceneObjectPart part in m_Entity.Children.Values) |
192 | client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); | 192 | client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); |
193 | } | 193 | } |
194 | 194 | ||
195 | /// <summary> | 195 | /// <summary> |
@@ -197,10 +197,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
197 | /// </summary> | 197 | /// </summary> |
198 | public virtual void HideFromAll() | 198 | public virtual void HideFromAll() |
199 | { | 199 | { |
200 | foreach( SceneObjectPart part in m_Entity.Children.Values) | 200 | foreach (SceneObjectPart part in m_Entity.Children.Values) |
201 | m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller) | 201 | m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller) |
202 | { controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); } | 202 | { controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); } |
203 | ); | 203 | ); |
204 | } | 204 | } |
205 | 205 | ||
206 | public void SendFullUpdate(IClientAPI client) | 206 | public void SendFullUpdate(IClientAPI client) |
@@ -239,40 +239,40 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
239 | Color4 texcolor; | 239 | Color4 texcolor; |
240 | try | 240 | try |
241 | { | 241 | { |
242 | tex = part.Shape.Textures; | 242 | tex = part.Shape.Textures; |
243 | texcolor = new Color4(); | 243 | texcolor = new Color4(); |
244 | } | 244 | } |
245 | catch(Exception) | 245 | catch(Exception) |
246 | { | 246 | { |
247 | //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing textures of scene object: " + e); | 247 | //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing textures of scene object: " + e); |
248 | return; | 248 | return; |
249 | } | 249 | } |
250 | 250 | ||
251 | for (uint i = 0; i < tex.FaceTextures.Length; i++) | 251 | for (uint i = 0; i < tex.FaceTextures.Length; i++) |
252 | { | 252 | { |
253 | try { | 253 | try { |
254 | if (tex.FaceTextures[i] != null) | 254 | if (tex.FaceTextures[i] != null) |
255 | { | 255 | { |
256 | texcolor = tex.FaceTextures[i].RGBA; | 256 | texcolor = tex.FaceTextures[i].RGBA; |
257 | texcolor.A = transparencyAmount; | 257 | texcolor.A = transparencyAmount; |
258 | tex.FaceTextures[i].RGBA = texcolor; | 258 | tex.FaceTextures[i].RGBA = texcolor; |
259 | } | 259 | } |
260 | } | 260 | } |
261 | catch (Exception) | 261 | catch (Exception) |
262 | { | 262 | { |
263 | //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing different face textures of object: " + e); | 263 | //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing different face textures of object: " + e); |
264 | continue; | 264 | continue; |
265 | } | 265 | } |
266 | } | 266 | } |
267 | try { | 267 | try { |
268 | texcolor = tex.DefaultTexture.RGBA; | 268 | texcolor = tex.DefaultTexture.RGBA; |
269 | texcolor.A = transparencyAmount; | 269 | texcolor.A = transparencyAmount; |
270 | tex.DefaultTexture.RGBA = texcolor; | 270 | tex.DefaultTexture.RGBA = texcolor; |
271 | part.Shape.TextureEntry = tex.ToBytes(); | 271 | part.Shape.TextureEntry = tex.ToBytes(); |
272 | } | 272 | } |
273 | catch (Exception) | 273 | catch (Exception) |
274 | { | 274 | { |
275 | //m_log.Info("[Content Management]: Exception thrown while accessing default face texture of object: " + e); | 275 | //m_log.Info("[Content Management]: Exception thrown while accessing default face texture of object: " + e); |
276 | } | 276 | } |
277 | } | 277 | } |
278 | 278 | ||