Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
UbitUmarov 2012-04-19 01:52:23 +01:00
commit 9b02e1cf4a
6 changed files with 28 additions and 4 deletions

View File

@ -768,6 +768,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
{ {
g.RootPart.AttachPoint = g.RootPart.Shape.State; g.RootPart.AttachPoint = g.RootPart.Shape.State;
g.RootPart.AttachOffset = g.AbsolutePosition; g.RootPart.AttachOffset = g.AbsolutePosition;
g.RootPart.Shape.State = 0;
} }
objlist.Add(g); objlist.Add(g);
@ -800,6 +801,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
g.RootPart.AttachPoint = g.RootPart.Shape.State; g.RootPart.AttachPoint = g.RootPart.Shape.State;
g.RootPart.AttachOffset = g.AbsolutePosition; g.RootPart.AttachOffset = g.AbsolutePosition;
g.RootPart.Shape.State = 0;
objlist.Add(g); objlist.Add(g);
XmlElement el = (XmlElement)n; XmlElement el = (XmlElement)n;

View File

@ -1941,6 +1941,12 @@ namespace OpenSim.Region.Framework.Scenes
// "[SCENE]: Storing {0}, {1} in {2}", // "[SCENE]: Storing {0}, {1} in {2}",
// Name, UUID, m_scene.RegionInfo.RegionName); // Name, UUID, m_scene.RegionInfo.RegionName);
if (RootPart.Shape.PCode == 9 && RootPart.Shape.State != 0)
{
RootPart.Shape.State = 0;
ScheduleGroupForFullUpdate();
}
SceneObjectGroup backup_group = Copy(false); SceneObjectGroup backup_group = Copy(false);
backup_group.RootPart.Velocity = RootPart.Velocity; backup_group.RootPart.Velocity = RootPart.Velocity;
backup_group.RootPart.Acceleration = RootPart.Acceleration; backup_group.RootPart.Acceleration = RootPart.Acceleration;

View File

@ -1075,6 +1075,11 @@ namespace OpenSim.Region.Framework.Scenes
} }
public void TeleportWithMomentum(Vector3 pos) public void TeleportWithMomentum(Vector3 pos)
{
TeleportWithMomentum(pos, null);
}
public void TeleportWithMomentum(Vector3 pos, Vector3? v)
{ {
bool isFlying = Flying; bool isFlying = Flying;
Vector3 vel = Velocity; Vector3 vel = Velocity;
@ -1083,7 +1088,12 @@ namespace OpenSim.Region.Framework.Scenes
AbsolutePosition = pos; AbsolutePosition = pos;
AddToPhysicalScene(isFlying); AddToPhysicalScene(isFlying);
if (PhysicsActor != null) if (PhysicsActor != null)
{
if (v.HasValue)
PhysicsActor.SetMomentum((Vector3)v);
else
PhysicsActor.SetMomentum(vel); PhysicsActor.SetMomentum(vel);
}
SendTerseUpdateToAllClients(); SendTerseUpdateToAllClients();
} }

View File

@ -323,11 +323,17 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{ {
NPCAvatar av; NPCAvatar av;
if (m_avatars.TryGetValue(npcID, out av)) if (m_avatars.TryGetValue(npcID, out av))
{
if (npcID == callerID)
return true;
return CheckPermissions(av, callerID); return CheckPermissions(av, callerID);
}
else else
{
return false; return false;
} }
} }
}
/// <summary> /// <summary>
/// Check if the caller has permission to manipulate the given NPC. /// Check if the caller has permission to manipulate the given NPC.
@ -337,7 +343,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
/// <returns>true if they do, false if they don't.</returns> /// <returns>true if they do, false if they don't.</returns>
private bool CheckPermissions(NPCAvatar av, UUID callerID) private bool CheckPermissions(NPCAvatar av, UUID callerID)
{ {
return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID; return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID || av.AgentId == callerID;
} }
} }
} }

View File

@ -335,7 +335,7 @@ namespace OpenSim.Region.Physics.Meshing
if (primShape.SculptData.Length <= 0) if (primShape.SculptData.Length <= 0)
{ {
m_log.ErrorFormat("[MESH]: asset data for {0} is zero length", primName); m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName);
return false; return false;
} }

View File

@ -339,7 +339,7 @@ namespace OpenSim.Region.Physics.Meshing
if (primShape.SculptData.Length <= 0) if (primShape.SculptData.Length <= 0)
{ {
m_log.ErrorFormat("[MESH]: asset data for {0} is zero length", primName); m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName);
return false; return false;
} }