diff options
author | UbitUmarov | 2015-11-15 10:04:35 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-15 10:04:35 +0000 |
commit | 53e0cd55342295f8c4639e07420378c2b4a5c3cf (patch) | |
tree | b889d22d2e96e43a66385cfc7121430723c6f278 /OpenSim | |
parent | That didn't actually do anything for Simian, and it broke the locahost (diff) | |
download | opensim-SC-53e0cd55342295f8c4639e07420378c2b4a5c3cf.zip opensim-SC-53e0cd55342295f8c4639e07420378c2b4a5c3cf.tar.gz opensim-SC-53e0cd55342295f8c4639e07420378c2b4a5c3cf.tar.bz2 opensim-SC-53e0cd55342295f8c4639e07420378c2b4a5c3cf.tar.xz |
handle diferente number of wearables on getting assets form another appearance
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index cabba8b..07c739d 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -251,9 +251,17 @@ namespace OpenSim.Framework | |||
251 | 251 | ||
252 | public void GetAssetsFrom(AvatarAppearance app) | 252 | public void GetAssetsFrom(AvatarAppearance app) |
253 | { | 253 | { |
254 | for (int i = 0; i < m_wearables.Length; i++) | 254 | int len = m_wearables.Length; |
255 | if(len > app.m_wearables.Length) | ||
256 | len = app.m_wearables.Length; | ||
257 | |||
258 | for (int i = 0; i < len; i++) | ||
255 | { | 259 | { |
256 | for (int j = 0; j < m_wearables[i].Count; j++) | 260 | int count = m_wearables[i].Count; |
261 | if(count > app.m_wearables[i].Count) | ||
262 | count = app.m_wearables[i].Count; | ||
263 | |||
264 | for (int j = 0; j < count; j++) | ||
257 | { | 265 | { |
258 | UUID itemID = m_wearables[i][j].ItemID; | 266 | UUID itemID = m_wearables[i][j].ItemID; |
259 | UUID assetID = app.Wearables[i].GetAsset(itemID); | 267 | UUID assetID = app.Wearables[i].GetAsset(itemID); |