Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-11-11 19:40:31 +00:00
commit 8f4955f6a9
6 changed files with 285 additions and 274 deletions

View File

@ -28,3 +28,5 @@ From the distribution type:
Helpful resources:
* http://opensimulator.org/wiki/Build_Instructions

View File

@ -180,12 +180,17 @@ namespace OpenSim.Region.Framework.Scenes.Animation
bool heldBack = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG);
bool heldLeft = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS);
bool heldRight = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG);
//bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT;
//bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT;
bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT;
bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT;
bool heldUp = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == AgentManager.ControlFlags.AGENT_CONTROL_UP_POS;
bool heldDown = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG;
//bool flying = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) == AgentManager.ControlFlags.AGENT_CONTROL_FLY;
//bool mouselook = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) == AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK;
if (heldForward || heldBack || heldLeft || heldRight || heldUp || heldDown)
{
heldTurnLeft = false;
heldTurnRight = false;
}
// Direction in which the avatar is trying to move
Vector3 move = Vector3.Zero;
@ -363,10 +368,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
// Not walking
if (move.Z < 0)
return "CROUCH";
// else if (heldTurnLeft)
// return "TURNLEFT";
// else if (heldTurnRight)
// return "TURNRIGHT";
else if (heldTurnLeft)
return "TURNLEFT";
else if (heldTurnRight)
return "TURNRIGHT";
else
return "STAND";
}

View File

@ -1661,11 +1661,16 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="childPrims"></param>
protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children)
{
SceneObjectGroup parentGroup = root.ParentGroup;
if (parentGroup == null) return;
// Cowardly refuse to link to a group owned root
if (parentGroup.OwnerID == parentGroup.GroupID)
return;
Monitor.Enter(m_updateLock);
try
{
SceneObjectGroup parentGroup = root.ParentGroup;
List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>();
// We do this in reverse to get the link order of the prims correct
@ -1682,6 +1687,8 @@ namespace OpenSim.Region.Framework.Scenes
}
foreach (SceneObjectGroup child in childGroups)
{
if (parentGroup.OwnerID == child.OwnerID)
{
parentGroup.LinkToGroup(child);
@ -1689,6 +1696,7 @@ namespace OpenSim.Region.Framework.Scenes
// Don't remove! Bad juju! Stay away! or fix physics!
child.AbsolutePosition = child.AbsolutePosition;
}
}
// We need to explicitly resend the newly link prim's object properties since no other actions
// occur on link to invoke this elsewhere (such as object selection)
@ -1725,9 +1733,14 @@ namespace OpenSim.Region.Framework.Scenes
if (part.ParentGroup.PrimCount != 1) // Skip single
{
if (part.LinkNum < 2) // Root
{
rootParts.Add(part);
}
else
{
part.LastOwnerID = part.ParentGroup.RootPart.LastOwnerID;
childParts.Add(part);
}
SceneObjectGroup group = part.ParentGroup;
if (!affectedGroups.Contains(group))

View File

@ -1873,7 +1873,7 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
/// Send metadata about the root prim (name, description, sale price, etc.) to a client.
/// Send metadata about the root prim (name, description, sale price, permissions, etc.) to a client.
/// </summary>
/// <param name="client"></param>
public void SendPropertiesToClient(IClientAPI client)
@ -2481,6 +2481,11 @@ namespace OpenSim.Region.Framework.Scenes
parts[i].UpdatePermissions(AgentID, field, localID, mask, addRemTF);
HasGroupChanged = true;
// Send the group's properties to all clients once all parts are updated
IClientAPI client;
if (Scene.TryGetClient(AgentID, out client))
SendPropertiesToClient(client);
}
#endregion

File diff suppressed because it is too large Load Diff

View File

@ -1387,6 +1387,11 @@ namespace OpenSim.Region.Framework.Scenes
if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0)
m_updateCount = UPDATE_COUNT;
// Make turning in place work
if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0 ||
(flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0)
m_updateCount = UPDATE_COUNT;
if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0)
{
StandUp();