diff options
author | Melanie | 2013-01-06 10:52:22 +0000 |
---|---|---|
committer | Melanie | 2013-01-06 10:52:22 +0000 |
commit | 083ac92b344262ae72516ba05cc93cdcd2f2a454 (patch) | |
tree | 1992de8e08171aac3e811fb1d43abc6ad8b894af /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | bug fix, cleanup... (diff) | |
download | opensim-SC_OLD-083ac92b344262ae72516ba05cc93cdcd2f2a454.zip opensim-SC_OLD-083ac92b344262ae72516ba05cc93cdcd2f2a454.tar.gz opensim-SC_OLD-083ac92b344262ae72516ba05cc93cdcd2f2a454.tar.bz2 opensim-SC_OLD-083ac92b344262ae72516ba05cc93cdcd2f2a454.tar.xz |
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules')
3 files changed, 40 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 3532b1d..3080023 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -140,18 +140,18 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
140 | /// <param name="sp"></param> | 140 | /// <param name="sp"></param> |
141 | /// <param name="texture"></param> | 141 | /// <param name="texture"></param> |
142 | /// <param name="visualParam"></param> | 142 | /// <param name="visualParam"></param> |
143 | public void SetAppearance(IScenePresence sp, AvatarAppearance appearance) | 143 | public void SetAppearance(IScenePresence sp, AvatarAppearance appearance, WearableCacheItem[] cacheItems) |
144 | { | 144 | { |
145 | SetAppearance(sp, appearance.Texture, appearance.VisualParams); | 145 | SetAppearance(sp, appearance.Texture, appearance.VisualParams, cacheItems); |
146 | } | 146 | } |
147 | 147 | ||
148 | 148 | ||
149 | public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize) | 149 | public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize, WearableCacheItem[] cacheItems) |
150 | { | 150 | { |
151 | float oldoff = sp.Appearance.AvatarFeetOffset; | 151 | float oldoff = sp.Appearance.AvatarFeetOffset; |
152 | Vector3 oldbox = sp.Appearance.AvatarBoxSize; | 152 | Vector3 oldbox = sp.Appearance.AvatarBoxSize; |
153 | 153 | ||
154 | SetAppearance(sp, textureEntry, visualParams); | 154 | SetAppearance(sp, textureEntry, visualParams, cacheItems); |
155 | sp.Appearance.SetSize(avSize); | 155 | sp.Appearance.SetSize(avSize); |
156 | 156 | ||
157 | float off = sp.Appearance.AvatarFeetOffset; | 157 | float off = sp.Appearance.AvatarFeetOffset; |
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
166 | /// <param name="sp"></param> | 166 | /// <param name="sp"></param> |
167 | /// <param name="texture"></param> | 167 | /// <param name="texture"></param> |
168 | /// <param name="visualParam"></param> | 168 | /// <param name="visualParam"></param> |
169 | public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams) | 169 | public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams, WearableCacheItem[] cacheItems) |
170 | { | 170 | { |
171 | // m_log.DebugFormat( | 171 | // m_log.DebugFormat( |
172 | // "[AVFACTORY]: start SetAppearance for {0}, te {1}, visualParams {2}", | 172 | // "[AVFACTORY]: start SetAppearance for {0}, te {1}, visualParams {2}", |
@@ -205,11 +205,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
205 | // ((ScenePresence)sp).SetSize(box,off); | 205 | // ((ScenePresence)sp).SetSize(box,off); |
206 | 206 | ||
207 | } | 207 | } |
208 | 208 | //if (cacheItems.Length > 0) | |
209 | //{ | ||
210 | sp.Appearance.WearableCacheItems = cacheItems; | ||
211 | //} | ||
209 | // Process the baked texture array | 212 | // Process the baked texture array |
210 | if (textureEntry != null) | 213 | if (textureEntry != null) |
211 | { | 214 | { |
212 | // m_log.DebugFormat("[AVFACTORY]: Received texture update for {0} {1}", sp.Name, sp.UUID); | 215 | m_log.DebugFormat("[AVFACTORY]: Received texture update for {0} {1}", sp.Name, sp.UUID); |
213 | 216 | ||
214 | // WriteBakedTexturesReport(sp, m_log.DebugFormat); | 217 | // WriteBakedTexturesReport(sp, m_log.DebugFormat); |
215 | 218 | ||
@@ -278,6 +281,19 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
278 | return GetBakedTextureFaces(sp); | 281 | return GetBakedTextureFaces(sp); |
279 | } | 282 | } |
280 | 283 | ||
284 | public WearableCacheItem[] GetCachedItems(UUID agentId) | ||
285 | { | ||
286 | ScenePresence sp = m_scene.GetScenePresence(agentId); | ||
287 | Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = GetBakedTextureFaces(sp); | ||
288 | |||
289 | WearableCacheItem[] items = sp.Appearance.WearableCacheItems; | ||
290 | //foreach (WearableCacheItem item in items) | ||
291 | //{ | ||
292 | |||
293 | //} | ||
294 | return items; | ||
295 | } | ||
296 | |||
281 | public bool SaveBakedTextures(UUID agentId) | 297 | public bool SaveBakedTextures(UUID agentId) |
282 | { | 298 | { |
283 | ScenePresence sp = m_scene.GetScenePresence(agentId); | 299 | ScenePresence sp = m_scene.GetScenePresence(agentId); |
@@ -660,12 +676,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
660 | /// <param name="client"></param> | 676 | /// <param name="client"></param> |
661 | /// <param name="texture"></param> | 677 | /// <param name="texture"></param> |
662 | /// <param name="visualParam"></param> | 678 | /// <param name="visualParam"></param> |
663 | private void Client_OnSetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize) | 679 | private void Client_OnSetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize, WearableCacheItem[] cacheItems) |
664 | { | 680 | { |
665 | // m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance called for {0} ({1})", client.Name, client.AgentId); | 681 | // m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance called for {0} ({1})", client.Name, client.AgentId); |
666 | ScenePresence sp = m_scene.GetScenePresence(client.AgentId); | 682 | ScenePresence sp = m_scene.GetScenePresence(client.AgentId); |
667 | if (sp != null) | 683 | if (sp != null) |
668 | SetAppearance(sp, textureEntry, visualParams,avSize); | 684 | SetAppearance(sp, textureEntry, visualParams,avSize, cacheItems); |
669 | else | 685 | else |
670 | m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance unable to find presence for {0}", client.AgentId); | 686 | m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance unable to find presence for {0}", client.AgentId); |
671 | } | 687 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs index 1830d41..f090e15 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
61 | for (byte i = 0; i < visualParams.Length; i++) | 61 | for (byte i = 0; i < visualParams.Length; i++) |
62 | visualParams[i] = i; | 62 | visualParams[i] = i; |
63 | 63 | ||
64 | afm.SetAppearance(sp, new Primitive.TextureEntry(TestHelpers.ParseTail(0x10)), visualParams); | 64 | afm.SetAppearance(sp, new Primitive.TextureEntry(TestHelpers.ParseTail(0x10)), visualParams, new WearableCacheItem[0]); |
65 | 65 | ||
66 | // TODO: Check baked texture | 66 | // TODO: Check baked texture |
67 | Assert.AreEqual(visualParams, sp.Appearance.VisualParams); | 67 | Assert.AreEqual(visualParams, sp.Appearance.VisualParams); |
@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
102 | Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex); | 102 | Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex); |
103 | eyesFace.TextureID = eyesTextureId; | 103 | eyesFace.TextureID = eyesTextureId; |
104 | 104 | ||
105 | afm.SetAppearance(sp, bakedTextureEntry, visualParams); | 105 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, new WearableCacheItem[0]); |
106 | afm.SaveBakedTextures(userId); | 106 | afm.SaveBakedTextures(userId); |
107 | // Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = afm.GetBakedTextureFaces(userId); | 107 | // Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = afm.GetBakedTextureFaces(userId); |
108 | 108 | ||
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 8ddff99..07d00c0 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -442,6 +442,19 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
442 | return false; | 442 | return false; |
443 | } | 443 | } |
444 | 444 | ||
445 | public bool CanBeOnThisLand(UUID avatar, float posHeight) | ||
446 | { | ||
447 | if (posHeight < LandChannel.BAN_LINE_SAFETY_HIEGHT && IsBannedFromLand(avatar)) | ||
448 | { | ||
449 | return false; | ||
450 | } | ||
451 | else if (IsRestrictedFromLand(avatar)) | ||
452 | { | ||
453 | return false; | ||
454 | } | ||
455 | return true; | ||
456 | } | ||
457 | |||
445 | public bool HasGroupAccess(UUID avatar) | 458 | public bool HasGroupAccess(UUID avatar) |
446 | { | 459 | { |
447 | if (LandData.GroupID != UUID.Zero && (LandData.Flags & (uint)ParcelFlags.UseAccessGroup) == (uint)ParcelFlags.UseAccessGroup) | 460 | if (LandData.GroupID != UUID.Zero && (LandData.Flags & (uint)ParcelFlags.UseAccessGroup) == (uint)ParcelFlags.UseAccessGroup) |