From 6f9b8557192ea5fe65e4dc7416809a4d1affa954 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 16 Jul 2011 03:16:24 +0100
Subject: refactor: remove pointless sender != null tests, etc, in
AssetReceived, since the method called always belongs to the object that
generated the request
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a55e07a..697dd0e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1711,7 +1711,8 @@ namespace OpenSim.Region.Framework.Scenes
{
if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero)
{
- m_parentGroup.Scene.AssetService.Get(dupe.m_shape.SculptTexture.ToString(), dupe, AssetReceived);
+ ParentGroup.Scene.AssetService.Get(
+ dupe.m_shape.SculptTexture.ToString(), dupe, dupe.AssetReceived);
}
bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0);
@@ -1725,14 +1726,16 @@ namespace OpenSim.Region.Framework.Scenes
return dupe;
}
+ ///
+ /// Called back by asynchronous asset fetch.
+ ///
+ /// ID of asset received
+ /// Register
+ ///
protected void AssetReceived(string id, Object sender, AssetBase asset)
{
if (asset != null)
- {
- SceneObjectPart sop = (SceneObjectPart)sender;
- if (sop != null)
- sop.SculptTextureCallback(asset);
- }
+ SculptTextureCallback(asset);
}
public static SceneObjectPart Create()
--
cgit v1.1