diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/AvatarWearable.cs | 6 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 23 |
6 files changed, 50 insertions, 32 deletions
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index 59e6a1b..62971ea 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs | |||
@@ -71,17 +71,23 @@ namespace OpenSim.Framework | |||
71 | { | 71 | { |
72 | defaultWearables[i] = new AvatarWearable(); | 72 | defaultWearables[i] = new AvatarWearable(); |
73 | } | 73 | } |
74 | |||
75 | // Body | ||
74 | defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73"); | 76 | defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73"); |
75 | defaultWearables[0].ItemID = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); | 77 | defaultWearables[0].ItemID = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); |
76 | 78 | ||
79 | // Skin | ||
77 | defaultWearables[1].ItemID = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9"); | 80 | defaultWearables[1].ItemID = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9"); |
78 | defaultWearables[1].AssetID = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb"); | 81 | defaultWearables[1].AssetID = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb"); |
79 | 82 | ||
83 | // Shirt | ||
80 | defaultWearables[4].ItemID = new UUID("77c41e39-38f9-f75a-0000-585989bf0000"); | 84 | defaultWearables[4].ItemID = new UUID("77c41e39-38f9-f75a-0000-585989bf0000"); |
81 | defaultWearables[4].AssetID = new UUID("00000000-38f9-1111-024e-222222111110"); | 85 | defaultWearables[4].AssetID = new UUID("00000000-38f9-1111-024e-222222111110"); |
82 | 86 | ||
87 | // Pants | ||
83 | defaultWearables[5].ItemID = new UUID("77c41e39-38f9-f75a-0000-5859892f1111"); | 88 | defaultWearables[5].ItemID = new UUID("77c41e39-38f9-f75a-0000-5859892f1111"); |
84 | defaultWearables[5].AssetID = new UUID("00000000-38f9-1111-024e-222222111120"); | 89 | defaultWearables[5].AssetID = new UUID("00000000-38f9-1111-024e-222222111120"); |
90 | |||
85 | return defaultWearables; | 91 | return defaultWearables; |
86 | } | 92 | } |
87 | } | 93 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 46615cc..c8a54a7 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -635,8 +635,20 @@ namespace OpenSim.Framework | |||
635 | 635 | ||
636 | // void ActivateGesture(UUID assetId, UUID gestureId); | 636 | // void ActivateGesture(UUID assetId, UUID gestureId); |
637 | 637 | ||
638 | /// <summary> | ||
639 | /// Tell this client what items it should be wearing now | ||
640 | /// </summary> | ||
641 | /// <param name="wearables"></param> | ||
638 | void SendWearables(AvatarWearable[] wearables, int serial); | 642 | void SendWearables(AvatarWearable[] wearables, int serial); |
643 | |||
644 | /// <summary> | ||
645 | /// Send information about the given agent's appearance to another client. | ||
646 | /// </summary> | ||
647 | /// <param name="agentID">The id of the agent associated with the appearance</param> | ||
648 | /// <param name="visualParams"></param> | ||
649 | /// <param name="textureEntry"></param> | ||
639 | void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry); | 650 | void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry); |
651 | |||
640 | void SendStartPingCheck(byte seq); | 652 | void SendStartPingCheck(byte seq); |
641 | 653 | ||
642 | /// <summary> | 654 | /// <summary> |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3c9034b..aaa5e1c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -2221,11 +2221,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2221 | // Gesture | 2221 | // Gesture |
2222 | 2222 | ||
2223 | #region Appearance/ Wearables Methods | 2223 | #region Appearance/ Wearables Methods |
2224 | 2224 | ||
2225 | /// <summary> | ||
2226 | /// | ||
2227 | /// </summary> | ||
2228 | /// <param name="wearables"></param> | ||
2229 | public void SendWearables(AvatarWearable[] wearables, int serial) | 2225 | public void SendWearables(AvatarWearable[] wearables, int serial) |
2230 | { | 2226 | { |
2231 | AgentWearablesUpdatePacket aw = (AgentWearablesUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentWearablesUpdate); | 2227 | AgentWearablesUpdatePacket aw = (AgentWearablesUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentWearablesUpdate); |
@@ -2248,12 +2244,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2248 | OutPacket(aw, ThrottleOutPacketType.Task); | 2244 | OutPacket(aw, ThrottleOutPacketType.Task); |
2249 | } | 2245 | } |
2250 | 2246 | ||
2251 | /// <summary> | ||
2252 | /// | ||
2253 | /// </summary> | ||
2254 | /// <param name="agentID"></param> | ||
2255 | /// <param name="visualParams"></param> | ||
2256 | /// <param name="textureEntry"></param> | ||
2257 | public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) | 2247 | public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) |
2258 | { | 2248 | { |
2259 | AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); | 2249 | AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); |
@@ -4199,6 +4189,7 @@ Console.WriteLine(msgpack.ToString()); | |||
4199 | } | 4189 | } |
4200 | 4190 | ||
4201 | break; | 4191 | break; |
4192 | |||
4202 | case PacketType.RegionHandshakeReply: | 4193 | case PacketType.RegionHandshakeReply: |
4203 | 4194 | ||
4204 | handlerRegionHandShakeReply = OnRegionHandShakeReply; | 4195 | handlerRegionHandShakeReply = OnRegionHandShakeReply; |
@@ -4208,6 +4199,7 @@ Console.WriteLine(msgpack.ToString()); | |||
4208 | } | 4199 | } |
4209 | 4200 | ||
4210 | break; | 4201 | break; |
4202 | |||
4211 | case PacketType.AgentWearablesRequest: | 4203 | case PacketType.AgentWearablesRequest: |
4212 | handlerRequestWearables = OnRequestWearables; | 4204 | handlerRequestWearables = OnRequestWearables; |
4213 | 4205 | ||
@@ -4224,6 +4216,7 @@ Console.WriteLine(msgpack.ToString()); | |||
4224 | } | 4216 | } |
4225 | 4217 | ||
4226 | break; | 4218 | break; |
4219 | |||
4227 | case PacketType.AgentSetAppearance: | 4220 | case PacketType.AgentSetAppearance: |
4228 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; | 4221 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; |
4229 | 4222 | ||
diff --git a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs index d3b782f..94c27a5 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -131,8 +131,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory | |||
131 | } | 131 | } |
132 | else | 132 | else |
133 | { | 133 | { |
134 | // UUID assetId; | ||
135 | |||
136 | InventoryItemBase baseItem = profile.RootFolder.FindItem(appearance.Wearables[i].ItemID); | 134 | InventoryItemBase baseItem = profile.RootFolder.FindItem(appearance.Wearables[i].ItemID); |
137 | 135 | ||
138 | if (baseItem != null) | 136 | if (baseItem != null) |
@@ -141,7 +139,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory | |||
141 | } | 139 | } |
142 | else | 140 | else |
143 | { | 141 | { |
144 | m_log.ErrorFormat("[APPEARANCE] Can't find inventory item {0}, setting to default", appearance.Wearables[i].ItemID); | 142 | m_log.ErrorFormat("[APPEARANCE]: Can't find inventory item {0}, setting to default", appearance.Wearables[i].ItemID); |
145 | appearance.Wearables[i].AssetID = def.Wearables[i].AssetID; | 143 | appearance.Wearables[i].AssetID = def.Wearables[i].AssetID; |
146 | } | 144 | } |
147 | } | 145 | } |
@@ -149,7 +147,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory | |||
149 | } | 147 | } |
150 | else | 148 | else |
151 | { | 149 | { |
152 | m_log.Error("[APPEARANCE] you have no inventory, appearance stuff isn't going to work"); | 150 | m_log.Error("[APPEARANCE]: you have no inventory, appearance stuff isn't going to work"); |
153 | } | 151 | } |
154 | } | 152 | } |
155 | 153 | ||
@@ -157,19 +155,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory | |||
157 | { | 155 | { |
158 | IClientAPI clientView = (IClientAPI)sender; | 156 | IClientAPI clientView = (IClientAPI)sender; |
159 | ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId); | 157 | ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId); |
160 | if (avatar == null) { | 158 | |
161 | m_log.Info("Avatar is child agent, ignoring AvatarIsWearing event"); | 159 | if (avatar == null) |
160 | { | ||
161 | m_log.Warn("[APPEARANCE]: Avatar is child agent, ignoring AvatarIsWearing event"); | ||
162 | return; | 162 | return; |
163 | } | 163 | } |
164 | 164 | ||
165 | CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); | 165 | CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); |
166 | 166 | ||
167 | AvatarAppearance avatAppearance = null; | 167 | AvatarAppearance avatAppearance = null; |
168 | if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) { | 168 | if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) |
169 | m_log.Info("We didn't seem to find the appearance, falling back to ScenePresense"); | 169 | { |
170 | m_log.Info("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresense"); | ||
170 | avatAppearance = avatar.Appearance; | 171 | avatAppearance = avatar.Appearance; |
171 | } | 172 | } |
172 | m_log.Info("Calling Avatar is Wearing"); | 173 | |
174 | m_log.Info("[APPEARANCE]: Calling Avatar is Wearing"); | ||
175 | |||
173 | if (profile != null) | 176 | if (profile != null) |
174 | { | 177 | { |
175 | if (profile.RootFolder != null) | 178 | if (profile.RootFolder != null) |
@@ -181,6 +184,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory | |||
181 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; | 184 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; |
182 | } | 185 | } |
183 | } | 186 | } |
187 | |||
184 | SetAppearanceAssets(profile, ref avatAppearance); | 188 | SetAppearanceAssets(profile, ref avatAppearance); |
185 | 189 | ||
186 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(clientView.AgentId, avatAppearance); | 190 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(clientView.AgentId, avatAppearance); |
@@ -188,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory | |||
188 | } | 192 | } |
189 | else | 193 | else |
190 | { | 194 | { |
191 | m_log.Error("Root Profile is null, we can't set the appearance"); | 195 | m_log.Error("[APPEARANCE]: Root Profile is null, we can't set the appearance"); |
192 | } | 196 | } |
193 | } | 197 | } |
194 | } | 198 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 8d94c68..77afc43 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2236,8 +2236,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
2236 | protected virtual void SubscribeToClientEvents(IClientAPI client) | 2236 | protected virtual void SubscribeToClientEvents(IClientAPI client) |
2237 | { | 2237 | { |
2238 | client.OnRegionHandShakeReply += SendLayerData; | 2238 | client.OnRegionHandShakeReply += SendLayerData; |
2239 | //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); | ||
2240 | // client.OnRequestWearables += InformClientOfNeighbours; | ||
2241 | client.OnAddPrim += AddNewPrim; | 2239 | client.OnAddPrim += AddNewPrim; |
2242 | client.OnUpdatePrimGroupPosition += m_innerScene.UpdatePrimPosition; | 2240 | client.OnUpdatePrimGroupPosition += m_innerScene.UpdatePrimPosition; |
2243 | client.OnUpdatePrimSinglePosition += m_innerScene.UpdatePrimSinglePosition; | 2241 | client.OnUpdatePrimSinglePosition += m_innerScene.UpdatePrimSinglePosition; |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 6f6e0cb..7bc0360 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -527,7 +527,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
527 | 527 | ||
528 | public void RegisterToEvents() | 528 | public void RegisterToEvents() |
529 | { | 529 | { |
530 | m_controllingClient.OnRequestWearables += SendOwnAppearance; | 530 | m_controllingClient.OnRequestWearables += SendWearables; |
531 | m_controllingClient.OnSetAppearance += SetAppearance; | 531 | m_controllingClient.OnSetAppearance += SetAppearance; |
532 | m_controllingClient.OnCompleteMovementToRegion += CompleteMovement; | 532 | m_controllingClient.OnCompleteMovementToRegion += CompleteMovement; |
533 | m_controllingClient.OnCompleteMovementToRegion += SendInitialData; | 533 | m_controllingClient.OnCompleteMovementToRegion += SendInitialData; |
@@ -1843,12 +1843,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1843 | } | 1843 | } |
1844 | 1844 | ||
1845 | /// <summary> | 1845 | /// <summary> |
1846 | /// | 1846 | /// Tell the client for this scene presence what items it should be wearing now |
1847 | /// </summary> | 1847 | /// </summary> |
1848 | /// <param name="client"></param> | 1848 | /// <param name="client"></param> |
1849 | public void SendOwnAppearance() | 1849 | public void SendWearables() |
1850 | { | 1850 | { |
1851 | m_log.Info("[APPEARANCE]: Sending Own Appearance"); | 1851 | m_log.DebugFormat("[APPEARANCE]: Sending wearables to {0}", Name); |
1852 | |||
1852 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | 1853 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |
1853 | // ControllingClient.SendAppearance( | 1854 | // ControllingClient.SendAppearance( |
1854 | // m_appearance.Owner, | 1855 | // m_appearance.Owner, |
@@ -1862,8 +1863,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1862 | /// </summary> | 1863 | /// </summary> |
1863 | public void SendAppearanceToAllOtherAgents() | 1864 | public void SendAppearanceToAllOtherAgents() |
1864 | { | 1865 | { |
1865 | m_log.Info("[APPEARANCE]: Sending Appearance to All Other Agents"); | 1866 | m_log.DebugFormat("[APPEARANCE]: Sending appearance to all other agents for {0}", Name); |
1866 | m_perfMonMS=System.Environment.TickCount; | 1867 | |
1868 | m_perfMonMS = System.Environment.TickCount; | ||
1867 | 1869 | ||
1868 | m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) | 1870 | m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) |
1869 | { | 1871 | { |
@@ -1872,6 +1874,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1872 | SendAppearanceToOtherAgent(scenePresence); | 1874 | SendAppearanceToOtherAgent(scenePresence); |
1873 | } | 1875 | } |
1874 | }); | 1876 | }); |
1877 | |||
1875 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); | 1878 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); |
1876 | } | 1879 | } |
1877 | 1880 | ||
@@ -1886,18 +1889,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
1886 | 1889 | ||
1887 | public void SetAppearance(byte[] texture, List<byte> visualParam) | 1890 | public void SetAppearance(byte[] texture, List<byte> visualParam) |
1888 | { | 1891 | { |
1889 | m_log.Info("[APPEARANCE]: Setting Appearance"); | 1892 | m_log.DebugFormat("[APPEARANCE]: Setting appearance for {0}", Name); |
1893 | |||
1890 | m_appearance.SetAppearance(texture, visualParam); | 1894 | m_appearance.SetAppearance(texture, visualParam); |
1891 | SetHeight(m_appearance.AvatarHeight); | 1895 | SetHeight(m_appearance.AvatarHeight); |
1892 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | 1896 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); |
1893 | 1897 | ||
1894 | SendAppearanceToAllOtherAgents(); | 1898 | SendAppearanceToAllOtherAgents(); |
1895 | SendOwnAppearance(); | 1899 | SendWearables(); |
1896 | } | 1900 | } |
1897 | 1901 | ||
1898 | public void SetWearable(int wearableId, AvatarWearable wearable) | 1902 | public void SetWearable(int wearableId, AvatarWearable wearable) |
1899 | { | 1903 | { |
1900 | m_log.Info("[APPEARANCE]: Setting Wearable"); | 1904 | m_log.DebugFormat("[APPEARANCE]: Setting wearable for {0}", Name); |
1905 | |||
1901 | m_appearance.SetWearable(wearableId, wearable); | 1906 | m_appearance.SetWearable(wearableId, wearable); |
1902 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | 1907 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); |
1903 | m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | 1908 | m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |