Merge branch 'master' into careminster

Conflicts:
	OpenSim/Framework/ChildAgentDataUpdate.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
avinationmerge
Melanie 2012-10-31 00:13:33 +00:00
commit 28a4ea73ea
6 changed files with 54 additions and 8 deletions

View File

@ -312,6 +312,7 @@ namespace OpenSim.Framework
public AgentGroupData[] Groups; public AgentGroupData[] Groups;
public Animation[] Anims; public Animation[] Anims;
public Animation DefaultAnim = null; public Animation DefaultAnim = null;
public Animation AnimState = null;
public UUID GranterID; public UUID GranterID;
public UUID ParentPart; public UUID ParentPart;
@ -403,6 +404,11 @@ namespace OpenSim.Framework
args["default_animation"] = DefaultAnim.PackUpdateMessage(); args["default_animation"] = DefaultAnim.PackUpdateMessage();
} }
if (AnimState != null)
{
args["animation_state"] = AnimState.PackUpdateMessage();
}
if (Appearance != null) if (Appearance != null)
args["packed_appearance"] = Appearance.Pack(); args["packed_appearance"] = Appearance.Pack();
@ -612,6 +618,18 @@ namespace OpenSim.Framework
} }
} }
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) //if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
//{ //{
// OSDArray textures = (OSDArray)(args["agent_textures"]); // OSDArray textures = (OSDArray)(args["agent_textures"]);

View File

@ -45,6 +45,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation
private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation();
private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>();
public OpenSim.Framework.Animation DefaultAnimation
{
get { return m_defaultAnimation; }
}
public OpenSim.Framework.Animation ImplicitDefaultAnimation public OpenSim.Framework.Animation ImplicitDefaultAnimation
{ {
get { return m_implicitDefaultAnimation; } get { return m_implicitDefaultAnimation; }
@ -126,6 +131,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation
return false; 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() protected bool ResetDefaultAnimation()
{ {
return TrySetDefaultAnimation("STAND", 1, UUID.Zero); return TrySetDefaultAnimation("STAND", 1, UUID.Zero);

View File

@ -1748,15 +1748,19 @@ namespace OpenSim.Region.Framework.Scenes
private void CheckAtTargets() private void CheckAtTargets()
{ {
List<SceneObjectGroup> objs = new List<SceneObjectGroup>(); List<SceneObjectGroup> objs = null;
lock (m_groupsWithTargets) lock (m_groupsWithTargets)
{ {
foreach (SceneObjectGroup grp in m_groupsWithTargets.Values) if (m_groupsWithTargets.Count != 0)
objs.Add(grp); objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values);
} }
foreach (SceneObjectGroup entry in objs) if (objs != null)
entry.checkAtTargets(); {
foreach (SceneObjectGroup entry in objs)
entry.checkAtTargets();
}
} }
/// <summary> /// <summary>

View File

@ -3276,7 +3276,8 @@ namespace OpenSim.Region.Framework.Scenes
cAgent.Anims = Animator.Animations.ToArray(); cAgent.Anims = Animator.Animations.ToArray();
} }
catch { } catch { }
cAgent.DefaultAnim = Animator.Animations.ImplicitDefaultAnimation; cAgent.DefaultAnim = Animator.Animations.DefaultAnimation;
cAgent.AnimState = Animator.Animations.ImplicitDefaultAnimation;
if (Scene.AttachmentsModule != null) if (Scene.AttachmentsModule != null)
Scene.AttachmentsModule.CopyAttachments(this, cAgent); Scene.AttachmentsModule.CopyAttachments(this, cAgent);
@ -3353,6 +3354,8 @@ namespace OpenSim.Region.Framework.Scenes
Animator.Animations.FromArray(cAgent.Anims); Animator.Animations.FromArray(cAgent.Anims);
if (cAgent.DefaultAnim != null) if (cAgent.DefaultAnim != null)
Animator.Animations.SetDefaultAnimation(cAgent.DefaultAnim.AnimID, cAgent.DefaultAnim.SequenceNum, UUID.Zero); 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) if (Scene.AttachmentsModule != null)
Scene.AttachmentsModule.CopyAttachments(cAgent, this); Scene.AttachmentsModule.CopyAttachments(cAgent, this);

View File

@ -3357,7 +3357,7 @@ Console.WriteLine(" JointCreateFixed");
private void MeshAssetReceived(AssetBase asset) 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) if (!_pbs.SculptEntry)
return; return;
@ -3370,6 +3370,12 @@ Console.WriteLine(" JointCreateFixed");
m_taintshape = true; m_taintshape = true;
_parent_scene.AddPhysicsActorTaint(this); _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);
}
} }
} }
} }

View File

@ -68,7 +68,11 @@ namespace OpenSim.Services.Interfaces
/// </summary> /// </summary>
/// <param name="id">The asset id</param> /// <param name="id">The asset id</param>
/// <param name="sender">Represents the requester. Passed back via the handler</param> /// <param name="sender">Represents the requester. Passed back via the handler</param>
/// <param name="handler">The handler to call back once the asset has been retrieved</param> /// <param name="handler">
/// 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.).
/// </param>
/// <returns>True if the id was parseable, false otherwise</returns> /// <returns>True if the id was parseable, false otherwise</returns>
bool Get(string id, Object sender, AssetRetrieved handler); bool Get(string id, Object sender, AssetRetrieved handler);