Merge branch 'master' into httptests

httptests
UbitUmarov 2017-10-13 20:36:29 +01:00
commit 68e9baf2e0
4 changed files with 31 additions and 16 deletions

View File

@ -803,12 +803,15 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
else
so = m_scene.GetSceneObjectGroup(localId);
if (so!= null && !so.IsAttachment)
if (so!= null)
{
deletes.Add(so);
// if (deletes.Count == 0)
// m_console.OutputFormat("No objects were found with uuid {0}", match);
if(so.IsAttachment)
{
requireConfirmation = true;
m_console.OutputFormat("Warning: object with uuid {0} is a attachment", uuid);
}
}
break;
case "name":
@ -904,11 +907,11 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
if (useRegex)
{
Regex nameRegex = new Regex(name);
searchAction = so => { if (nameRegex.IsMatch(so.Name)) { sceneObjects.Add(so); }};
searchAction = so => { if (nameRegex.IsMatch(so.Name)) {if(!so.IsAttachment) sceneObjects.Add(so);}};
}
else
{
searchAction = so => { if (so.Name == name) { sceneObjects.Add(so); }};
searchAction = so => { if (so.Name == name) {if(!so.IsAttachment) sceneObjects.Add(so);}};
}
m_scene.ForEachSOG(searchAction);

View File

@ -306,14 +306,14 @@ namespace OpenSim.Region.Framework.Scenes
// If the touched prim handles touches, deliver it
if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
EventManager.TriggerObjectGrab(part.LocalId, 0, offsetPos, remoteClient, surfaceArg);
// Deliver to the root prim if the touched prim doesn't handle touches
// or if we're meant to pass on touches anyway.
if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
{
EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, offsetPos, remoteClient, surfaceArg);
}
}
@ -343,15 +343,18 @@ namespace OpenSim.Region.Framework.Scenes
if (surfaceArgs != null && surfaceArgs.Count > 0)
surfaceArg = surfaceArgs[0];
Vector3 grabOffset = pos - part.AbsolutePosition;
// If the touched prim handles touches, deliver it
if ((part.ScriptEvents & scriptEvents.touch) != 0)
EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
// EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
EventManager.TriggerObjectGrabbing(part.LocalId, 0, grabOffset, remoteClient, surfaceArg);
// Deliver to the root prim if the touched prim doesn't handle touches
// or if we're meant to pass on touches anyway.
if (((part.ScriptEvents & scriptEvents.touch) == 0) ||
(part.PassTouches && (part.LocalId != group.RootPart.LocalId)))
{
EventManager.TriggerObjectGrabbing(group.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
// EventManager.TriggerObjectGrabbing(group.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
EventManager.TriggerObjectGrabbing(group.RootPart.LocalId, part.LocalId, grabOffset, remoteClient, surfaceArg);
}
}

View File

@ -460,13 +460,19 @@ public sealed class BSCharacter : BSPhysObject
set
{
DetailLog("{0},BSCharacter.setTargetVelocity,call,vel={1}", LocalID, value);
base.m_targetVelocity = value;
OMV.Vector3 targetVel = value;
if (_setAlwaysRun && !_flying)
if (!_flying)
{
if (_setAlwaysRun)
targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 1f);
else
if (BSParam.AvatarWalkVelocityFactor != 1f)
targetVel *= new OMV.Vector3(BSParam.AvatarWalkVelocityFactor, BSParam.AvatarWalkVelocityFactor, 1f);
}
base.m_targetVelocity = targetVel;
if (m_moveActor != null)
m_moveActor.SetVelocityAndTarget(RawVelocity, targetVel, false /* inTaintTime */);
m_moveActor.SetVelocityAndTarget(RawVelocity, base.m_targetVelocity, false /* inTaintTime */);
}
}
// Directly setting velocity means this is what the user really wants now.

View File

@ -135,6 +135,7 @@ public static class BSParam
public static bool AvatarToAvatarCollisionsByDefault { get; private set; }
public static float AvatarFriction { get; private set; }
public static float AvatarStandingFriction { get; private set; }
public static float AvatarWalkVelocityFactor { get; private set; }
public static float AvatarAlwaysRunFactor { get; private set; }
public static float AvatarDensity { get; private set; }
public static float AvatarRestitution { get; private set; }
@ -604,6 +605,8 @@ public static class BSParam
0.2f ),
new ParameterDefn<float>("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.",
0.95f ),
new ParameterDefn<float>("AvatarWalkVelocityFactor", "Speed multiplier if avatar is walking",
1.0f ),
new ParameterDefn<float>("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run",
1.3f ),
// For historical reasons, density is reported * 100