diff options
author | Teravus Ovares | 2008-04-29 12:09:55 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-29 12:09:55 +0000 |
commit | 06a367be194b3118469ae47d763256e5898604bc (patch) | |
tree | 9b1e74b52580e560cbb34fa3b9ceeed8c4ca031f /OpenSim/Region | |
parent | * Lash up mantis 1064 - nre thrown in LandObject.sendLandObjectOwners() (diff) | |
download | opensim-SC-06a367be194b3118469ae47d763256e5898604bc.zip opensim-SC-06a367be194b3118469ae47d763256e5898604bc.tar.gz opensim-SC-06a367be194b3118469ae47d763256e5898604bc.tar.bz2 opensim-SC-06a367be194b3118469ae47d763256e5898604bc.tar.xz |
* Applying melanie's List2Vector and List2Rot patch. Added a routine in the Quaternion constructors to catch 0,0,0,0 quaternions and convert them to 0,0,0,1 (as 0,0,0,0 is implicitly converted to 0,0,0,1 in LSL and will crash libsl if left which will in turn crash the simulator)
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 09be26a..4e7d5ef 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 | |||
2979 | } | 2979 | } |
2980 | else | 2980 | else |
2981 | { | 2981 | { |
2982 | return new LSL_Types.Vector3(0, 0, 0); | 2982 | return new LSL_Types.Vector3(src.Data[index].ToString()); |
2983 | } | 2983 | } |
2984 | } | 2984 | } |
2985 | 2985 | ||
@@ -3000,7 +3000,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3000 | } | 3000 | } |
3001 | else | 3001 | else |
3002 | { | 3002 | { |
3003 | return new LSL_Types.Quaternion(0, 0, 0, 1); | 3003 | return new LSL_Types.Quaternion(src.Data[index].ToString()); |
3004 | } | 3004 | } |
3005 | } | 3005 | } |
3006 | 3006 | ||
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index aed591c..65047fb 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 | |||
259 | y = (float)Quat.y; | 259 | y = (float)Quat.y; |
260 | z = (float)Quat.z; | 260 | z = (float)Quat.z; |
261 | s = (float)Quat.s; | 261 | s = (float)Quat.s; |
262 | if (x == 0 && y == 0 && z == 0 && s == 0) | ||
263 | s = 1; | ||
262 | } | 264 | } |
263 | 265 | ||
264 | public Quaternion(double X, double Y, double Z, double S) | 266 | public Quaternion(double X, double Y, double Z, double S) |
@@ -267,6 +269,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
267 | y = Y; | 269 | y = Y; |
268 | z = Z; | 270 | z = Z; |
269 | s = S; | 271 | s = S; |
272 | if (x == 0 && y == 0 && z == 0 && s == 0) | ||
273 | s = 1; | ||
270 | } | 274 | } |
271 | 275 | ||
272 | public Quaternion(string str) | 276 | public Quaternion(string str) |
@@ -279,6 +283,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
279 | res = res & Double.TryParse(tmps[1], out y); | 283 | res = res & Double.TryParse(tmps[1], out y); |
280 | res = res & Double.TryParse(tmps[2], out z); | 284 | res = res & Double.TryParse(tmps[2], out z); |
281 | res = res & Double.TryParse(tmps[3], out s); | 285 | res = res & Double.TryParse(tmps[3], out s); |
286 | if (x == 0 && y == 0 && z == 0 && s == 0) | ||
287 | s = 1; | ||
282 | } | 288 | } |
283 | 289 | ||
284 | #endregion | 290 | #endregion |