From 85b81ff7f20334ebe50a5a33e41060fdcbd69d65 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 7 Feb 2013 08:23:57 +0200 Subject: Added physics parameters support to MSSQL and SQLite (not tested) --- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'OpenSim/Data/SQLite/SQLiteSimulationData.cs') 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 createCol(prims, "DynAttrs", typeof(String)); + createCol(prims, "PhysicsShapeType", typeof(Byte)); + createCol(prims, "Density", typeof(Double)); + createCol(prims, "GravityModifier", typeof(Double)); + createCol(prims, "Friction", typeof(Double)); + createCol(prims, "Restitution", typeof(Double)); + // Add in contraints prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; @@ -1724,6 +1730,12 @@ namespace OpenSim.Data.SQLite prim.DynAttrs = new DAMap(); } + prim.PhysicsShapeType = Convert.ToByte(row["PhysicsShapeType"]); + prim.Density = Convert.ToSingle(row["Density"]); + prim.GravityModifier = Convert.ToSingle(row["GravityModifier"]); + prim.Friction = Convert.ToSingle(row["Friction"]); + prim.Restitution = Convert.ToSingle(row["Restitution"]); + return prim; } @@ -2150,6 +2162,12 @@ namespace OpenSim.Data.SQLite row["DynAttrs"] = prim.DynAttrs.ToXml(); else row["DynAttrs"] = null; + + row["PhysicsShapeType"] = prim.PhysicsShapeType; + row["Density"] = (double)prim.Density; + row["GravityModifier"] = (double)prim.GravityModifier; + row["Friction"] = (double)prim.Friction; + row["Restitution"] = (double)prim.Restitution; } /// -- cgit v1.1