diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 09be26ad64..4e7d5efa4c 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2979,7 +2979,7 @@ namespace OpenSim.Region.ScriptEngine.Common } else { - return new LSL_Types.Vector3(0, 0, 0); + return new LSL_Types.Vector3(src.Data[index].ToString()); } } @@ -3000,7 +3000,7 @@ namespace OpenSim.Region.ScriptEngine.Common } else { - return new LSL_Types.Quaternion(0, 0, 0, 1); + return new LSL_Types.Quaternion(src.Data[index].ToString()); } } diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index aed591c0e9..65047fbc4e 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -259,6 +259,8 @@ namespace OpenSim.Region.ScriptEngine.Common y = (float)Quat.y; z = (float)Quat.z; s = (float)Quat.s; + if (x == 0 && y == 0 && z == 0 && s == 0) + s = 1; } public Quaternion(double X, double Y, double Z, double S) @@ -267,6 +269,8 @@ namespace OpenSim.Region.ScriptEngine.Common y = Y; z = Z; s = S; + if (x == 0 && y == 0 && z == 0 && s == 0) + s = 1; } public Quaternion(string str) @@ -279,6 +283,8 @@ namespace OpenSim.Region.ScriptEngine.Common res = res & Double.TryParse(tmps[1], out y); res = res & Double.TryParse(tmps[2], out z); res = res & Double.TryParse(tmps[3], out s); + if (x == 0 && y == 0 && z == 0 && s == 0) + s = 1; } #endregion