From 8ae7dc628b2681b02c43a5acd1e1bdf4f33b1f3e Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 20 Jul 2008 15:19:26 +0000 Subject: Make the max sizes of physical and nonphysical prims configurable in OpenSim.ini Defaulted to 65536 and 10, respectively --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 28 +++++++++++----------- .../Shared/Api/Implementation/LSL_Api.cs | 28 +++++++++++----------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 40e225d..7745d95 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -933,7 +933,7 @@ namespace OpenSim.Region.ScriptEngine.Common bool allow = true; foreach(SceneObjectPart part in group.Children.Values) { - if(part.Scale.X > 10.0 || part.Scale.Y > 10.0 || part.Scale.Z > 10.0) + if(part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys) { allow = false; break; @@ -1066,19 +1066,19 @@ namespace OpenSim.Region.ScriptEngine.Common if(part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) { - if(scale.x > 10.0) - scale.x = 10.0; - if(scale.y > 10.0) - scale.y = 10.0; - if(scale.z > 10.0) - scale.z = 10.0; - } - if(scale.x > 65536.0) - scale.x = 65536.0; - if(scale.y > 65536.0) - scale.y = 65536.0; - if(scale.z > 65536.0) - scale.z = 65536.0; + if(scale.x > World.m_maxPhys) + scale.x = World.m_maxPhys; + if(scale.y > World.m_maxPhys) + scale.y = World.m_maxPhys; + if(scale.z > World.m_maxPhys) + scale.z = World.m_maxPhys; + } + if(scale.x > World.m_maxNonphys) + scale.x = World.m_maxNonphys; + if(scale.y > World.m_maxNonphys) + scale.y = World.m_maxNonphys; + if(scale.z > World.m_maxNonphys) + scale.z = World.m_maxNonphys; LLVector3 tmp = part.Scale; tmp.X = (float)scale.x; tmp.Y = (float)scale.y; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c597661..79bd6fe 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -775,7 +775,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api bool allow = true; foreach(SceneObjectPart part in group.Children.Values) { - if(part.Scale.X > 10.0 || part.Scale.Y > 10.0 || part.Scale.Z > 10.0) + if(part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys) { allow = false; break; @@ -922,19 +922,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if(part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) { - if(scale.x > 10.0) - scale.x = 10.0; - if(scale.y > 10.0) - scale.y = 10.0; - if(scale.z > 10.0) - scale.z = 10.0; - } - if(scale.x > 65536.0) - scale.x = 65536.0; - if(scale.y > 65536.0) - scale.y = 65536.0; - if(scale.z > 65536.0) - scale.z = 65536.0; + if(scale.x > World.m_maxPhys) + scale.x = World.m_maxPhys; + if(scale.y > World.m_maxPhys) + scale.y = World.m_maxPhys; + if(scale.z > World.m_maxPhys) + scale.z = World.m_maxPhys; + } + if(scale.x > World.m_maxNonphys) + scale.x = World.m_maxNonphys; + if(scale.y > World.m_maxNonphys) + scale.y = World.m_maxNonphys; + if(scale.z > World.m_maxNonphys) + scale.z = World.m_maxNonphys; LLVector3 tmp = part.Scale; tmp.X = (float)scale.x; tmp.Y = (float)scale.y; -- cgit v1.1