aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteSimulationData.cs
diff options
context:
space:
mode:
authorOren Hurvitz2013-02-07 08:23:57 +0200
committerJustin Clark-Casey (justincc)2013-02-09 01:03:58 +0000
commit85b81ff7f20334ebe50a5a33e41060fdcbd69d65 (patch)
tree6129255f4db03b1a7a7f15349fbd7838904f6712 /OpenSim/Data/SQLite/SQLiteSimulationData.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-85b81ff7f20334ebe50a5a33e41060fdcbd69d65.zip
opensim-SC_OLD-85b81ff7f20334ebe50a5a33e41060fdcbd69d65.tar.gz
opensim-SC_OLD-85b81ff7f20334ebe50a5a33e41060fdcbd69d65.tar.bz2
opensim-SC_OLD-85b81ff7f20334ebe50a5a33e41060fdcbd69d65.tar.xz
Added physics parameters support to MSSQL and SQLite (not tested)
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteSimulationData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 91fc704..d4734a6 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -1235,6 +1235,12 @@ namespace OpenSim.Data.SQLite
1235 1235
1236 createCol(prims, "DynAttrs", typeof(String)); 1236 createCol(prims, "DynAttrs", typeof(String));
1237 1237
1238 createCol(prims, "PhysicsShapeType", typeof(Byte));
1239 createCol(prims, "Density", typeof(Double));
1240 createCol(prims, "GravityModifier", typeof(Double));
1241 createCol(prims, "Friction", typeof(Double));
1242 createCol(prims, "Restitution", typeof(Double));
1243
1238 // Add in contraints 1244 // Add in contraints
1239 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; 1245 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
1240 1246
@@ -1724,6 +1730,12 @@ namespace OpenSim.Data.SQLite
1724 prim.DynAttrs = new DAMap(); 1730 prim.DynAttrs = new DAMap();
1725 } 1731 }
1726 1732
1733 prim.PhysicsShapeType = Convert.ToByte(row["PhysicsShapeType"]);
1734 prim.Density = Convert.ToSingle(row["Density"]);
1735 prim.GravityModifier = Convert.ToSingle(row["GravityModifier"]);
1736 prim.Friction = Convert.ToSingle(row["Friction"]);
1737 prim.Restitution = Convert.ToSingle(row["Restitution"]);
1738
1727 return prim; 1739 return prim;
1728 } 1740 }
1729 1741
@@ -2150,6 +2162,12 @@ namespace OpenSim.Data.SQLite
2150 row["DynAttrs"] = prim.DynAttrs.ToXml(); 2162 row["DynAttrs"] = prim.DynAttrs.ToXml();
2151 else 2163 else
2152 row["DynAttrs"] = null; 2164 row["DynAttrs"] = null;
2165
2166 row["PhysicsShapeType"] = prim.PhysicsShapeType;
2167 row["Density"] = (double)prim.Density;
2168 row["GravityModifier"] = (double)prim.GravityModifier;
2169 row["Friction"] = (double)prim.Friction;
2170 row["Restitution"] = (double)prim.Restitution;
2153 } 2171 }
2154 2172
2155 /// <summary> 2173 /// <summary>