From db0c26814011764c381a432b5542e03433081811 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 25 Oct 2016 20:16:23 +0100 Subject: mantis 8041: check target user password on save/load IAR --- .../CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 3 --- 1 file changed, 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 8d11d20..8847414 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -565,8 +565,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver return null; } - return account; - /* try { string encpass = Util.Md5Hash(pass); @@ -587,7 +585,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e); return null; } - */ } /// -- cgit v1.1 From 7c4f2b048f4d74b3132486e8d7a6887c73d6562d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 25 Oct 2016 20:44:41 +0100 Subject: ignore prims with shape type none on max size check for physics also on llStatus() --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 66cb30c..85837e4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -100,11 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected IScriptEngine m_ScriptEngine; protected SceneObjectPart m_host; - - /// - /// Used for script sleeps when we are using co-operative script termination. - /// - /// null if co-operative script termination is not active + /// /// The item that hosts this script /// @@ -1641,12 +1637,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api foreach (SceneObjectPart part in group.Parts) { + if (part.PhysicsShapeType == (byte)PhysicsShapeType.None) + continue; + if (part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys) { allow = false; break; } - if (checkShape && part.PhysicsShapeType != (byte)PhysicsShapeType.None) + if (checkShape) { if (--maxprims < 0) { -- cgit v1.1 From 9480da06b971e7ffa500c33399cdb2114a39637f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 2 Nov 2016 21:42:32 +0000 Subject: only add a prim to physics in PhysicsShapeType if changing from type none. when viewers change ExtraPhysics parameters, send back the new values. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 1 - OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 97 ++++++++++------------ 3 files changed, 43 insertions(+), 57 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index ad25bc8..17e4400 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -2920,7 +2920,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_log.Error("Unable to send part Physics Proprieties - exception: " + ex.ToString()); } - part.UpdatePhysRequired = false; } } diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 238ec8e..1141f54 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1660,7 +1660,7 @@ namespace OpenSim.Region.Framework.Scenes if (part != null) { part.UpdateExtraPhysics(PhysData); - if (part.UpdatePhysRequired && remoteClient != null) + if (remoteClient != null) remoteClient.SendPartPhysicsProprieties(part); } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 06d767d..9d1dca2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1222,7 +1222,6 @@ namespace OpenSim.Region.Framework.Scenes } public UpdateRequired UpdateFlag { get; set; } - public bool UpdatePhysRequired { get; set; } /// /// Used for media on a prim. @@ -1637,7 +1636,6 @@ namespace OpenSim.Region.Framework.Scenes if(ParentGroup != null) ParentGroup.HasGroupChanged = true; ScheduleFullUpdateIfNone(); - UpdatePhysRequired = true; } } } @@ -1729,7 +1727,7 @@ namespace OpenSim.Region.Framework.Scenes set { byte oldv = m_physicsShapeType; - + if (value >= 0 && value <= (byte)PhysShapeType.convex) { if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this) @@ -1748,28 +1746,21 @@ namespace OpenSim.Region.Framework.Scenes { ParentGroup.Scene.RemovePhysicalPrim(1); RemoveFromPhysics(); - Stop(); +// Stop(); } } else if (PhysActor == null) { - ApplyPhysics((uint)Flags, VolumeDetectActive, false); - UpdatePhysicsSubscribedEvents(); + if(oldv == (byte)PhysShapeType.none) + { + ApplyPhysics((uint)Flags, VolumeDetectActive, false); + UpdatePhysicsSubscribedEvents(); + } } else - { PhysActor.PhysicsShapeType = m_physicsShapeType; -// if (Shape.SculptEntry) -// CheckSculptAndLoad(); - } - if (ParentGroup != null) - ParentGroup.HasGroupChanged = true; - } - - if (m_physicsShapeType != value) - { - UpdatePhysRequired = true; + ParentGroup.HasGroupChanged = true; } } } @@ -1782,17 +1773,16 @@ namespace OpenSim.Region.Framework.Scenes if (value >=1 && value <= 22587.0) { m_density = value; - UpdatePhysRequired = true; - } - ScheduleFullUpdateIfNone(); + ScheduleFullUpdateIfNone(); - if (ParentGroup != null) - ParentGroup.HasGroupChanged = true; + if (ParentGroup != null) + ParentGroup.HasGroupChanged = true; - PhysicsActor pa = PhysActor; - if (pa != null) - pa.Density = Density; + PhysicsActor pa = PhysActor; + if (pa != null) + pa.Density = m_density; + } } } @@ -1804,17 +1794,16 @@ namespace OpenSim.Region.Framework.Scenes if( value >= -1 && value <=28.0f) { m_gravitymod = value; - UpdatePhysRequired = true; - } - ScheduleFullUpdateIfNone(); + ScheduleFullUpdateIfNone(); - if (ParentGroup != null) - ParentGroup.HasGroupChanged = true; + if (ParentGroup != null) + ParentGroup.HasGroupChanged = true; - PhysicsActor pa = PhysActor; - if (pa != null) - pa.GravModifier = GravityModifier; + PhysicsActor pa = PhysActor; + if (pa != null) + pa.GravModifier = m_gravitymod; + } } } @@ -1826,17 +1815,16 @@ namespace OpenSim.Region.Framework.Scenes if (value >= 0 && value <= 255.0f) { m_friction = value; - UpdatePhysRequired = true; - } - ScheduleFullUpdateIfNone(); + ScheduleFullUpdateIfNone(); - if (ParentGroup != null) - ParentGroup.HasGroupChanged = true; + if (ParentGroup != null) + ParentGroup.HasGroupChanged = true; - PhysicsActor pa = PhysActor; - if (pa != null) - pa.Friction = Friction; + PhysicsActor pa = PhysActor; + if (pa != null) + pa.Friction = m_friction; + } } } @@ -1848,17 +1836,16 @@ namespace OpenSim.Region.Framework.Scenes if (value >= 0 && value <= 1.0f) { m_bounce = value; - UpdatePhysRequired = true; - } - ScheduleFullUpdateIfNone(); + ScheduleFullUpdateIfNone(); - if (ParentGroup != null) - ParentGroup.HasGroupChanged = true; + if (ParentGroup != null) + ParentGroup.HasGroupChanged = true; - PhysicsActor pa = PhysActor; - if (pa != null) - pa.Restitution = Restitution; + PhysicsActor pa = PhysActor; + if (pa != null) + pa.Restitution = m_bounce; + } } } @@ -4541,24 +4528,24 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter } } - public void UpdateExtraPhysics(ExtraPhysicsData physdata) { if (physdata.PhysShapeType == PhysShapeType.invalid || ParentGroup == null) return; - if (PhysicsShapeType != (byte)physdata.PhysShapeType) - { - PhysicsShapeType = (byte)physdata.PhysShapeType; - - } + byte newtype = (byte)physdata.PhysShapeType; + if (PhysicsShapeType != newtype) + PhysicsShapeType = newtype; if(Density != physdata.Density) Density = physdata.Density; + if(GravityModifier != physdata.GravitationModifier) GravityModifier = physdata.GravitationModifier; + if(Friction != physdata.Friction) Friction = physdata.Friction; + if(Restitution != physdata.Bounce) Restitution = physdata.Bounce; } -- cgit v1.1 From f29d5ad662387b97d9e881f28df584dc19fa8c07 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 2 Nov 2016 22:33:32 +0000 Subject: ubOde: if a mesh does not contain data for shape type PRIM, dont collide as convex as before but just don't collide matching the type NONE viewers display in this case --- OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index ff10e7f..bcd1530 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs @@ -443,6 +443,11 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing if (physicsParms != null) usemesh = true; + else + { + m_log.WarnFormat("[MESH]: Data for PRIM shape type not found for prim {0}",primName); + return false; + } } if(!usemesh && (map.ContainsKey("physics_convex"))) @@ -451,7 +456,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing if (physicsParms == null) { - m_log.WarnFormat("[MESH]: unknown mesh type for {0}",primName); + m_log.WarnFormat("[MESH]: unknown mesh type for prim {0}",primName); return false; } -- cgit v1.1 From 73b20c2ca25e5ee6f1b6673ef764c4da40625ec3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 3 Nov 2016 12:58:43 +0000 Subject: XEngine: make calls to gc.collect on region startup scripts loading a configurable option, since it is very slow operation --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 3038915..e12f850 100755 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -110,6 +110,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine private int m_ScriptFailCount; // Number of script fails since compile queue was last empty private string m_ScriptErrorMessage; private bool m_AppDomainLoading; + private bool m_CompactMemOnLoad; private Dictionary m_ScriptErrors = new Dictionary(); @@ -301,8 +302,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300); m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144); m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000; - m_AppDomainLoading = m_ScriptConfig.GetBoolean("AppDomainLoading", true); - + m_AppDomainLoading = m_ScriptConfig.GetBoolean("AppDomainLoading", false); + m_CompactMemOnLoad = m_ScriptConfig.GetBoolean("CompactMemOnLoad", false); m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30); m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false); m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000; @@ -1278,10 +1279,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine } } - // do not load a assembly on top of a lot of to release memory - // also yield a bit - // only if logins disable since causes a lot of rubber banding - if(!m_Scene.LoginsEnabled) + // optionaly do not load a assembly on top of a lot of to release memory + // only if logins disable since causes a lot of rubber banding + if(m_CompactMemOnLoad && !m_Scene.LoginsEnabled) GC.Collect(2); ScriptInstance instance = null; -- cgit v1.1