diff options
-rw-r--r-- | OpenSim/Framework/ChildAgentDataUpdate.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 8 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IAssetService.cs | 6 |
6 files changed, 54 insertions, 8 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index e718aa6..8c32734 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -312,6 +312,7 @@ namespace OpenSim.Framework | |||
312 | public AgentGroupData[] Groups; | 312 | public AgentGroupData[] Groups; |
313 | public Animation[] Anims; | 313 | public Animation[] Anims; |
314 | public Animation DefaultAnim = null; | 314 | public Animation DefaultAnim = null; |
315 | public Animation AnimState = null; | ||
315 | 316 | ||
316 | public UUID GranterID; | 317 | public UUID GranterID; |
317 | public UUID ParentPart; | 318 | public UUID ParentPart; |
@@ -403,6 +404,11 @@ namespace OpenSim.Framework | |||
403 | args["default_animation"] = DefaultAnim.PackUpdateMessage(); | 404 | args["default_animation"] = DefaultAnim.PackUpdateMessage(); |
404 | } | 405 | } |
405 | 406 | ||
407 | if (AnimState != null) | ||
408 | { | ||
409 | args["animation_state"] = AnimState.PackUpdateMessage(); | ||
410 | } | ||
411 | |||
406 | if (Appearance != null) | 412 | if (Appearance != null) |
407 | args["packed_appearance"] = Appearance.Pack(); | 413 | args["packed_appearance"] = Appearance.Pack(); |
408 | 414 | ||
@@ -612,6 +618,18 @@ namespace OpenSim.Framework | |||
612 | } | 618 | } |
613 | } | 619 | } |
614 | 620 | ||
621 | if (args["animation_state"] != null) | ||
622 | { | ||
623 | try | ||
624 | { | ||
625 | AnimState = new Animation((OSDMap)args["animation_state"]); | ||
626 | } | ||
627 | catch | ||
628 | { | ||
629 | AnimState = null; | ||
630 | } | ||
631 | } | ||
632 | |||
615 | //if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array) | 633 | //if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array) |
616 | //{ | 634 | //{ |
617 | // OSDArray textures = (OSDArray)(args["agent_textures"]); | 635 | // OSDArray textures = (OSDArray)(args["agent_textures"]); |
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 | |||
45 | private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); | 45 | private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); |
46 | private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); | 46 | private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); |
47 | 47 | ||
48 | public OpenSim.Framework.Animation DefaultAnimation | ||
49 | { | ||
50 | get { return m_defaultAnimation; } | ||
51 | } | ||
52 | |||
48 | public OpenSim.Framework.Animation ImplicitDefaultAnimation | 53 | public OpenSim.Framework.Animation ImplicitDefaultAnimation |
49 | { | 54 | { |
50 | get { return m_implicitDefaultAnimation; } | 55 | get { return m_implicitDefaultAnimation; } |
@@ -126,6 +131,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
126 | return false; | 131 | return false; |
127 | } | 132 | } |
128 | 133 | ||
134 | // Called from serialization only | ||
135 | public void SetImplicitDefaultAnimation(UUID animID, int sequenceNum, UUID objectID) | ||
136 | { | ||
137 | m_implicitDefaultAnimation = new OpenSim.Framework.Animation(animID, sequenceNum, objectID); | ||
138 | } | ||
139 | |||
129 | protected bool ResetDefaultAnimation() | 140 | protected bool ResetDefaultAnimation() |
130 | { | 141 | { |
131 | return TrySetDefaultAnimation("STAND", 1, UUID.Zero); | 142 | return TrySetDefaultAnimation("STAND", 1, UUID.Zero); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2066536..4282b46 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1748,15 +1748,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1748 | 1748 | ||
1749 | private void CheckAtTargets() | 1749 | private void CheckAtTargets() |
1750 | { | 1750 | { |
1751 | List<SceneObjectGroup> objs = new List<SceneObjectGroup>(); | 1751 | List<SceneObjectGroup> objs = null; |
1752 | |||
1752 | lock (m_groupsWithTargets) | 1753 | lock (m_groupsWithTargets) |
1753 | { | 1754 | { |
1754 | foreach (SceneObjectGroup grp in m_groupsWithTargets.Values) | 1755 | if (m_groupsWithTargets.Count != 0) |
1755 | objs.Add(grp); | 1756 | objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values); |
1756 | } | 1757 | } |
1757 | 1758 | ||
1758 | foreach (SceneObjectGroup entry in objs) | 1759 | if (objs != null) |
1759 | entry.checkAtTargets(); | 1760 | { |
1761 | foreach (SceneObjectGroup entry in objs) | ||
1762 | entry.checkAtTargets(); | ||
1763 | } | ||
1760 | } | 1764 | } |
1761 | 1765 | ||
1762 | /// <summary> | 1766 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 285d1ae..f9c7935 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3276,7 +3276,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3276 | cAgent.Anims = Animator.Animations.ToArray(); | 3276 | cAgent.Anims = Animator.Animations.ToArray(); |
3277 | } | 3277 | } |
3278 | catch { } | 3278 | catch { } |
3279 | cAgent.DefaultAnim = Animator.Animations.ImplicitDefaultAnimation; | 3279 | cAgent.DefaultAnim = Animator.Animations.DefaultAnimation; |
3280 | cAgent.AnimState = Animator.Animations.ImplicitDefaultAnimation; | ||
3280 | 3281 | ||
3281 | if (Scene.AttachmentsModule != null) | 3282 | if (Scene.AttachmentsModule != null) |
3282 | Scene.AttachmentsModule.CopyAttachments(this, cAgent); | 3283 | Scene.AttachmentsModule.CopyAttachments(this, cAgent); |
@@ -3353,6 +3354,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3353 | Animator.Animations.FromArray(cAgent.Anims); | 3354 | Animator.Animations.FromArray(cAgent.Anims); |
3354 | if (cAgent.DefaultAnim != null) | 3355 | if (cAgent.DefaultAnim != null) |
3355 | Animator.Animations.SetDefaultAnimation(cAgent.DefaultAnim.AnimID, cAgent.DefaultAnim.SequenceNum, UUID.Zero); | 3356 | Animator.Animations.SetDefaultAnimation(cAgent.DefaultAnim.AnimID, cAgent.DefaultAnim.SequenceNum, UUID.Zero); |
3357 | if (cAgent.AnimState != null) | ||
3358 | Animator.Animations.SetImplicitDefaultAnimation(cAgent.AnimState.AnimID, cAgent.AnimState.SequenceNum, UUID.Zero); | ||
3356 | 3359 | ||
3357 | if (Scene.AttachmentsModule != null) | 3360 | if (Scene.AttachmentsModule != null) |
3358 | Scene.AttachmentsModule.CopyAttachments(cAgent, this); | 3361 | Scene.AttachmentsModule.CopyAttachments(cAgent, this); |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index b5beffc..a59f63f 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -3357,7 +3357,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
3357 | 3357 | ||
3358 | private void MeshAssetReceived(AssetBase asset) | 3358 | private void MeshAssetReceived(AssetBase asset) |
3359 | { | 3359 | { |
3360 | if (asset.Data != null && asset.Data.Length > 0) | 3360 | if (asset != null && asset.Data != null && asset.Data.Length > 0) |
3361 | { | 3361 | { |
3362 | if (!_pbs.SculptEntry) | 3362 | if (!_pbs.SculptEntry) |
3363 | return; | 3363 | return; |
@@ -3370,6 +3370,12 @@ Console.WriteLine(" JointCreateFixed"); | |||
3370 | m_taintshape = true; | 3370 | m_taintshape = true; |
3371 | _parent_scene.AddPhysicsActorTaint(this); | 3371 | _parent_scene.AddPhysicsActorTaint(this); |
3372 | } | 3372 | } |
3373 | else | ||
3374 | { | ||
3375 | m_log.WarnFormat( | ||
3376 | "[ODE PRIM]: Could not get mesh/sculpt asset {0} for {1} at {2} in {3}", | ||
3377 | _pbs.SculptTexture, Name, _position, _parent_scene.Name); | ||
3378 | } | ||
3373 | } | 3379 | } |
3374 | } | 3380 | } |
3375 | } | 3381 | } |
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 | |||
68 | /// </summary> | 68 | /// </summary> |
69 | /// <param name="id">The asset id</param> | 69 | /// <param name="id">The asset id</param> |
70 | /// <param name="sender">Represents the requester. Passed back via the handler</param> | 70 | /// <param name="sender">Represents the requester. Passed back via the handler</param> |
71 | /// <param name="handler">The handler to call back once the asset has been retrieved</param> | 71 | /// <param name="handler"> |
72 | /// The handler to call back once the asset has been retrieved. This will be called back with a null AssetBase | ||
73 | /// if the asset could not be found for some reason (e.g. if it does not exist, if a remote asset service | ||
74 | /// was not contactable, if it is not in the database, etc.). | ||
75 | /// </param> | ||
72 | /// <returns>True if the id was parseable, false otherwise</returns> | 76 | /// <returns>True if the id was parseable, false otherwise</returns> |
73 | bool Get(string id, Object sender, AssetRetrieved handler); | 77 | bool Get(string id, Object sender, AssetRetrieved handler); |
74 | 78 | ||