diff options
author | Sean Dague | 2008-05-21 18:02:09 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-21 18:02:09 +0000 |
commit | 53bcf2139e7c8c9da2fbbcafc45704eae3bc5daa (patch) | |
tree | 6773914f9fd12e53240ce7c3ce8dad3e47ed9a1d /OpenSim | |
parent | IZ QUATERNION NORMALIZE TO 0? NOWAI! KTHXBYE (diff) | |
download | opensim-SC_OLD-53bcf2139e7c8c9da2fbbcafc45704eae3bc5daa.zip opensim-SC_OLD-53bcf2139e7c8c9da2fbbcafc45704eae3bc5daa.tar.gz opensim-SC_OLD-53bcf2139e7c8c9da2fbbcafc45704eae3bc5daa.tar.bz2 opensim-SC_OLD-53bcf2139e7c8c9da2fbbcafc45704eae3bc5daa.tar.xz |
this removes use of the mapper for wearables, and I can confirm things
get saved to the database. There are still issues on wearing things
after a cleared cache that I'm looking at now.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLUserData.cs | 18 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLManager.cs | 86 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserData.cs | 48 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/CreateAvatarAppearance.sql | 63 | ||||
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateUserData.cs | 4 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserData.cs | 18 | ||||
-rw-r--r-- | OpenSim/Data/UserDataBase.cs | 30 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | 5 |
9 files changed, 151 insertions, 124 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs index 9dc6812..0d3563f 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs | |||
@@ -747,15 +747,15 @@ namespace OpenSim.Data.MSSQL | |||
747 | 747 | ||
748 | /// Appearance | 748 | /// Appearance |
749 | /// TODO: stubs for now to get us to a compiling state gently | 749 | /// TODO: stubs for now to get us to a compiling state gently |
750 | // override public AvatarAppearance GetUserAppearance(LLUUID user) | 750 | override public AvatarAppearance GetUserAppearance(LLUUID user) |
751 | // { | 751 | { |
752 | // return new AvatarAppearance(); | 752 | return new AvatarAppearance(); |
753 | // } | 753 | } |
754 | 754 | ||
755 | // override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) | 755 | override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) |
756 | // { | 756 | { |
757 | // return; | 757 | return; |
758 | // } | 758 | } |
759 | 759 | ||
760 | override public void AddAttachment(LLUUID user, LLUUID item) | 760 | override public void AddAttachment(LLUUID user, LLUUID item) |
761 | { | 761 | { |
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 7e1b405..4b11739 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -191,6 +191,12 @@ namespace OpenSim.Data.MySQL | |||
191 | cmd.ExecuteNonQuery(); | 191 | cmd.ExecuteNonQuery(); |
192 | } | 192 | } |
193 | 193 | ||
194 | public void ExecuteSql(string sql) | ||
195 | { | ||
196 | MySqlCommand cmd = new MySqlCommand(sql, dbcon); | ||
197 | cmd.ExecuteNonQuery(); | ||
198 | } | ||
199 | |||
194 | /// <summary> | 200 | /// <summary> |
195 | /// Given a list of tables, return the version of the tables, as seen in the database | 201 | /// Given a list of tables, return the version of the tables, as seen in the database |
196 | /// </summary> | 202 | /// </summary> |
@@ -532,38 +538,42 @@ namespace OpenSim.Data.MySQL | |||
532 | 538 | ||
533 | public AvatarAppearance readAppearanceRow(IDataReader reader) | 539 | public AvatarAppearance readAppearanceRow(IDataReader reader) |
534 | { | 540 | { |
535 | AvatarAppearance appearance = new AvatarAppearance(); | 541 | AvatarAppearance appearance = null; |
536 | appearance.Owner = new LLUUID((string)reader["owner"]); | 542 | if (reader.Read()) |
537 | appearance.Serial = Convert.ToInt32(reader["serial"]); | 543 | { |
538 | appearance.VisualParams = (byte[])reader["visual_params"]; | 544 | appearance = new AvatarAppearance(); |
539 | appearance.Texture = new LLObject.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length); | 545 | appearance.Owner = new LLUUID((string)reader["owner"]); |
540 | appearance.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]); | 546 | appearance.Serial = Convert.ToInt32(reader["serial"]); |
541 | appearance.BodyItem = new LLUUID((string)reader["body_item"]); | 547 | appearance.VisualParams = (byte[])reader["visual_params"]; |
542 | appearance.BodyAsset = new LLUUID((string)reader["body_asset"]); | 548 | appearance.Texture = new LLObject.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length); |
543 | appearance.SkinItem = new LLUUID((string)reader["skin_item"]); | 549 | appearance.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]); |
544 | appearance.SkinAsset = new LLUUID((string)reader["skin_asset"]); | 550 | appearance.BodyItem = new LLUUID((string)reader["body_item"]); |
545 | appearance.HairItem = new LLUUID((string)reader["hair_item"]); | 551 | appearance.BodyAsset = new LLUUID((string)reader["body_asset"]); |
546 | appearance.HairAsset = new LLUUID((string)reader["hair_asset"]); | 552 | appearance.SkinItem = new LLUUID((string)reader["skin_item"]); |
547 | appearance.EyesItem = new LLUUID((string)reader["eyes_item"]); | 553 | appearance.SkinAsset = new LLUUID((string)reader["skin_asset"]); |
548 | appearance.EyesAsset = new LLUUID((string)reader["eyes_asset"]); | 554 | appearance.HairItem = new LLUUID((string)reader["hair_item"]); |
549 | appearance.ShirtItem = new LLUUID((string)reader["shirt_item"]); | 555 | appearance.HairAsset = new LLUUID((string)reader["hair_asset"]); |
550 | appearance.ShirtAsset = new LLUUID((string)reader["shirt_asset"]); | 556 | appearance.EyesItem = new LLUUID((string)reader["eyes_item"]); |
551 | appearance.PantsItem = new LLUUID((string)reader["pants_item"]); | 557 | appearance.EyesAsset = new LLUUID((string)reader["eyes_asset"]); |
552 | appearance.PantsAsset = new LLUUID((string)reader["pants_asset"]); | 558 | appearance.ShirtItem = new LLUUID((string)reader["shirt_item"]); |
553 | appearance.ShoesItem = new LLUUID((string)reader["shoes_item"]); | 559 | appearance.ShirtAsset = new LLUUID((string)reader["shirt_asset"]); |
554 | appearance.ShoesAsset = new LLUUID((string)reader["shoes_asset"]); | 560 | appearance.PantsItem = new LLUUID((string)reader["pants_item"]); |
555 | appearance.SocksItem = new LLUUID((string)reader["socks_item"]); | 561 | appearance.PantsAsset = new LLUUID((string)reader["pants_asset"]); |
556 | appearance.SocksAsset = new LLUUID((string)reader["socks_asset"]); | 562 | appearance.ShoesItem = new LLUUID((string)reader["shoes_item"]); |
557 | appearance.JacketItem = new LLUUID((string)reader["jacket_item"]); | 563 | appearance.ShoesAsset = new LLUUID((string)reader["shoes_asset"]); |
558 | appearance.JacketAsset = new LLUUID((string)reader["jacket_asset"]); | 564 | appearance.SocksItem = new LLUUID((string)reader["socks_item"]); |
559 | appearance.GlovesItem = new LLUUID((string)reader["gloves_item"]); | 565 | appearance.SocksAsset = new LLUUID((string)reader["socks_asset"]); |
560 | appearance.GlovesAsset = new LLUUID((string)reader["gloves_asset"]); | 566 | appearance.JacketItem = new LLUUID((string)reader["jacket_item"]); |
561 | appearance.UnderShirtItem = new LLUUID((string)reader["undershirt_item"]); | 567 | appearance.JacketAsset = new LLUUID((string)reader["jacket_asset"]); |
562 | appearance.UnderShirtAsset = new LLUUID((string)reader["undershirt_asset"]); | 568 | appearance.GlovesItem = new LLUUID((string)reader["gloves_item"]); |
563 | appearance.UnderPantsItem = new LLUUID((string)reader["underpants_item"]); | 569 | appearance.GlovesAsset = new LLUUID((string)reader["gloves_asset"]); |
564 | appearance.UnderPantsAsset = new LLUUID((string)reader["underpants_asset"]); | 570 | appearance.UnderShirtItem = new LLUUID((string)reader["undershirt_item"]); |
565 | appearance.SkirtItem = new LLUUID((string)reader["skirt_item"]); | 571 | appearance.UnderShirtAsset = new LLUUID((string)reader["undershirt_asset"]); |
566 | appearance.SkirtAsset = new LLUUID((string)reader["skirt_asset"]); | 572 | appearance.UnderPantsItem = new LLUUID((string)reader["underpants_item"]); |
573 | appearance.UnderPantsAsset = new LLUUID((string)reader["underpants_asset"]); | ||
574 | appearance.SkirtItem = new LLUUID((string)reader["skirt_item"]); | ||
575 | appearance.SkirtAsset = new LLUUID((string)reader["skirt_asset"]); | ||
576 | } | ||
567 | return appearance; | 577 | return appearance; |
568 | } | 578 | } |
569 | 579 | ||
@@ -1007,10 +1017,10 @@ namespace OpenSim.Data.MySQL | |||
1007 | MySqlCommand cmd = (MySqlCommand) dbcon.CreateCommand(); | 1017 | MySqlCommand cmd = (MySqlCommand) dbcon.CreateCommand(); |
1008 | cmd.CommandText = sql; | 1018 | cmd.CommandText = sql; |
1009 | cmd.Parameters.AddWithValue("?owner", appearance.Owner.ToString()); | 1019 | cmd.Parameters.AddWithValue("?owner", appearance.Owner.ToString()); |
1010 | cmd.Parameters.AddWithValue("?serial", appearance.Serial.ToString()); | 1020 | cmd.Parameters.AddWithValue("?serial", appearance.Serial); |
1011 | cmd.Parameters.AddWithValue("?visual_params", appearance.VisualParams); | 1021 | cmd.Parameters.AddWithValue("?visual_params", appearance.VisualParams); |
1012 | cmd.Parameters.AddWithValue("?texture", appearance.Texture.ToBytes()); | 1022 | cmd.Parameters.AddWithValue("?texture", appearance.Texture.ToBytes()); |
1013 | cmd.Parameters.AddWithValue("?avatar_height", appearance.AvatarHeight.ToString()); | 1023 | cmd.Parameters.AddWithValue("?avatar_height", appearance.AvatarHeight); |
1014 | cmd.Parameters.AddWithValue("?body_item", appearance.BodyItem.ToString()); | 1024 | cmd.Parameters.AddWithValue("?body_item", appearance.BodyItem.ToString()); |
1015 | cmd.Parameters.AddWithValue("?body_asset", appearance.BodyAsset.ToString()); | 1025 | cmd.Parameters.AddWithValue("?body_asset", appearance.BodyAsset.ToString()); |
1016 | cmd.Parameters.AddWithValue("?skin_item", appearance.SkinItem.ToString()); | 1026 | cmd.Parameters.AddWithValue("?skin_item", appearance.SkinItem.ToString()); |
@@ -1037,12 +1047,10 @@ namespace OpenSim.Data.MySQL | |||
1037 | cmd.Parameters.AddWithValue("?underpants_asset", appearance.UnderPantsAsset.ToString()); | 1047 | cmd.Parameters.AddWithValue("?underpants_asset", appearance.UnderPantsAsset.ToString()); |
1038 | cmd.Parameters.AddWithValue("?skirt_item", appearance.SkirtItem.ToString()); | 1048 | cmd.Parameters.AddWithValue("?skirt_item", appearance.SkirtItem.ToString()); |
1039 | cmd.Parameters.AddWithValue("?skirt_asset", appearance.SkirtAsset.ToString()); | 1049 | cmd.Parameters.AddWithValue("?skirt_asset", appearance.SkirtAsset.ToString()); |
1040 | 1050 | ||
1041 | int x; | 1051 | if (cmd.ExecuteNonQuery() > 0) |
1042 | if ((x = cmd.ExecuteNonQuery()) > 0) | ||
1043 | { | ||
1044 | returnval = true; | 1052 | returnval = true; |
1045 | } | 1053 | |
1046 | cmd.Dispose(); | 1054 | cmd.Dispose(); |
1047 | } | 1055 | } |
1048 | catch (Exception e) | 1056 | catch (Exception e) |
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index 56bdcbf..35bcb1d 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs | |||
@@ -34,8 +34,6 @@ using libsecondlife; | |||
34 | using log4net; | 34 | using log4net; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Data.Base; | 36 | using OpenSim.Data.Base; |
37 | using OpenSim.Data.MapperFactory; | ||
38 | using OpenSim.Data.MySQLMapper; | ||
39 | 37 | ||
40 | namespace OpenSim.Data.MySQL | 38 | namespace OpenSim.Data.MySQL |
41 | { | 39 | { |
@@ -56,8 +54,6 @@ namespace OpenSim.Data.MySQL | |||
56 | private string m_userFriendsTableName; | 54 | private string m_userFriendsTableName; |
57 | private string m_appearanceTableName = "avatarappearance"; | 55 | private string m_appearanceTableName = "avatarappearance"; |
58 | private string m_connectString; | 56 | private string m_connectString; |
59 | private BaseDatabaseConnector m_databaseMapper; | ||
60 | private AppearanceTableMapper m_appearanceMapper; | ||
61 | 57 | ||
62 | /// <summary> | 58 | /// <summary> |
63 | /// Loads and initialises the MySQL storage plugin | 59 | /// Loads and initialises the MySQL storage plugin |
@@ -107,15 +103,6 @@ namespace OpenSim.Data.MySQL | |||
107 | database = new MySQLManager(m_connectString); | 103 | database = new MySQLManager(m_connectString); |
108 | } | 104 | } |
109 | 105 | ||
110 | string mapperTypeStr = "MySQL"; | ||
111 | DataMapperFactory.MAPPER_TYPE mapperType = | ||
112 | (DataMapperFactory.MAPPER_TYPE) | ||
113 | Enum.Parse(typeof (DataMapperFactory.MAPPER_TYPE), mapperTypeStr); | ||
114 | |||
115 | m_databaseMapper = DataMapperFactory.GetDataBaseMapper(mapperType, m_connectString); | ||
116 | |||
117 | m_appearanceMapper = new AppearanceTableMapper(m_databaseMapper, "AvatarAppearance"); | ||
118 | |||
119 | TestTables(); | 106 | TestTables(); |
120 | } | 107 | } |
121 | 108 | ||
@@ -203,6 +190,12 @@ namespace OpenSim.Data.MySQL | |||
203 | { | 190 | { |
204 | database.ExecuteResourceSql("CreateAvatarAppearance.sql"); | 191 | database.ExecuteResourceSql("CreateAvatarAppearance.sql"); |
205 | return; | 192 | return; |
193 | } | ||
194 | else if (oldVersion.Contains("Rev.1")) | ||
195 | { | ||
196 | database.ExecuteSql("drop table avatarappearance"); | ||
197 | database.ExecuteResourceSql("CreateAvatarAppearance.sql"); | ||
198 | return; | ||
206 | } | 199 | } |
207 | } | 200 | } |
208 | 201 | ||
@@ -676,18 +669,35 @@ namespace OpenSim.Data.MySQL | |||
676 | // override | 669 | // override |
677 | override public AvatarAppearance GetUserAppearance(LLUUID user) | 670 | override public AvatarAppearance GetUserAppearance(LLUUID user) |
678 | { | 671 | { |
679 | AvatarAppearance appearance = null; | 672 | try { |
680 | if (!m_appearanceMapper.TryGetValue(user.UUID, out appearance)) | 673 | lock (database) |
674 | { | ||
675 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
676 | param["?owner"] = user.ToString(); | ||
677 | |||
678 | IDbCommand result = database.Query("SELECT * FROM " + m_appearanceTableName + " WHERE owner = ?owner", param); | ||
679 | IDataReader reader = result.ExecuteReader(); | ||
680 | |||
681 | AvatarAppearance appearance = database.readAppearanceRow(reader); | ||
682 | |||
683 | reader.Close(); | ||
684 | result.Dispose(); | ||
685 | |||
686 | return appearance; | ||
687 | } | ||
688 | } | ||
689 | catch (Exception e) | ||
681 | { | 690 | { |
682 | appearance = null; | 691 | database.Reconnect(); |
692 | m_log.Error(e.ToString()); | ||
693 | return null; | ||
683 | } | 694 | } |
684 | return appearance; | ||
685 | } | 695 | } |
686 | |||
687 | // override | 696 | // override |
688 | override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) | 697 | override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) |
689 | { | 698 | { |
690 | m_appearanceMapper.Update(user.UUID, appearance); | 699 | appearance.Owner = user; |
700 | database.insertAppearanceRow(appearance); | ||
691 | } | 701 | } |
692 | 702 | ||
693 | override public void AddAttachment(LLUUID user, LLUUID item) | 703 | override public void AddAttachment(LLUUID user, LLUUID item) |
diff --git a/OpenSim/Data/MySQL/Resources/CreateAvatarAppearance.sql b/OpenSim/Data/MySQL/Resources/CreateAvatarAppearance.sql index 0deb099..475c933 100644 --- a/OpenSim/Data/MySQL/Resources/CreateAvatarAppearance.sql +++ b/OpenSim/Data/MySQL/Resources/CreateAvatarAppearance.sql | |||
@@ -4,36 +4,39 @@ | |||
4 | 4 | ||
5 | DROP TABLE IF EXISTS `avatarappearance`; | 5 | DROP TABLE IF EXISTS `avatarappearance`; |
6 | CREATE TABLE `avatarappearance` ( | 6 | CREATE TABLE `avatarappearance` ( |
7 | `UUID` char(36) NOT NULL, | 7 | Owner char(36) NOT NULL, |
8 | `Serial` int(10) unsigned NOT NULL, | 8 | Serial int(10) unsigned NOT NULL, |
9 | `WearableItem0` char(36) NOT NULL, | 9 | Visual_Params blob NOT NULL, |
10 | `WearableAsset0` char(36) NOT NULL, | 10 | Texture blob NOT NULL, |
11 | `WearableItem1` char(36) NOT NULL, | 11 | Avatar_Height float NOT NULL, |
12 | `WearableAsset1` char(36) NOT NULL, | 12 | Body_Item char(36) NOT NULL, |
13 | `WearableItem2` char(36) NOT NULL, | 13 | Body_Asset char(36) NOT NULL, |
14 | `WearableAsset2` char(36) NOT NULL, | 14 | Skin_Item char(36) NOT NULL, |
15 | `WearableItem3` char(36) NOT NULL, | 15 | Skin_Asset char(36) NOT NULL, |
16 | `WearableAsset3` char(36) NOT NULL, | 16 | Hair_Item char(36) NOT NULL, |
17 | `WearableItem4` char(36) NOT NULL, | 17 | Hair_Asset char(36) NOT NULL, |
18 | `WearableAsset4` char(36) NOT NULL, | 18 | Eyes_Item char(36) NOT NULL, |
19 | `WearableItem5` char(36) NOT NULL, | 19 | Eyes_Asset char(36) NOT NULL, |
20 | `WearableAsset5` char(36) NOT NULL, | 20 | Shirt_Item char(36) NOT NULL, |
21 | `WearableItem6` char(36) NOT NULL, | 21 | Shirt_Asset char(36) NOT NULL, |
22 | `WearableAsset6` char(36) NOT NULL, | 22 | Pants_Item char(36) NOT NULL, |
23 | `WearableItem7` char(36) NOT NULL, | 23 | Pants_Asset char(36) NOT NULL, |
24 | `WearableAsset7` char(36) NOT NULL, | 24 | Shoes_Item char(36) NOT NULL, |
25 | `WearableItem8` char(36) NOT NULL, | 25 | Shoes_Asset char(36) NOT NULL, |
26 | `WearableAsset8` char(36) NOT NULL, | 26 | Socks_Item char(36) NOT NULL, |
27 | `WearableItem9` char(36) NOT NULL, | 27 | Socks_Asset char(36) NOT NULL, |
28 | `WearableAsset9` char(36) NOT NULL, | 28 | Jacket_Item char(36) NOT NULL, |
29 | `WearableItem10` char(36) NOT NULL, | 29 | Jacket_Asset char(36) NOT NULL, |
30 | `WearableAsset10` char(36) NOT NULL, | 30 | Gloves_Item char(36) NOT NULL, |
31 | `WearableItem11` char(36) NOT NULL, | 31 | Gloves_Asset char(36) NOT NULL, |
32 | `WearableAsset11` char(36) NOT NULL, | 32 | Undershirt_Item char(36) NOT NULL, |
33 | `WearableItem12` char(36) NOT NULL, | 33 | Undershirt_Asset char(36) NOT NULL, |
34 | `WearableAsset12` char(36) NOT NULL, | 34 | Underpants_Item char(36) NOT NULL, |
35 | Underpants_Asset char(36) NOT NULL, | ||
36 | Skirt_Item char(36) NOT NULL, | ||
37 | Skirt_Asset char(36) NOT NULL, | ||
35 | 38 | ||
36 | 39 | ||
37 | PRIMARY KEY (`UUID`) | 40 | PRIMARY KEY (`Owner`) |
38 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev.1'; | 41 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev.2'; |
39 | 42 | ||
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index 678ec04..b757496 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs | |||
@@ -306,7 +306,7 @@ namespace OpenSim.Data.NHibernate | |||
306 | 306 | ||
307 | /// Appearance | 307 | /// Appearance |
308 | /// TODO: stubs for now to get us to a compiling state gently | 308 | /// TODO: stubs for now to get us to a compiling state gently |
309 | public AvatarAppearance GetUserAppearance(LLUUID user) | 309 | public override AvatarAppearance GetUserAppearance(LLUUID user) |
310 | { | 310 | { |
311 | AvatarAppearance appearance; | 311 | AvatarAppearance appearance; |
312 | // TODO: I'm sure I'll have to do something silly here | 312 | // TODO: I'm sure I'll have to do something silly here |
@@ -328,7 +328,7 @@ namespace OpenSim.Data.NHibernate | |||
328 | } | 328 | } |
329 | 329 | ||
330 | 330 | ||
331 | public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) | 331 | public override void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) |
332 | { | 332 | { |
333 | bool exists = ExistsAppearance(user); | 333 | bool exists = ExistsAppearance(user); |
334 | using (ISession session = factory.OpenSession()) | 334 | using (ISession session = factory.OpenSession()) |
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index d8b140c..d943f53 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs | |||
@@ -480,15 +480,15 @@ namespace OpenSim.Data.SQLite | |||
480 | 480 | ||
481 | /// Appearance | 481 | /// Appearance |
482 | /// TODO: stubs for now to get us to a compiling state gently | 482 | /// TODO: stubs for now to get us to a compiling state gently |
483 | // override public AvatarAppearance GetUserAppearance(LLUUID user) | 483 | override public AvatarAppearance GetUserAppearance(LLUUID user) |
484 | // { | 484 | { |
485 | // return new AvatarAppearance(); | 485 | return new AvatarAppearance(); |
486 | // } | 486 | } |
487 | 487 | ||
488 | // override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) | 488 | override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) |
489 | // { | 489 | { |
490 | // return; | 490 | return; |
491 | // } | 491 | } |
492 | 492 | ||
493 | override public void AddAttachment(LLUUID user, LLUUID item) | 493 | override public void AddAttachment(LLUUID user, LLUUID item) |
494 | { | 494 | { |
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs index ad40bbc..cbf24a7 100644 --- a/OpenSim/Data/UserDataBase.cs +++ b/OpenSim/Data/UserDataBase.cs | |||
@@ -59,20 +59,22 @@ namespace OpenSim.Data | |||
59 | public abstract string Name {get;} | 59 | public abstract string Name {get;} |
60 | public abstract void Initialise(string connect); | 60 | public abstract void Initialise(string connect); |
61 | public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); | 61 | public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); |
62 | public virtual AvatarAppearance GetUserAppearance(LLUUID user) { | 62 | public abstract AvatarAppearance GetUserAppearance(LLUUID user); |
63 | AvatarAppearance aa = null; | 63 | public abstract void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); |
64 | try { | 64 | // public virtual AvatarAppearance GetUserAppearance(LLUUID user) { |
65 | aa = aplist[user]; | 65 | // AvatarAppearance aa = null; |
66 | m_log.Info("[APPEARANCE] Found appearance for " + user.ToString() + aa.ToString()); | 66 | // try { |
67 | } catch (System.Collections.Generic.KeyNotFoundException e) { | 67 | // aa = aplist[user]; |
68 | m_log.Info("[APPEARANCE] No appearance found for " + user.ToString()); | 68 | // m_log.Info("[APPEARANCE] Found appearance for " + user.ToString() + aa.ToString()); |
69 | } | 69 | // } catch (System.Collections.Generic.KeyNotFoundException e) { |
70 | return aa; | 70 | // m_log.Info("[APPEARANCE] No appearance found for " + user.ToString()); |
71 | } | 71 | // } |
72 | public virtual void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) { | 72 | // return aa; |
73 | aplist[user] = appearance; | 73 | // } |
74 | m_log.Info("[APPEARANCE] Setting appearance for " + user.ToString() + appearance.ToString()); | 74 | // public virtual void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) { |
75 | } | 75 | // aplist[user] = appearance; |
76 | // m_log.Info("[APPEARANCE] Setting appearance for " + user.ToString() + appearance.ToString()); | ||
77 | // } | ||
76 | public abstract void AddAttachment(LLUUID user, LLUUID item); | 78 | public abstract void AddAttachment(LLUUID user, LLUUID item); |
77 | public abstract void RemoveAttachment(LLUUID user, LLUUID item); | 79 | public abstract void RemoveAttachment(LLUUID user, LLUUID item); |
78 | public abstract List<LLUUID> GetAttachments(LLUUID user); | 80 | public abstract List<LLUUID> GetAttachments(LLUUID user); |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index d0b87fd..f70eb45 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1456,8 +1456,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1456 | 1456 | ||
1457 | SendFullUpdateToAllClients(); | 1457 | SendFullUpdateToAllClients(); |
1458 | SendAppearanceToAllOtherAgents(); | 1458 | SendAppearanceToAllOtherAgents(); |
1459 | // This is probably egregious | 1459 | SendOwnAppearance(); |
1460 | m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | ||
1461 | } | 1460 | } |
1462 | 1461 | ||
1463 | 1462 | ||
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index 37b7e8d..5c5cb17 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -61,9 +61,14 @@ namespace OpenSim.Region.Modules.AvatarFactory | |||
61 | { | 61 | { |
62 | appearance = m_scene.CommsManager.UserService.GetUserAppearance(avatarId); | 62 | appearance = m_scene.CommsManager.UserService.GetUserAppearance(avatarId); |
63 | if (appearance != null) | 63 | if (appearance != null) |
64 | { | ||
64 | return true; | 65 | return true; |
66 | } | ||
65 | else | 67 | else |
68 | { | ||
69 | m_log.InfoFormat("[APPEARANCE] appearance not found for {0}", avatarId.ToString()); | ||
66 | return false; | 70 | return false; |
71 | } | ||
67 | 72 | ||
68 | // //should only let one thread at a time do this part | 73 | // //should only let one thread at a time do this part |
69 | // EventWaitHandle waitHandle = null; | 74 | // EventWaitHandle waitHandle = null; |