diff options
author | Homer Horwitz | 2008-09-17 19:21:28 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-09-17 19:21:28 +0000 |
commit | 0ad5d8c0e7e256dd9ff297cb624ce3c4b89b8ee2 (patch) | |
tree | 116dbad30fed0384c29252a5370a8e22c7135ac5 /OpenSim/Data | |
parent | More ScriptEngine cleanup (diff) | |
download | opensim-SC-0ad5d8c0e7e256dd9ff297cb624ce3c4b89b8ee2.zip opensim-SC-0ad5d8c0e7e256dd9ff297cb624ce3c4b89b8ee2.tar.gz opensim-SC-0ad5d8c0e7e256dd9ff297cb624ce3c4b89b8ee2.tar.bz2 opensim-SC-0ad5d8c0e7e256dd9ff297cb624ce3c4b89b8ee2.tar.xz |
Adding currentLookAt to useragents table in SQLite. This complements the
MySQL change from http://opensimulator.org/mantis/view.php?id=2073
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/SQLite/Resources/007_UserStore.sql | 7 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserData.cs | 8 |
2 files changed, 15 insertions, 0 deletions
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 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | ALTER TABLE useragents add currentLookAtX float not null default 128; | ||
4 | ALTER TABLE useragents add currentLookAtY float not null default 128; | ||
5 | ALTER TABLE useragents add currentLookAtZ float not null default 70; | ||
6 | |||
7 | 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 | |||
813 | Convert.ToSingle(row["currentPosY"]), | 813 | Convert.ToSingle(row["currentPosY"]), |
814 | Convert.ToSingle(row["currentPosZ"]) | 814 | Convert.ToSingle(row["currentPosZ"]) |
815 | ); | 815 | ); |
816 | ua.LookAt = new Vector3( | ||
817 | Convert.ToSingle(row["currentLookAtX"]), | ||
818 | Convert.ToSingle(row["currentLookAtY"]), | ||
819 | Convert.ToSingle(row["currentLookAtZ"]) | ||
820 | ); | ||
816 | return ua; | 821 | return ua; |
817 | } | 822 | } |
818 | 823 | ||
@@ -838,6 +843,9 @@ namespace OpenSim.Data.SQLite | |||
838 | row["currentPosX"] = ua.Position.X; | 843 | row["currentPosX"] = ua.Position.X; |
839 | row["currentPosY"] = ua.Position.Y; | 844 | row["currentPosY"] = ua.Position.Y; |
840 | row["currentPosZ"] = ua.Position.Z; | 845 | row["currentPosZ"] = ua.Position.Z; |
846 | row["currentLookAtX"] = ua.LookAt.X; | ||
847 | row["currentLookAtY"] = ua.LookAt.Y; | ||
848 | row["currentLookAtZ"] = ua.LookAt.Z; | ||
841 | } | 849 | } |
842 | 850 | ||
843 | /*********************************************************************** | 851 | /*********************************************************************** |