From 4820dfd733a5b6dae54e120cfb1486643765bb3e Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Tue, 21 Aug 2012 12:30:47 +0100 Subject: this should be an if-else block in case the non-phys min/max are smaller than the physical min/max --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8140416..0d275f7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1341,11 +1341,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api scale.y = Math.Max(World.m_minPhys, Math.Min(World.m_maxPhys, scale.y)); scale.z = Math.Max(World.m_minPhys, Math.Min(World.m_maxPhys, scale.z)); } - - // Next we clamp the scale to the non-physical min/max - scale.x = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.x)); - scale.y = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.y)); - scale.z = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.z)); + else + { + // If not physical, then we clamp the scale to the non-physical min/max + scale.x = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.x)); + scale.y = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.y)); + scale.z = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.z)); + } Vector3 tmp = part.Scale; tmp.X = (float)scale.x; -- cgit v1.1