From cccf6953276eda0af34fb7b8e95c2c4351db5546 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 30 Oct 2012 01:14:48 +0000
Subject: Add asset != null check to ODEPrim.MeshAssetReceived instead of
throwing exception.
In some cases (such as failure to receive response from asset service), it is possible for a null to be returned from IAssetService.Get(string, object, AssetRetrieved).
---
OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 5b49e3b..2637295 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -3351,7 +3351,7 @@ Console.WriteLine(" JointCreateFixed");
private void MeshAssetReceived(AssetBase asset)
{
- if (asset.Data != null && asset.Data.Length > 0)
+ if (asset != null && asset.Data != null && asset.Data.Length > 0)
{
if (!_pbs.SculptEntry)
return;
--
cgit v1.1
From 9bc4dc6c5f7c8d1430db31a657399d0bf794a7f7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 30 Oct 2012 01:19:32 +0000
Subject: Add method doc to IAssetService.Get(string, object, AssetRetrieved)
outlining the situations in which AssetRetrieved may be called back with a
null AssetBase.
These situations include asset not found and remote service not responding.
---
OpenSim/Services/Interfaces/IAssetService.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/OpenSim/Services/Interfaces/IAssetService.cs b/OpenSim/Services/Interfaces/IAssetService.cs
index 80494f1..3c469c6 100644
--- a/OpenSim/Services/Interfaces/IAssetService.cs
+++ b/OpenSim/Services/Interfaces/IAssetService.cs
@@ -68,7 +68,11 @@ namespace OpenSim.Services.Interfaces
///
/// The asset id
/// Represents the requester. Passed back via the handler
- /// The handler to call back once the asset has been retrieved
+ ///
+ /// The handler to call back once the asset has been retrieved. This will be called back with a null AssetBase
+ /// if the asset could not be found for some reason (e.g. if it does not exist, if a remote asset service
+ /// was not contactable, if it is not in the database, etc.).
+ ///
/// True if the id was parseable, false otherwise
bool Get(string id, Object sender, AssetRetrieved handler);
--
cgit v1.1
From ff6c69000e3f192f81e7408a522b78d91521a5ff Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 30 Oct 2012 01:40:59 +0000
Subject: Log warning if mesh/sculpt asset couldn't be found by
ODEPrim.MeshAssetReceived() callback.
Presumably this is now more useful if the false positive from the old method of loading mesh assets have been eliminated.
---
OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 2637295..5a0b8d1 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -3364,6 +3364,12 @@ Console.WriteLine(" JointCreateFixed");
m_taintshape = true;
_parent_scene.AddPhysicsActorTaint(this);
}
+ else
+ {
+ m_log.WarnFormat(
+ "[ODE PRIM]: Could not get mesh/sculpt asset {0} for {1} at {2} in {3}",
+ _pbs.SculptTexture, Name, _position, _parent_scene.Name);
+ }
}
}
}
\ No newline at end of file
--
cgit v1.1
From 984faf24dfaea26cdd436c8097abf334b74ebed8 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 30 Oct 2012 01:48:05 +0000
Subject: Only create a new list to check if objects have reached targets if
there actually are any targets.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 7d8cbf5..69c1027 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1692,15 +1692,19 @@ namespace OpenSim.Region.Framework.Scenes
private void CheckAtTargets()
{
- List objs = new List();
+ List objs = null;
+
lock (m_groupsWithTargets)
{
- foreach (SceneObjectGroup grp in m_groupsWithTargets.Values)
- objs.Add(grp);
+ if (m_groupsWithTargets.Count != 0)
+ objs = new List(m_groupsWithTargets.Values);
}
- foreach (SceneObjectGroup entry in objs)
- entry.checkAtTargets();
+ if (objs != null)
+ {
+ foreach (SceneObjectGroup entry in objs)
+ entry.checkAtTargets();
+ }
}
///
--
cgit v1.1
From 9e05067a4f029983a749c348259112a8a18432d1 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 30 Oct 2012 21:45:39 +0100
Subject: Add AnimState to CADU
---
OpenSim/Framework/ChildAgentDataUpdate.cs | 36 +++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 6d048f4..dfe60aa 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -306,6 +306,8 @@ namespace OpenSim.Framework
public AgentGroupData[] Groups;
public Animation[] Anims;
+ public Animation DefaultAnim = null;
+ public Animation AnimState = null;
public UUID GranterID;
@@ -390,6 +392,16 @@ namespace OpenSim.Framework
args["animations"] = anims;
}
+ if (DefaultAnim != null)
+ {
+ args["default_animation"] = DefaultAnim.PackUpdateMessage();
+ }
+
+ if (AnimState != null)
+ {
+ args["animation_state"] = AnimState.PackUpdateMessage();
+ }
+
if (Appearance != null)
args["packed_appearance"] = Appearance.Pack();
@@ -583,6 +595,30 @@ namespace OpenSim.Framework
}
}
+ if (args["default_animation"] != null)
+ {
+ try
+ {
+ DefaultAnim = new Animation((OSDMap)args["default_animation"]);
+ }
+ catch
+ {
+ DefaultAnim = null;
+ }
+ }
+
+ if (args["animation_state"] != null)
+ {
+ try
+ {
+ AnimState = new Animation((OSDMap)args["animation_state"]);
+ }
+ catch
+ {
+ AnimState = null;
+ }
+ }
+
//if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
//{
// OSDArray textures = (OSDArray)(args["agent_textures"]);
--
cgit v1.1
From fd9cb3cb68959c2dd42dd0645fef50161ac085a7 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 30 Oct 2012 23:08:22 +0000
Subject: Store and send the current movement animation state to a new sim on
crossing
---
OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 11 +++++++++++
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 ++++++
2 files changed, 17 insertions(+)
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index 3d8e8be..65ae445 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -45,6 +45,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation
private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation();
private List m_animations = new List();
+ public OpenSim.Framework.Animation DefaultAnimation
+ {
+ get { return m_defaultAnimation; }
+ }
+
public OpenSim.Framework.Animation ImplicitDefaultAnimation
{
get { return m_implicitDefaultAnimation; }
@@ -126,6 +131,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation
return false;
}
+ // Called from serialization only
+ public void SetImplicitDefaultAnimation(UUID animID, int sequenceNum, UUID objectID)
+ {
+ m_implicitDefaultAnimation = new OpenSim.Framework.Animation(animID, sequenceNum, objectID);
+ }
+
protected bool ResetDefaultAnimation()
{
return TrySetDefaultAnimation("STAND", 1, UUID.Zero);
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index aa82af4..71e322d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3075,6 +3075,8 @@ namespace OpenSim.Region.Framework.Scenes
cAgent.Anims = Animator.Animations.ToArray();
}
catch { }
+ cAgent.DefaultAnim = Animator.Animations.DefaultAnimation;
+ cAgent.AnimState = Animator.Animations.ImplicitDefaultAnimation;
if (Scene.AttachmentsModule != null)
Scene.AttachmentsModule.CopyAttachments(this, cAgent);
@@ -3146,6 +3148,10 @@ namespace OpenSim.Region.Framework.Scenes
// FIXME: Why is this null check necessary? Where are the cases where we get a null Anims object?
if (cAgent.Anims != null)
Animator.Animations.FromArray(cAgent.Anims);
+ if (cAgent.DefaultAnim != null)
+ Animator.Animations.SetDefaultAnimation(cAgent.DefaultAnim.AnimID, cAgent.DefaultAnim.SequenceNum, UUID.Zero);
+ if (cAgent.AnimState != null)
+ Animator.Animations.SetImplicitDefaultAnimation(cAgent.AnimState.AnimID, cAgent.AnimState.SequenceNum, UUID.Zero);
if (Scene.AttachmentsModule != null)
Scene.AttachmentsModule.CopyAttachments(cAgent, this);
--
cgit v1.1