diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 11f255f..669189d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1267,12 +1267,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1267 | protected void SetScale(SceneObjectPart part, LSL_Vector scale) | 1267 | protected void SetScale(SceneObjectPart part, LSL_Vector scale) |
1268 | { | 1268 | { |
1269 | // TODO: this needs to trigger a persistance save as well | 1269 | // TODO: this needs to trigger a persistance save as well |
1270 | |||
1271 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1270 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1272 | return; | 1271 | return; |
1273 | 1272 | if (scale.x < 0.01) | |
1274 | if (scale.x < 0.01 || scale.y < 0.01 || scale.z < 0.01) | 1273 | scale.x = 0.01; |
1275 | return; | 1274 | if (scale.y < 0.01) |
1275 | scale.y = 0.01; | ||
1276 | if (scale.z < 0.01) | ||
1277 | scale.z = 0.01; | ||
1276 | 1278 | ||
1277 | if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) | 1279 | if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) |
1278 | { | 1280 | { |
@@ -1283,12 +1285,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1283 | if (scale.z > World.m_maxPhys) | 1285 | if (scale.z > World.m_maxPhys) |
1284 | scale.z = World.m_maxPhys; | 1286 | scale.z = World.m_maxPhys; |
1285 | } | 1287 | } |
1288 | |||
1286 | if (scale.x > World.m_maxNonphys) | 1289 | if (scale.x > World.m_maxNonphys) |
1287 | scale.x = World.m_maxNonphys; | 1290 | scale.x = World.m_maxNonphys; |
1288 | if (scale.y > World.m_maxNonphys) | 1291 | if (scale.y > World.m_maxNonphys) |
1289 | scale.y = World.m_maxNonphys; | 1292 | scale.y = World.m_maxNonphys; |
1290 | if (scale.z > World.m_maxNonphys) | 1293 | if (scale.z > World.m_maxNonphys) |
1291 | scale.z = World.m_maxNonphys; | 1294 | scale.z = World.m_maxNonphys; |
1295 | |||
1292 | Vector3 tmp = part.Scale; | 1296 | Vector3 tmp = part.Scale; |
1293 | tmp.X = (float)scale.x; | 1297 | tmp.X = (float)scale.x; |
1294 | tmp.Y = (float)scale.y; | 1298 | tmp.Y = (float)scale.y; |