aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2007-12-07 17:23:11 +0000
committerMW2007-12-07 17:23:11 +0000
commite23290eff67ec2b19cffa3a555deef0a63511358 (patch)
treeec1bed4d0571eca6099ec4de2453a2f8e293824f /OpenSim/Region/Environment/Scenes/Scene.cs
parentThis small patch means that the inventoryserver for grid mode now (diff)
downloadopensim-SC-e23290eff67ec2b19cffa3a555deef0a63511358.zip
opensim-SC-e23290eff67ec2b19cffa3a555deef0a63511358.tar.gz
opensim-SC-e23290eff67ec2b19cffa3a555deef0a63511358.tar.bz2
opensim-SC-e23290eff67ec2b19cffa3a555deef0a63511358.tar.xz
Avatar Appearance refactoring /changes. Added a AvatarAppearance class, each ScenePresence "has" a AvatarAppearance object. All the ScenePresences in a opensim related to one user (so a user's various ScenePresence's in all the regions in that instance) share the same AvatarAppearance object. This means that a user's avatar should appear correctly (to both that user and other users) no matter what border crossing or teleporting they have done.
Note: this mainly improves Standalone mode, as in grid mode the appearance data isn't passed between region servers. Although people should notice a improvement when moving between regions in the same instance.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 40de870..b2cc750 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -991,11 +991,10 @@ namespace OpenSim.Region.Environment.Scenes
991 { 991 {
992 ScenePresence avatar = null; 992 ScenePresence avatar = null;
993 993
994 byte[] visualParams; 994 AvatarAppearance appearance;
995 AvatarWearable[] wearables; 995 LoadAvatarAppearance(client, out appearance);
996 LoadAvatarAppearance(client, out visualParams, out wearables);
997 996
998 avatar = m_innerScene.CreateAndAddScenePresence(client, child, wearables, visualParams); 997 avatar = m_innerScene.CreateAndAddScenePresence(client, child, appearance);
999 998
1000 if (avatar.IsChildAgent) 999 if (avatar.IsChildAgent)
1001 { 1000 {
@@ -1005,12 +1004,16 @@ namespace OpenSim.Region.Environment.Scenes
1005 return avatar; 1004 return avatar;
1006 } 1005 }
1007 1006
1008 protected void LoadAvatarAppearance(IClientAPI client, out byte[] visualParams, out AvatarWearable[] wearables) 1007 protected void LoadAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
1009 { 1008 {
1010 if (m_AvatarFactory == null || 1009 if (m_AvatarFactory == null ||
1011 !m_AvatarFactory.TryGetInitialAvatarAppearance(client.AgentId, out wearables, out visualParams)) 1010 !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
1012 { 1011 {
1012 //not found Appearance
1013 byte[] visualParams;
1014 AvatarWearable[] wearables;
1013 AvatarFactoryModule.GetDefaultAvatarAppearance(out wearables, out visualParams); 1015 AvatarFactoryModule.GetDefaultAvatarAppearance(out wearables, out visualParams);
1016 appearance = new AvatarAppearance(client.AgentId, wearables, visualParams);
1014 } 1017 }
1015 } 1018 }
1016 1019