From 55400ff7be55b1c8dbededca68e6fce42cd6ce0f Mon Sep 17 00:00:00 2001 From: teravus Date: Fri, 23 Aug 2013 00:28:36 -0500 Subject: * This increases accuracy when border crossing (the reason is.. the border crossing code will use velocity to predict where the object should be, so setting it to zero. It still looses about 0.0045 per loop. --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index d773ee7..f96b56a 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -644,8 +644,8 @@ namespace OpenSim.Region.Framework.Scenes // m_group.AbsolutePosition += motionThisFrame; m_nextPosition = m_group.AbsolutePosition + motionThisFrame; m_group.AbsolutePosition = m_nextPosition; - - //m_group.RootPart.Velocity = v; + if ((m_group.AbsolutePosition.X < 10 || m_group.AbsolutePosition.Y < 10 || m_group.AbsolutePosition.X > Constants.RegionSize - 10 || m_group.AbsolutePosition.Y > Constants.RegionSize - 10)) + m_group.RootPart.Velocity = v; update = true; } @@ -736,12 +736,12 @@ namespace OpenSim.Region.Framework.Scenes m_waitingCrossing = true; // to remove / retune to smoth crossings - if (m_group.RootPart.Velocity != Vector3.Zero) - { - m_group.RootPart.Velocity = Vector3.Zero; - m_group.SendGroupRootTerseUpdate(); + //if (m_group.RootPart.Velocity != Vector3.Zero) + //{ + // m_group.RootPart.Velocity = Vector3.Zero; + // m_group.SendGroupRootTerseUpdate(); // m_group.RootPart.ScheduleTerseUpdate(); - } + //} } public void CrossingFailure() -- cgit v1.1 From 58359788a915afd80d5fb2ff9f069cda6c841c81 Mon Sep 17 00:00:00 2001 From: teravus Date: Sat, 24 Aug 2013 05:54:08 -0500 Subject: Revert "* This increases accuracy when border crossing (the reason is.. the border crossing code will use velocity to predict where the object should be, so setting it to zero. It still looses about 0.0045 per loop." This reverts commit 55400ff7be55b1c8dbededca68e6fce42cd6ce0f. --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index f96b56a..d773ee7 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -644,8 +644,8 @@ namespace OpenSim.Region.Framework.Scenes // m_group.AbsolutePosition += motionThisFrame; m_nextPosition = m_group.AbsolutePosition + motionThisFrame; m_group.AbsolutePosition = m_nextPosition; - if ((m_group.AbsolutePosition.X < 10 || m_group.AbsolutePosition.Y < 10 || m_group.AbsolutePosition.X > Constants.RegionSize - 10 || m_group.AbsolutePosition.Y > Constants.RegionSize - 10)) - m_group.RootPart.Velocity = v; + + //m_group.RootPart.Velocity = v; update = true; } @@ -736,12 +736,12 @@ namespace OpenSim.Region.Framework.Scenes m_waitingCrossing = true; // to remove / retune to smoth crossings - //if (m_group.RootPart.Velocity != Vector3.Zero) - //{ - // m_group.RootPart.Velocity = Vector3.Zero; - // m_group.SendGroupRootTerseUpdate(); + if (m_group.RootPart.Velocity != Vector3.Zero) + { + m_group.RootPart.Velocity = Vector3.Zero; + m_group.SendGroupRootTerseUpdate(); // m_group.RootPart.ScheduleTerseUpdate(); - //} + } } public void CrossingFailure() -- cgit v1.1 From 01c3be27460fd3f28efd17b8d6606b883350f653 Mon Sep 17 00:00:00 2001 From: teravus Date: Sat, 24 Aug 2013 05:55:53 -0500 Subject: * Fix a null ref that causes a stack unwind when crossing borders. Less stack unwinding.. the faster it goes. * Tweak XEngine so that it's partially functional again. It's still not great, but basic things work. --- .../CoreModules/Avatar/Combat/CombatModule.cs | 2 + .../ScriptEngine/Shared/Instance/ScriptInstance.cs | 1 + OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 56 +++++++++++++++++----- 3 files changed, 48 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 343cdb5..c52d586 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -182,6 +182,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule try { ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); + if (obj == null) + return; if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 26850c4..a2ac9c5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -231,6 +231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance ItemID = ScriptTask.ItemID; AssetID = ScriptTask.AssetID; } + LocalID = part.LocalId; PrimName = part.ParentGroup.Name; StartParam = startParam; diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 17243ab..04a4e53 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1316,13 +1316,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine ScriptInstance instance = null; // Create the object record + UUID appDomain = assetID; + + + lockScriptsForRead(true); if ((!m_Scripts.ContainsKey(itemID)) || (m_Scripts[itemID].AssetID != assetID)) { lockScriptsForRead(false); - - UUID appDomain = assetID; + instance = new ScriptInstance(this, part, + item, + startParam, postOnRez, + m_MaxScriptQueue); + + if (part.ParentGroup.IsAttachment) appDomain = part.ParentGroup.RootPart.UUID; @@ -1345,9 +1353,39 @@ namespace OpenSim.Region.ScriptEngine.XEngine sandbox = AppDomain.CreateDomain( m_Scene.RegionInfo.RegionID.ToString(), evidence, appSetup); - m_AppDomains[appDomain].AssemblyResolve += - new ResolveEventHandler( - AssemblyResolver.OnAssemblyResolve); + if (m_AppDomains.ContainsKey(appDomain)) + { + m_AppDomains[appDomain].AssemblyResolve += + new ResolveEventHandler( + AssemblyResolver.OnAssemblyResolve); + if (m_DomainScripts.ContainsKey(appDomain)) + { + m_DomainScripts[appDomain].Add(itemID); + } + else + { + m_DomainScripts.Add(appDomain, new List()); + m_DomainScripts[appDomain].Add(itemID); + } + } + else + { + m_AppDomains.Add(appDomain, sandbox); + m_AppDomains[appDomain].AssemblyResolve += + new ResolveEventHandler( + AssemblyResolver.OnAssemblyResolve); + if (m_DomainScripts.ContainsKey(appDomain)) + { + m_DomainScripts[appDomain].Add(itemID); + } + else + { + m_DomainScripts.Add(appDomain, new List()); + m_DomainScripts[appDomain].Add(itemID); + } + + } + } else { @@ -1373,12 +1411,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine return false; } } - m_DomainScripts[appDomain].Add(itemID); - - instance = new ScriptInstance(this, part, - item, - startParam, postOnRez, - m_MaxScriptQueue); + instance.Load(m_AppDomains[appDomain], assembly, stateSource); // m_log.DebugFormat( @@ -1502,6 +1535,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (handlerObjectRemoved != null) { SceneObjectPart part = m_Scene.GetSceneObjectPart(localID); + if (part != null) handlerObjectRemoved(part.UUID); } -- cgit v1.1 From e0399ccaec68889c12e4679b4d62142b49b379df Mon Sep 17 00:00:00 2001 From: teravus Date: Sat, 24 Aug 2013 18:55:21 -0500 Subject: * This fixes the border crossing offsets by storing the final keyframe location in the hijacked variable KeyFrame.AngularVelocity. When steps in OnTimer <= 0.0, normalize the final position by Constants.RegionSize and move the object there. The hack here is KeyFrame.AngularVelocity probably isn't the right name for this variable because it's the un-mucked with keyframe position. When you determine the feasibility of changing the name without affecting the serialization of existing objects in world... It's simply a name change to KeyFrame.FinalPosition or something proper. --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 24 +++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index d773ee7..d9df95c 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -478,6 +478,7 @@ namespace OpenSim.Region.Framework.Scenes k.Position = pos; // k.Velocity = Vector3.Zero; } + k.AngularVelocity = (Vector3)k.Position; k.StartRotation = rot; if (k.Rotation.HasValue) @@ -612,13 +613,13 @@ namespace OpenSim.Region.Framework.Scenes // Do the frame processing double steps = (double)m_currentFrame.TimeMS / tickDuration; - + if (steps <= 0.0) { m_group.RootPart.Velocity = Vector3.Zero; m_group.RootPart.AngularVelocity = Vector3.Zero; - m_nextPosition = (Vector3)m_currentFrame.Position; + m_nextPosition = NormalizeVector(m_currentFrame.AngularVelocity); m_group.AbsolutePosition = m_nextPosition; // we are sending imediate updates, no doing force a extra terseUpdate @@ -706,7 +707,26 @@ namespace OpenSim.Region.Framework.Scenes m_group.SendGroupRootTerseUpdate(); } } + private Vector3 NormalizeVector(Vector3? pPosition) + { + if (pPosition == null) + return Vector3.Zero; + + Vector3 tmp = (Vector3) pPosition; + while (tmp.X > Constants.RegionSize) + tmp.X -= Constants.RegionSize; + while (tmp.X < 0) + tmp.X += Constants.RegionSize; + while (tmp.Y > Constants.RegionSize) + tmp.Y -= Constants.RegionSize; + while (tmp.Y < 0) + tmp.Y += Constants.RegionSize; + + return tmp; + + + } public Byte[] Serialize() { StopTimer(); -- cgit v1.1 From f7378829c3da999fcd200a5d0e6189a563cbda39 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 25 Aug 2013 06:26:56 +0200 Subject: Fix the root cause of keyframe motion region crossing offset - UpdateSceneObject was being called twice on each crossing. --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 22 +--------------------- OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++++-- 2 files changed, 5 insertions(+), 23 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index d9df95c..276b61f 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -478,7 +478,6 @@ namespace OpenSim.Region.Framework.Scenes k.Position = pos; // k.Velocity = Vector3.Zero; } - k.AngularVelocity = (Vector3)k.Position; k.StartRotation = rot; if (k.Rotation.HasValue) @@ -619,7 +618,7 @@ namespace OpenSim.Region.Framework.Scenes m_group.RootPart.Velocity = Vector3.Zero; m_group.RootPart.AngularVelocity = Vector3.Zero; - m_nextPosition = NormalizeVector(m_currentFrame.AngularVelocity); + m_nextPosition = (Vector3)m_currentFrame.Position; m_group.AbsolutePosition = m_nextPosition; // we are sending imediate updates, no doing force a extra terseUpdate @@ -707,26 +706,7 @@ namespace OpenSim.Region.Framework.Scenes m_group.SendGroupRootTerseUpdate(); } } - private Vector3 NormalizeVector(Vector3? pPosition) - { - if (pPosition == null) - return Vector3.Zero; - - Vector3 tmp = (Vector3) pPosition; - - while (tmp.X > Constants.RegionSize) - tmp.X -= Constants.RegionSize; - while (tmp.X < 0) - tmp.X += Constants.RegionSize; - while (tmp.Y > Constants.RegionSize) - tmp.Y -= Constants.RegionSize; - while (tmp.Y < 0) - tmp.Y += Constants.RegionSize; - return tmp; - - - } public Byte[] Serialize() { StopTimer(); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2b58795..b189599 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2802,8 +2802,10 @@ namespace OpenSim.Region.Framework.Scenes newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); newObject.ResumeScripts(); - if (newObject.RootPart.KeyframeMotion != null) - newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject); + // AddSceneObject already does this and doing it again messes + // up region crossings, so don't. + //if (newObject.RootPart.KeyframeMotion != null) + // newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject); } // Do this as late as possible so that listeners have full access to the incoming object -- cgit v1.1 From 823e8b5d19099fcc560cefeec5943b9a19571a37 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Sep 2013 17:57:02 +0200 Subject: Add support for simple external CAPS texture services --- .../ClientStack/Linden/Caps/GetTextureModule.cs | 50 ++++++++++++++-------- 1 file changed, 31 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index a42c96c..0570144 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs @@ -77,6 +77,8 @@ namespace OpenSim.Region.ClientStack.Linden private Dictionary m_capsDict = new Dictionary(); private static Thread[] m_workerThreads = null; + private string m_Url = "localhost"; + private static OpenMetaverse.BlockingQueue m_queue = new OpenMetaverse.BlockingQueue(); @@ -86,6 +88,9 @@ namespace OpenSim.Region.ClientStack.Linden public void Initialise(IConfigSource source) { + IConfig config = source.Configs["ClientStack.LindenCaps"]; + if (config != null) + m_Url = config.GetString("Cap_GetTexture", "localhost"); } public void AddRegion(Scene s) @@ -343,27 +348,34 @@ namespace OpenSim.Region.ClientStack.Linden private void RegisterCaps(UUID agentID, Caps caps) { - string capUrl = "/CAPS/" + UUID.Random() + "/"; - - // Register this as a poll service - PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene); - - args.Type = PollServiceEventArgs.EventType.Texture; - MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); - - string hostName = m_scene.RegionInfo.ExternalHostName; - uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; - string protocol = "http"; - - if (MainServer.Instance.UseSSL) + if (m_Url == "localhost") + { + string capUrl = "/CAPS/" + UUID.Random() + "/"; + + // Register this as a poll service + PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene); + + args.Type = PollServiceEventArgs.EventType.Texture; + MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); + + string hostName = m_scene.RegionInfo.ExternalHostName; + uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; + string protocol = "http"; + + if (MainServer.Instance.UseSSL) + { + hostName = MainServer.Instance.SSLCommonName; + port = MainServer.Instance.SSLPort; + protocol = "https"; + } + caps.RegisterHandler("GetTexture", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); + m_pollservices[agentID] = args; + m_capsDict[agentID] = capUrl; + } + else { - hostName = MainServer.Instance.SSLCommonName; - port = MainServer.Instance.SSLPort; - protocol = "https"; + caps.RegisterHandler("GetTexture", m_Url); } - caps.RegisterHandler("GetTexture", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); - m_pollservices[agentID] = args; - m_capsDict[agentID] = capUrl; } private void DeregisterCaps(UUID agentID, Caps caps) -- cgit v1.1 From 59290854f24f47ee7cb8b2a242e3f771fa30229b Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 8 Sep 2013 17:53:21 +0200 Subject: Reinstate SecurePermissionsLoading functionality, default ON --- OpenSim/Region/Application/OpenSimBase.cs | 40 +++++++++++++------------------ 1 file changed, 16 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 7361f50..25af9ac 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -195,7 +195,9 @@ namespace OpenSim m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); - string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule"); + string permissionModules = Util.GetConfigVarFromSections(Config, "permissionmodules", + new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); + m_permsModules = new List(permissionModules.Split(',')); } @@ -392,29 +394,19 @@ namespace OpenSim } else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); - // XPTO: Fix this -// if (m_securePermissionsLoading) -// { -// foreach (string s in m_permsModules) -// { -// if (!scene.RegionModules.ContainsKey(s)) -// { -// bool found = false; -// foreach (IRegionModule m in modules) -// { -// if (m.Name == s) -// { -// found = true; -// } -// } -// if (!found) -// { -// m_log.Fatal("[MODULES]: Required module " + s + " not found."); -// Environment.Exit(0); -// } -// } -// } -// } + if (m_securePermissionsLoading) + { + foreach (string s in m_permsModules) + { + if (!scene.RegionModules.ContainsKey(s)) + { + m_log.Fatal("[MODULES]: Required module " + s + " not found."); + Environment.Exit(0); + } + } + + m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules)); + } scene.SetModuleInterfaces(); // First Step of bootreport sequence -- cgit v1.1 From b41ae0f98f85db76b9a412cee29e9bcba5b4d9d9 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 8 Sep 2013 17:54:00 +0200 Subject: Harmonize the class name, ID and Name of the default perms module --- OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 6 +++--- OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs | 6 +++--- OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs | 4 ++-- OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 79dd4a0..26e9131 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -42,8 +42,8 @@ using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.CoreModules.World.Permissions { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "PermissionsModule")] - public class PermissionsModule : INonSharedRegionModule, IPermissionsModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DefaultPermissionsModule")] + public class DefaultPermissionsModule : INonSharedRegionModule, IPermissionsModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -348,7 +348,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions public string Name { - get { return "PermissionsModule"; } + get { return "DefaultPermissionsModule"; } } public Type ReplaceableInterface diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index 52ad538..9557cd0 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs @@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests IConfigSource configSource = new IniConfigSource(); IConfig config = configSource.AddConfig("Startup"); config.Set("serverside_object_permissions", true); - SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() }); + SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. @@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests IConfigSource configSource = new IniConfigSource(); IConfig config = configSource.AddConfig("Startup"); config.Set("serverside_object_permissions", true); - SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() }); + SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. @@ -195,4 +195,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests // Assert.That(retrievedPart, Is.Null); } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs index c7eaff9..e7a1fe0 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs @@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests SceneHelpers.SetupSceneModules( scene, configSource, new object[] - { new PermissionsModule(), + { new DefaultPermissionsModule(), new GroupsModule(), new MockGroupsServicesConnector() }); @@ -82,4 +82,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index de4458d..8d94d29 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs @@ -216,7 +216,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests // We need to set up the permisions module on scene B so that our later use of agent limit to deny // QueryAccess won't succeed anyway because administrators are always allowed in and the default // IsAdministrator if no permissions module is present is true. - SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); + SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB }); // Shared scene modules SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); @@ -381,7 +381,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests // We need to set up the permisions module on scene B so that our later use of agent limit to deny // QueryAccess won't succeed anyway because administrators are always allowed in and the default // IsAdministrator if no permissions module is present is true. - SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); + SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB }); // Shared scene modules SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); @@ -507,4 +507,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests // TestHelpers.DisableLogging(); } } -} \ No newline at end of file +} -- cgit v1.1 From ddf67bf929fbc32d8319f777b248642b4da0305a Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 8 Sep 2013 19:41:51 +0200 Subject: Mono 2.0 fix - call ToArray() explicitly --- OpenSim/Region/Application/OpenSimBase.cs | 2 +- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 12 ++++++++++++ OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 1 + OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 +++++---- 4 files changed, 19 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 25af9ac..88bd869 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -405,7 +405,7 @@ namespace OpenSim } } - m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules)); + m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules.ToArray())); } scene.SetModuleInterfaces(); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index eebb8ae..f4ea975 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3933,6 +3933,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP part.Shape.ProfileHollow = 27500; } } + else if (update.Entity is ScenePresence) + { + ScenePresence presence = (ScenePresence)update.Entity; + + // If ParentUUID is not UUID.Zero and ParentID is 0, this + // avatar is in the process of crossing regions while + // sat on an object. In this state, we don't want any + // updates because they will visually orbit the avatar. + // Update will be forced once crossing is completed anyway. + if (presence.ParentUUID != UUID.Zero && presence.ParentID == 0) + continue; + } ++updatesThisCall; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index f306651..3e1dcaa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -591,6 +591,7 @@ namespace OpenSim.Region.Framework.Scenes avinfo.ParentID = av.ParentID; avsToCross.Add(avinfo); + av.PrevSitOffset = av.OffsetPosition; av.ParentID = 0; } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0ab267a..7004d23 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -242,7 +242,7 @@ namespace OpenSim.Region.Framework.Scenes private int m_movementAnimationUpdateCounter = 0; - private Vector3 m_prevSitOffset; + public Vector3 PrevSitOffset { get; set; } protected AvatarAppearance m_appearance; @@ -957,7 +957,7 @@ namespace OpenSim.Region.Framework.Scenes // ParentPosition = part.GetWorldPosition(); ParentID = part.LocalId; ParentPart = part; - m_pos = m_prevSitOffset; + m_pos = PrevSitOffset; // pos = ParentPosition; pos = part.GetWorldPosition(); } @@ -2261,6 +2261,7 @@ namespace OpenSim.Region.Framework.Scenes if (ParentID != 0) { + PrevSitOffset = m_pos; // Save sit offset SceneObjectPart part = ParentPart; UnRegisterSeatControls(part.ParentGroup.UUID); @@ -3487,7 +3488,7 @@ namespace OpenSim.Region.Framework.Scenes cAgent.Appearance = new AvatarAppearance(Appearance); cAgent.ParentPart = ParentUUID; - cAgent.SitOffset = m_pos; + cAgent.SitOffset = PrevSitOffset; lock (scriptedcontrols) { @@ -3530,7 +3531,7 @@ namespace OpenSim.Region.Framework.Scenes CameraLeftAxis = cAgent.LeftAxis; CameraUpAxis = cAgent.UpAxis; ParentUUID = cAgent.ParentPart; - m_prevSitOffset = cAgent.SitOffset; + PrevSitOffset = cAgent.SitOffset; // When we get to the point of re-computing neighbors everytime this // changes, then start using the agent's drawdistance rather than the -- cgit v1.1