From 03139f07d7e5780dbe274e32911b4bf85d801ad8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 16 Apr 2012 17:32:30 +0200 Subject: Downgrade an error log message to info because there is nothing we can do if an asset is damaged so it should not spew red ink. --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 2 +- OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 75fa1ef..825b858 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -335,7 +335,7 @@ namespace OpenSim.Region.Physics.Meshing 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; } diff --git a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs index 8e903e8..f002bba 100644 --- a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs @@ -339,7 +339,7 @@ namespace OpenSim.Region.Physics.Meshing 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; } -- cgit v1.1 From 0fe0b2ceec2440ff284d7a494d090ce43449fd97 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 17 Apr 2012 23:39:41 +0200 Subject: Prevent objects rezzed in sim from being seen as attachments and becoming uneditable or crashers. (Foxtail of death) --- .../CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 2 ++ OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 74701a5..f41e89e 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -768,6 +768,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { g.RootPart.AttachPoint = g.RootPart.Shape.State; g.RootPart.AttachOffset = g.AbsolutePosition; + g.RootPart.Shape.State = 0; } objlist.Add(g); @@ -800,6 +801,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); g.RootPart.AttachPoint = g.RootPart.Shape.State; g.RootPart.AttachOffset = g.AbsolutePosition; + g.RootPart.Shape.State = 0; objlist.Add(g); XmlElement el = (XmlElement)n; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3fd1f5e..47020af 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1941,6 +1941,12 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE]: Storing {0}, {1} in {2}", // 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); backup_group.RootPart.Velocity = RootPart.Velocity; backup_group.RootPart.Acceleration = RootPart.Acceleration; -- cgit v1.1 From 5936e0c3760922e09099b65e3db522055db2286c Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 18 Apr 2012 19:51:27 +0200 Subject: Allow scripts in attachments owned by the NPC to control the NPC --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 68f21c8..ebf5e84 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -323,9 +323,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC { NPCAvatar av; if (m_avatars.TryGetValue(npcID, out av)) + { + if (npcID == callerID) + return true; return CheckPermissions(av, callerID); + } else + { return false; + } } } @@ -337,7 +343,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC /// true if they do, false if they don't. 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; } } } -- cgit v1.1 From 411bd0574d371315c0134b30f1984fc035d84272 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 18 Apr 2012 22:16:59 +0200 Subject: Allow setting a specific target velocity on TeleportWithMomentum --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8ac09e9..1211792 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1076,6 +1076,11 @@ namespace OpenSim.Region.Framework.Scenes public void TeleportWithMomentum(Vector3 pos) { + TeleportWithMomentum(pos, null); + } + + public void TeleportWithMomentum(Vector3 pos, Vector3? v) + { bool isFlying = Flying; Vector3 vel = Velocity; RemoveFromPhysicalScene(); @@ -1083,7 +1088,12 @@ namespace OpenSim.Region.Framework.Scenes AbsolutePosition = pos; AddToPhysicalScene(isFlying); if (PhysicsActor != null) - PhysicsActor.SetMomentum(vel); + { + if (v.HasValue) + PhysicsActor.SetMomentum((Vector3)v); + else + PhysicsActor.SetMomentum(vel); + } SendTerseUpdateToAllClients(); } -- cgit v1.1