Merge branch 'master' into httptests
commit
01bd578bb0
|
@ -375,6 +375,7 @@ namespace OpenSim.Framework
|
||||||
public string ActiveGroupTitle = null;
|
public string ActiveGroupTitle = null;
|
||||||
public UUID agentCOF;
|
public UUID agentCOF;
|
||||||
public byte CrossingFlags;
|
public byte CrossingFlags;
|
||||||
|
public byte CrossExtraFlags;
|
||||||
|
|
||||||
public Dictionary<ulong, string> ChildrenCapSeeds = null;
|
public Dictionary<ulong, string> ChildrenCapSeeds = null;
|
||||||
public Animation[] Anims;
|
public Animation[] Anims;
|
||||||
|
@ -454,6 +455,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
args["agent_cof"] = OSD.FromUUID(agentCOF);
|
args["agent_cof"] = OSD.FromUUID(agentCOF);
|
||||||
args["crossingflags"] = OSD.FromInteger(CrossingFlags);
|
args["crossingflags"] = OSD.FromInteger(CrossingFlags);
|
||||||
|
if(CrossingFlags != 0)
|
||||||
|
args["crossExtraFlags"] = OSD.FromInteger(CrossExtraFlags);
|
||||||
|
|
||||||
args["active_group_id"] = OSD.FromUUID(ActiveGroupID);
|
args["active_group_id"] = OSD.FromUUID(ActiveGroupID);
|
||||||
args["active_group_name"] = OSD.FromString(ActiveGroupName);
|
args["active_group_name"] = OSD.FromString(ActiveGroupName);
|
||||||
|
@ -646,6 +649,12 @@ namespace OpenSim.Framework
|
||||||
if (args.ContainsKey("crossingflags") && args["crossingflags"] != null)
|
if (args.ContainsKey("crossingflags") && args["crossingflags"] != null)
|
||||||
CrossingFlags = (byte)args["crossingflags"].AsInteger();
|
CrossingFlags = (byte)args["crossingflags"].AsInteger();
|
||||||
|
|
||||||
|
if(CrossingFlags != 0)
|
||||||
|
{
|
||||||
|
if (args.ContainsKey("crossExtraFlags") && args["crossExtraFlags"] != null)
|
||||||
|
CrossExtraFlags = (byte)args["crossExtraFlags"].AsInteger();
|
||||||
|
}
|
||||||
|
|
||||||
if (args.ContainsKey("active_group_id") && args["active_group_id"] != null)
|
if (args.ContainsKey("active_group_id") && args["active_group_id"] != null)
|
||||||
ActiveGroupID = args["active_group_id"].AsUUID();
|
ActiveGroupID = args["active_group_id"].AsUUID();
|
||||||
|
|
||||||
|
|
|
@ -2120,7 +2120,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
lock (m_returns)
|
lock (m_returns)
|
||||||
{
|
{
|
||||||
EventManager.TriggerOnBackup(SimulationDataService, forced);
|
EventManager.TriggerOnBackup(SimulationDataService, forced);
|
||||||
m_backingup = false;
|
|
||||||
|
|
||||||
foreach (KeyValuePair<UUID, ReturnInfo> ret in m_returns)
|
foreach (KeyValuePair<UUID, ReturnInfo> ret in m_returns)
|
||||||
{
|
{
|
||||||
|
@ -2151,6 +2150,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
tr.SendInstantMessage(msg, delegate(bool success) { });
|
tr.SendInstantMessage(msg, delegate(bool success) { });
|
||||||
}
|
}
|
||||||
m_returns.Clear();
|
m_returns.Clear();
|
||||||
|
m_backingup = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -364,6 +364,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//PauPaw:Proper PID Controler for autopilot************
|
//PauPaw:Proper PID Controler for autopilot************
|
||||||
public bool MovingToTarget { get; private set; }
|
public bool MovingToTarget { get; private set; }
|
||||||
public Vector3 MoveToPositionTarget { get; private set; }
|
public Vector3 MoveToPositionTarget { get; private set; }
|
||||||
|
private double m_delayedStop = -1.0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controls whether an avatar automatically moving to a target will land when it gets there (if flying).
|
/// Controls whether an avatar automatically moving to a target will land when it gets there (if flying).
|
||||||
|
@ -2732,7 +2733,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
agent_control_v3.Z = 0;
|
agent_control_v3.Z = 0;
|
||||||
// else if(AgentControlStopActive %% Velocity.Z <0.01f)
|
// else if(AgentControlStopActive %% Velocity.Z <0.01f)
|
||||||
|
|
||||||
|
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name);
|
// m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name);
|
||||||
|
|
||||||
// If the agent update does move the avatar, then calculate the force ready for the velocity update,
|
// If the agent update does move the avatar, then calculate the force ready for the velocity update,
|
||||||
|
@ -2741,6 +2741,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update
|
// held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update
|
||||||
// if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the
|
// if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the
|
||||||
// avatar location in place).
|
// avatar location in place).
|
||||||
|
|
||||||
if (update_movementflag
|
if (update_movementflag
|
||||||
|| (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0)))
|
|| (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0)))
|
||||||
{
|
{
|
||||||
|
@ -2757,12 +2758,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(MovingToTarget ||
|
||||||
|
(Animator.currentControlState != ScenePresenceAnimator.motionControlStates.flying &&
|
||||||
|
Animator.currentControlState != ScenePresenceAnimator.motionControlStates.onsurface)
|
||||||
|
)
|
||||||
AddNewMovement(agent_control_v3);
|
AddNewMovement(agent_control_v3);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (MovementFlag != 0)
|
||||||
|
AddNewMovement(agent_control_v3);
|
||||||
|
else
|
||||||
|
m_delayedStop = Util.GetTimeStampMS() + 200.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
if (update_movementflag && ParentID == 0 && m_delayedStop < 0)
|
||||||
|
|
||||||
if (update_movementflag && ParentID == 0)
|
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: Updating movement animations for {0}", Name);
|
// m_log.DebugFormat("[SCENE PRESENCE]: Updating movement animations for {0}", Name);
|
||||||
Animator.UpdateMovementAnimations();
|
Animator.UpdateMovementAnimations();
|
||||||
|
@ -3016,6 +3027,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </param>
|
/// </param>
|
||||||
public void MoveToTarget(Vector3 pos, bool noFly, bool landAtTarget)
|
public void MoveToTarget(Vector3 pos, bool noFly, bool landAtTarget)
|
||||||
{
|
{
|
||||||
|
m_delayedStop = -1;
|
||||||
|
|
||||||
if (SitGround)
|
if (SitGround)
|
||||||
StandUp();
|
StandUp();
|
||||||
|
|
||||||
|
@ -3671,7 +3684,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}",
|
// "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}",
|
||||||
// vec, Rotation, thisAddSpeedModifier, Name);
|
// vec, Rotation, thisAddSpeedModifier, Name);
|
||||||
|
m_delayedStop = -1;
|
||||||
// rotate from avatar coord space to world
|
// rotate from avatar coord space to world
|
||||||
Quaternion rot = Rotation;
|
Quaternion rot = Rotation;
|
||||||
if (!Flying && PresenceType != PresenceType.Npc)
|
if (!Flying && PresenceType != PresenceType.Npc)
|
||||||
|
@ -3689,7 +3702,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
direc.Z = 0f; // Prevent camera WASD up.
|
direc.Z = 0f; // Prevent camera WASD up.
|
||||||
|
|
||||||
// odd rescalings
|
// odd rescalings
|
||||||
direc *= 0.03f * 128f * SpeedModifier * thisAddSpeedModifier;
|
direc *= 0.032f * 128f * SpeedModifier * thisAddSpeedModifier;
|
||||||
|
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: Force to apply before modification was {0} for {1}", direc, Name);
|
// m_log.DebugFormat("[SCENE PRESENCE]: Force to apply before modification was {0} for {1}", direc, Name);
|
||||||
|
|
||||||
|
@ -3754,10 +3767,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if(MovingToTarget)
|
if(MovingToTarget)
|
||||||
{
|
{
|
||||||
|
m_delayedStop = -1;
|
||||||
Vector3 control = Vector3.Zero;
|
Vector3 control = Vector3.Zero;
|
||||||
if(HandleMoveToTargetUpdate(1f, ref control))
|
if(HandleMoveToTargetUpdate(1f, ref control))
|
||||||
AddNewMovement(control);
|
AddNewMovement(control);
|
||||||
}
|
}
|
||||||
|
else if(m_delayedStop > 0)
|
||||||
|
{
|
||||||
|
if(IsSatOnObject)
|
||||||
|
m_delayedStop = -1;
|
||||||
|
else
|
||||||
|
if(Util.GetTimeStampMS() > m_delayedStop)
|
||||||
|
AddNewMovement(Vector3.Zero);
|
||||||
|
}
|
||||||
|
|
||||||
if (Appearance.AvatarSize != m_lastSize)
|
if (Appearance.AvatarSize != m_lastSize)
|
||||||
SendAvatarDataToAllAgents();
|
SendAvatarDataToAllAgents();
|
||||||
|
@ -4668,6 +4690,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
cAgent.CrossingFlags = crossingFlags;
|
cAgent.CrossingFlags = crossingFlags;
|
||||||
cAgent.CrossingFlags |= 1;
|
cAgent.CrossingFlags |= 1;
|
||||||
|
cAgent.CrossExtraFlags = 0;
|
||||||
|
if((LastCommands & ScriptControlled.CONTROL_LBUTTON) != 0)
|
||||||
|
cAgent.CrossExtraFlags |= 1;
|
||||||
|
if((LastCommands & ScriptControlled.CONTROL_ML_LBUTTON) != 0)
|
||||||
|
cAgent.CrossExtraFlags |= 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cAgent.CrossingFlags = 0;
|
cAgent.CrossingFlags = 0;
|
||||||
|
@ -4782,6 +4809,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
crossingFlags = cAgent.CrossingFlags;
|
crossingFlags = cAgent.CrossingFlags;
|
||||||
gotCrossUpdate = (crossingFlags != 0);
|
gotCrossUpdate = (crossingFlags != 0);
|
||||||
|
if(gotCrossUpdate)
|
||||||
|
{
|
||||||
|
LastCommands &= ~(ScriptControlled.CONTROL_LBUTTON | ScriptControlled.CONTROL_ML_LBUTTON);
|
||||||
|
if((cAgent.CrossExtraFlags & 1) != 0)
|
||||||
|
LastCommands |= ScriptControlled.CONTROL_LBUTTON;
|
||||||
|
if((cAgent.CrossExtraFlags & 2) != 0)
|
||||||
|
LastCommands |= ScriptControlled.CONTROL_ML_LBUTTON;
|
||||||
|
MouseDown = (cAgent.CrossExtraFlags & 3) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
haveGroupInformation = false;
|
haveGroupInformation = false;
|
||||||
// using this as protocol detection don't want to mess with the numbers for now
|
// using this as protocol detection don't want to mess with the numbers for now
|
||||||
|
@ -5751,29 +5787,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (scriptedcontrols.Count <= 0)
|
if (scriptedcontrols.Count <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ScriptControlled allflags = ScriptControlled.CONTROL_ZERO;
|
ScriptControlled allflags;
|
||||||
|
// convert mouse from edge to level
|
||||||
if (MouseDown)
|
if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_UP) != 0 ||
|
||||||
{
|
(flags & unchecked((uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_UP)) != 0)
|
||||||
allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON);
|
|
||||||
if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_UP) != 0 || (flags & unchecked((uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_UP)) != 0)
|
|
||||||
{
|
{
|
||||||
allflags = ScriptControlled.CONTROL_ZERO;
|
allflags = ScriptControlled.CONTROL_ZERO;
|
||||||
MouseDown = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else // recover last state of mouse
|
||||||
|
allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON);
|
||||||
|
|
||||||
if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0)
|
if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0)
|
||||||
{
|
|
||||||
allflags |= ScriptControlled.CONTROL_ML_LBUTTON;
|
allflags |= ScriptControlled.CONTROL_ML_LBUTTON;
|
||||||
MouseDown = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0)
|
if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0)
|
||||||
{
|
|
||||||
allflags |= ScriptControlled.CONTROL_LBUTTON;
|
allflags |= ScriptControlled.CONTROL_LBUTTON;
|
||||||
MouseDown = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// find all activated controls, whether the scripts are interested in them or not
|
// find all activated controls, whether the scripts are interested in them or not
|
||||||
if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0)
|
if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0)
|
||||||
|
@ -5837,6 +5865,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
LastCommands = allflags;
|
LastCommands = allflags;
|
||||||
|
MouseDown = (allflags & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON)) != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue