diff options
author | Adam Frisby | 2008-12-01 07:50:38 +0000 |
---|---|---|
committer | Adam Frisby | 2008-12-01 07:50:38 +0000 |
commit | 4ed7ca62b153817a142ded621cc5c5c1b1c055c5 (patch) | |
tree | e8cad8abe60b6becd22da1a8d2c2dfefbf6f9784 /OpenSim/Data/NHibernate/LLVector3UserType.cs | |
parent | Mantis #2729 (diff) | |
download | opensim-SC_OLD-4ed7ca62b153817a142ded621cc5c5c1b1c055c5.zip opensim-SC_OLD-4ed7ca62b153817a142ded621cc5c5c1b1c055c5.tar.gz opensim-SC_OLD-4ed7ca62b153817a142ded621cc5c5c1b1c055c5.tar.bz2 opensim-SC_OLD-4ed7ca62b153817a142ded621cc5c5c1b1c055c5.tar.xz |
* From Mantis#2701 - Implements NHibernate data adapter, adds support for MsSql2005 to NHibernate.
* Patch courtesy of Adminotech and realXtend. Thanks!
Diffstat (limited to 'OpenSim/Data/NHibernate/LLVector3UserType.cs')
-rw-r--r-- | OpenSim/Data/NHibernate/LLVector3UserType.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Data/NHibernate/LLVector3UserType.cs b/OpenSim/Data/NHibernate/LLVector3UserType.cs index cdd15ec..25a2bc6 100644 --- a/OpenSim/Data/NHibernate/LLVector3UserType.cs +++ b/OpenSim/Data/NHibernate/LLVector3UserType.cs | |||
@@ -74,9 +74,12 @@ namespace OpenSim.Data.NHibernate | |||
74 | int x = rs.GetOrdinal(names[0]); | 74 | int x = rs.GetOrdinal(names[0]); |
75 | int y = rs.GetOrdinal(names[1]); | 75 | int y = rs.GetOrdinal(names[1]); |
76 | int z = rs.GetOrdinal(names[2]); | 76 | int z = rs.GetOrdinal(names[2]); |
77 | if (!rs.IsDBNull(x)) | 77 | if (!rs.IsDBNull(x) && !rs.IsDBNull(y) && !rs.IsDBNull(z)) |
78 | { | 78 | { |
79 | vector = new Vector3((Single)rs[x], (Single)rs[y], (Single)rs[z]); | 79 | float X = (Single)Convert.ToDouble(rs[x].ToString()); |
80 | float Y = (Single)Convert.ToDouble(rs[y].ToString()); | ||
81 | float Z = (Single)Convert.ToDouble(rs[z].ToString()); | ||
82 | vector = new Vector3(X, Y, Z); | ||
80 | } | 83 | } |
81 | return vector; | 84 | return vector; |
82 | } | 85 | } |