this should be an if-else block in case the non-phys min/max are smaller than the physical min/max

integration
SignpostMarv 2012-08-21 12:30:47 +01:00 committed by Justin Clark-Casey (justincc)
parent 1369058280
commit 4820dfd733
1 changed files with 7 additions and 5 deletions

View File

@ -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.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)); scale.z = Math.Max(World.m_minPhys, Math.Min(World.m_maxPhys, scale.z));
} }
else
// Next we clamp the scale to the non-physical min/max {
// 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.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.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)); scale.z = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.z));
}
Vector3 tmp = part.Scale; Vector3 tmp = part.Scale;
tmp.X = (float)scale.x; tmp.X = (float)scale.x;