diff --git a/OpenSim/Data/SQLite/Resources/007_UserStore.sql b/OpenSim/Data/SQLite/Resources/007_UserStore.sql new file mode 100644 index 0000000000..8b0cd285c7 --- /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 ce3cf822b1..2c1e3c3aa9 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; } /***********************************************************************