From 0ad5d8c0e7e256dd9ff297cb624ce3c4b89b8ee2 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Wed, 17 Sep 2008 19:21:28 +0000 Subject: Adding currentLookAt to useragents table in SQLite. This complements the MySQL change from http://opensimulator.org/mantis/view.php?id=2073 --- OpenSim/Data/SQLite/Resources/007_UserStore.sql | 7 +++++++ OpenSim/Data/SQLite/SQLiteUserData.cs | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 OpenSim/Data/SQLite/Resources/007_UserStore.sql (limited to 'OpenSim/Data/SQLite') diff --git a/OpenSim/Data/SQLite/Resources/007_UserStore.sql b/OpenSim/Data/SQLite/Resources/007_UserStore.sql new file mode 100644 index 0000000..8b0cd28 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/007_UserStore.sql @@ -0,0 +1,7 @@ +BEGIN TRANSACTION; + +ALTER TABLE useragents add currentLookAtX float not null default 128; +ALTER TABLE useragents add currentLookAtY float not null default 128; +ALTER TABLE useragents add currentLookAtZ float not null default 70; + +COMMIT; diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index ce3cf82..2c1e3c3 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs @@ -813,6 +813,11 @@ namespace OpenSim.Data.SQLite Convert.ToSingle(row["currentPosY"]), Convert.ToSingle(row["currentPosZ"]) ); + ua.LookAt = new Vector3( + Convert.ToSingle(row["currentLookAtX"]), + Convert.ToSingle(row["currentLookAtY"]), + Convert.ToSingle(row["currentLookAtZ"]) + ); return ua; } @@ -838,6 +843,9 @@ namespace OpenSim.Data.SQLite row["currentPosX"] = ua.Position.X; row["currentPosY"] = ua.Position.Y; row["currentPosZ"] = ua.Position.Z; + row["currentLookAtX"] = ua.LookAt.X; + row["currentLookAtY"] = ua.LookAt.Y; + row["currentLookAtZ"] = ua.LookAt.Z; } /*********************************************************************** -- cgit v1.1