diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 6e17639..c3e89f6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1263,11 +1263,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1263 | protected void SetScale(SceneObjectPart part, LSL_Vector scale) | 1263 | protected void SetScale(SceneObjectPart part, LSL_Vector scale) |
1264 | { | 1264 | { |
1265 | // TODO: this needs to trigger a persistance save as well | 1265 | // TODO: this needs to trigger a persistance save as well |
1266 | |||
1267 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1266 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1268 | return; | 1267 | return; |
1269 | 1268 | // scale.x < 0.01 in a manner which handles rounding errors | |
1270 | if (scale.x < 0.01 || scale.y < 0.01 || scale.z < 0.01) | 1269 | if (Math.Round(scale.x - 0.01) > 0.0 || Math.Round(scale.y - 0.01) > 0.0 || Math.Round(scale.z - 0.01) > 0.0) |
1271 | return; | 1270 | return; |
1272 | 1271 | ||
1273 | if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) | 1272 | if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) |
@@ -1279,12 +1278,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1279 | if (scale.z > World.m_maxPhys) | 1278 | if (scale.z > World.m_maxPhys) |
1280 | scale.z = World.m_maxPhys; | 1279 | scale.z = World.m_maxPhys; |
1281 | } | 1280 | } |
1281 | |||
1282 | if (scale.x > World.m_maxNonphys) | 1282 | if (scale.x > World.m_maxNonphys) |
1283 | scale.x = World.m_maxNonphys; | 1283 | scale.x = World.m_maxNonphys; |
1284 | if (scale.y > World.m_maxNonphys) | 1284 | if (scale.y > World.m_maxNonphys) |
1285 | scale.y = World.m_maxNonphys; | 1285 | scale.y = World.m_maxNonphys; |
1286 | if (scale.z > World.m_maxNonphys) | 1286 | if (scale.z > World.m_maxNonphys) |
1287 | scale.z = World.m_maxNonphys; | 1287 | scale.z = World.m_maxNonphys; |
1288 | |||
1288 | Vector3 tmp = part.Scale; | 1289 | Vector3 tmp = part.Scale; |
1289 | tmp.X = (float)scale.x; | 1290 | tmp.X = (float)scale.x; |
1290 | tmp.Y = (float)scale.y; | 1291 | tmp.Y = (float)scale.y; |