mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
persist test feature and old sop animations in sqlite
This commit is contained in:
@@ -1251,6 +1251,7 @@ namespace OpenSim.Data.SQLite
|
||||
createCol(prims, "sitactrange", typeof(float));
|
||||
|
||||
createCol(prims, "pseudocrc", typeof(int));
|
||||
createCol(prims, "sopanims", typeof(byte[]));
|
||||
|
||||
// Add in contraints
|
||||
prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
|
||||
@@ -1300,7 +1301,7 @@ namespace OpenSim.Data.SQLite
|
||||
createCol(shapes, "Texture", typeof(Byte[]));
|
||||
createCol(shapes, "ExtraParams", typeof(Byte[]));
|
||||
createCol(shapes, "Media", typeof(String));
|
||||
|
||||
createCol(shapes, "NatOvrd", typeof(byte[]));
|
||||
shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] };
|
||||
|
||||
return shapes;
|
||||
@@ -1798,6 +1799,19 @@ namespace OpenSim.Data.SQLite
|
||||
if(pseudocrc != 0)
|
||||
prim.PseudoCRC = pseudocrc;
|
||||
|
||||
if (row["sopanims"] is not DBNull)
|
||||
{
|
||||
byte[] data = (byte[])row["sopanims"];
|
||||
if (data.Length > 0)
|
||||
prim.DeSerializeAnimations(data);
|
||||
else
|
||||
prim.Animations = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
prim.Animations = null;
|
||||
}
|
||||
|
||||
return prim;
|
||||
}
|
||||
|
||||
@@ -2189,6 +2203,8 @@ namespace OpenSim.Data.SQLite
|
||||
row["PhysInertia"] = String.Empty;
|
||||
|
||||
row["pseudocrc"] = prim.PseudoCRC;
|
||||
row["sopanims"] = prim.SerializeAnimations();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2398,6 +2414,11 @@ namespace OpenSim.Data.SQLite
|
||||
if (row["Media"] is not System.DBNull)
|
||||
s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
|
||||
|
||||
if (row["MatOvrd"] is not System.DBNull)
|
||||
s.RenderMaterialsOvrFromRawBin((byte[])row["MatOvrd"]);
|
||||
else
|
||||
s.RenderMaterialsOvrFromRawBin(null);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -2445,6 +2466,8 @@ namespace OpenSim.Data.SQLite
|
||||
|
||||
if (s.Media is not null)
|
||||
row["Media"] = s.Media.ToXml();
|
||||
|
||||
row["MatOvrd"] = s.RenderMaterialsOvrToRawBin();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user