From 128910a68139080fbf5ea53db9c756496b605fd9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 5 Feb 2013 05:40:51 +0100 Subject: Make scripts shout a error but not stop when button count is overrun on llDialog --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 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 53c6e5c..01a649b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4724,7 +4724,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID av = new UUID(); if (!UUID.TryParse(agent,out av)) { - //LSLError("First parameter to llDialog needs to be a key"); return; } @@ -7222,20 +7221,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } if (buttons.Length > 12) { - LSLError("No more than 12 buttons can be shown"); - return; + ShoutError("button list too long, must be 12 or fewer entries"); } - string[] buts = new string[buttons.Length]; - for (int i = 0; i < buttons.Length; i++) + int length = buttons.Length; + if (length > 12) + length = 12; + + string[] buts = new string[length]; + for (int i = 0; i < length; i++) { if (buttons.Data[i].ToString() == String.Empty) { - LSLError("button label cannot be blank"); + ShoutError("button label cannot be blank"); return; } if (buttons.Data[i].ToString().Length > 24) { - llWhisper(ScriptBaseClass.DEBUG_CHANNEL, "button label cannot be longer than 24 characters"); + ShoutError("button label cannot be longer than 24 characters"); return; } buts[i] = buttons.Data[i].ToString(); -- cgit v1.1 From bbda7b94b3fe2350d5413879388cfce7309ca907 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 7 Feb 2013 03:40:48 +0000 Subject: Rename Bounciness to Restitution --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 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 01a649b..6685764 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7845,7 +7845,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api physdata.PhysShapeType = (PhysShapeType)part.PhysicsShapeType; physdata.Density = part.Density; physdata.Friction = part.Friction; - physdata.Bounce = part.Bounciness; + physdata.Bounce = part.Restitution; physdata.GravitationModifier = part.GravityModifier; if ((material_bits & (int)ScriptBaseClass.DENSITY) != 0) @@ -8238,7 +8238,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ExtraPhysicsData physdata = new ExtraPhysicsData(); physdata.Density = part.Density; - physdata.Bounce = part.Bounciness; + physdata.Bounce = part.Restitution; physdata.GravitationModifier = part.GravityModifier; physdata.PhysShapeType = (PhysShapeType)shape_type; -- cgit v1.1