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/ScriptEngine/Common/LSL_Types.cs | |
parent | * Lash up mantis 1064 - nre thrown in LandObject.sendLandObjectOwners() (diff) | |
download | opensim-SC_OLD-06a367be194b3118469ae47d763256e5898604bc.zip opensim-SC_OLD-06a367be194b3118469ae47d763256e5898604bc.tar.gz opensim-SC_OLD-06a367be194b3118469ae47d763256e5898604bc.tar.bz2 opensim-SC_OLD-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/ScriptEngine/Common/LSL_Types.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 6 |
1 files changed, 6 insertions, 0 deletions
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 |