Merge branch 'master' into careminster

avinationmerge
Melanie 2012-01-07 18:11:21 +00:00
commit 4bf2e19898
4 changed files with 24 additions and 22 deletions

View File

@ -61,11 +61,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation
public bool m_jumping = false; public bool m_jumping = false;
public float m_jumpVelocity = 0f; public float m_jumpVelocity = 0f;
// private int m_landing = 0; // private int m_landing = 0;
public bool Falling
{ /// <summary>
get { return m_falling; } /// Is the avatar falling?
} /// </summary>
private bool m_falling = false; public bool Falling { get; private set; }
private float m_fallHeight; private float m_fallHeight;
/// <value> /// <value>
@ -223,7 +224,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
m_animTickFall = 0; m_animTickFall = 0;
m_animTickJump = 0; m_animTickJump = 0;
m_jumping = false; m_jumping = false;
m_falling = true; Falling = false;
m_jumpVelocity = 0f; m_jumpVelocity = 0f;
actor.Selected = false; actor.Selected = false;
m_fallHeight = actor.Position.Z; // save latest flying height m_fallHeight = actor.Position.Z; // save latest flying height
@ -239,9 +240,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
else if (move.Z < 0f) else if (move.Z < 0f)
{ {
if (actor != null && actor.IsColliding) if (actor != null && actor.IsColliding)
{
return "LAND"; return "LAND";
}
else else
return "HOVER_DOWN"; return "HOVER_DOWN";
} }
@ -260,7 +259,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
float fallElapsed = (float)(Environment.TickCount - m_animTickFall); float fallElapsed = (float)(Environment.TickCount - m_animTickFall);
float fallVelocity = (actor != null) ? actor.Velocity.Z : 0.0f; float fallVelocity = (actor != null) ? actor.Velocity.Z : 0.0f;
if (!m_jumping && (fallVelocity < -3.0f) ) m_falling = true; if (!m_jumping && (fallVelocity < -3.0f))
Falling = true;
if (m_animTickFall == 0 || (fallVelocity >= 0.0f)) if (m_animTickFall == 0 || (fallVelocity >= 0.0f))
{ {
@ -290,7 +290,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
// Start jumping, prejump // Start jumping, prejump
m_animTickFall = 0; m_animTickFall = 0;
m_jumping = true; m_jumping = true;
m_falling = false; Falling = false;
actor.Selected = true; // borrowed for jumping flag actor.Selected = true; // borrowed for jumping flag
m_animTickJump = Environment.TickCount; m_animTickJump = Environment.TickCount;
m_jumpVelocity = 0.35f; m_jumpVelocity = 0.35f;
@ -303,7 +303,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
{ {
// end jumping // end jumping
m_jumping = false; m_jumping = false;
m_falling = false; Falling = false;
actor.Selected = false; // borrowed for jumping flag actor.Selected = false; // borrowed for jumping flag
m_jumpVelocity = 0f; m_jumpVelocity = 0f;
m_animTickFall = Environment.TickCount; m_animTickFall = Environment.TickCount;
@ -330,7 +330,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
if (CurrentMovementAnimation == "FALLDOWN") if (CurrentMovementAnimation == "FALLDOWN")
{ {
m_falling = false; Falling = false;
m_animTickFall = Environment.TickCount; m_animTickFall = Environment.TickCount;
// TODO: SOFT_LAND support // TODO: SOFT_LAND support
float fallHeight = m_fallHeight - actor.Position.Z; float fallHeight = m_fallHeight - actor.Position.Z;
@ -364,7 +364,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
if (move.X != 0f || move.Y != 0f) if (move.X != 0f || move.Y != 0f)
{ {
m_fallHeight = actor.Position.Z; // save latest flying height m_fallHeight = actor.Position.Z; // save latest flying height
m_falling = false; Falling = false;
// Walking / crouchwalking / running // Walking / crouchwalking / running
if (move.Z < 0f) if (move.Z < 0f)
return "CROUCHWALK"; return "CROUCHWALK";
@ -375,7 +375,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
} }
else if (!m_jumping) else if (!m_jumping)
{ {
m_falling = false; Falling = false;
// Not walking // Not walking
if (move.Z < 0) if (move.Z < 0)
return "CROUCH"; return "CROUCH";
@ -388,7 +388,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
} }
#endregion Ground Movement #endregion Ground Movement
m_falling = false; Falling = false;
return CurrentMovementAnimation; return CurrentMovementAnimation;
} }

View File

@ -1282,8 +1282,8 @@ namespace OpenSim.Region.Framework.Scenes
public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENE PRESENCE]: In {0} received agent update from {1}", // "[SCENE PRESENCE]: In {0} received agent update from {1}, flags {2}",
// Scene.RegionInfo.RegionName, remoteClient.Name); // Scene.RegionInfo.RegionName, remoteClient.Name, agentData.ControlFlags);
if (IsChildAgent) if (IsChildAgent)
{ {
@ -2323,6 +2323,8 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param>
public void AddNewMovement(Vector3 vec) public void AddNewMovement(Vector3 vec)
{ {
// m_log.DebugFormat("[SCENE PRESENCE]: Adding new movement {0} for {1}", vec, Name);
Vector3 direc = vec * Rotation; Vector3 direc = vec * Rotation;
direc.Normalize(); direc.Normalize();

View File

@ -2094,7 +2094,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard) public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard)
{ {
CheckThreatLevel(ThreatLevel.High, "osNpcCreated"); CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
return NpcCreate(firstname, lastname, position, notecard, false); return NpcCreate(firstname, lastname, position, notecard, false);
} }

View File

@ -66,7 +66,7 @@ namespace OpenSim.Services.Connectors
m_ServerURI = m_ServerURI.TrimEnd('/') + "/helo/"; m_ServerURI = m_ServerURI.TrimEnd('/') + "/helo/";
} }
} }
catch (UriFormatException e) catch (UriFormatException)
{ {
m_log.WarnFormat("[HELO SERVICE]: Malformed URL {0}", serverURI); m_log.WarnFormat("[HELO SERVICE]: Malformed URL {0}", serverURI);
} }