Implement proper persistence of the following prim properties:

Floating text, Rotation, Texture animation, Particle System
This will make "Eye Candy" scripts work without modification in
XEngine. The use of the CHANGED_REGION_RESTART hack is no longer
needed. Implemented in MySQL only, hovertext also in SQLite.
This commit is contained in:
Melanie Thielker
2008-09-08 02:40:20 +00:00
parent 4822e79759
commit 490ac0be00
14 changed files with 102 additions and 15 deletions

View File

@@ -0,0 +1,8 @@
BEGIN;
ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
COMMIT;

View File

@@ -31,6 +31,7 @@ using System.Data;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Drawing;
using OpenMetaverse;
using log4net;
using Mono.Data.SqliteClient;
@@ -666,6 +667,10 @@ namespace OpenSim.Data.SQLite
createCol(prims, "SceneGroupID", typeof (String));
// various text fields
createCol(prims, "Text", typeof (String));
createCol(prims, "ColorR", typeof (Int32));
createCol(prims, "ColorG", typeof (Int32));
createCol(prims, "ColorB", typeof (Int32));
createCol(prims, "ColorA", typeof (Int32));
createCol(prims, "Description", typeof (String));
createCol(prims, "SitName", typeof (String));
createCol(prims, "TouchName", typeof (String));
@@ -890,6 +895,10 @@ namespace OpenSim.Data.SQLite
prim.Name = (String) row["Name"];
// various text fields
prim.Text = (String) row["Text"];
prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorA"]),
Convert.ToInt32(row["ColorR"]),
Convert.ToInt32(row["ColorG"]),
Convert.ToInt32(row["ColorB"]));
prim.Description = (String) row["Description"];
prim.SitName = (String) row["SitName"];
prim.TouchName = (String) row["TouchName"];