diff options
-rw-r--r-- | OpenSim/Framework/MapAndArray.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 64 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 89 | ||||
-rwxr-xr-x | bin/OpenMetaverse.Rendering.Meshmerizer.dll | bin | 24576 -> 24576 bytes | |||
-rwxr-xr-x | bin/OpenMetaverse.StructuredData.dll | bin | 106496 -> 106496 bytes | |||
-rwxr-xr-x | bin/OpenMetaverse.dll | bin | 2187264 -> 2191360 bytes | |||
-rwxr-xr-x | bin/OpenMetaverseTypes.dll | bin | 122880 -> 110592 bytes |
7 files changed, 96 insertions, 59 deletions
diff --git a/OpenSim/Framework/MapAndArray.cs b/OpenSim/Framework/MapAndArray.cs index 41874d0..e6b2800 100644 --- a/OpenSim/Framework/MapAndArray.cs +++ b/OpenSim/Framework/MapAndArray.cs | |||
@@ -173,6 +173,8 @@ namespace OpenSim.Framework | |||
173 | { | 173 | { |
174 | if (m_array == null) | 174 | if (m_array == null) |
175 | { | 175 | { |
176 | if(m_dict.Count == 0) | ||
177 | return new TValue[0]; | ||
176 | m_array = new TValue[m_dict.Count]; | 178 | m_array = new TValue[m_dict.Count]; |
177 | m_dict.Values.CopyTo(m_array, 0); | 179 | m_dict.Values.CopyTo(m_array, 0); |
178 | } | 180 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4ab0f15..13b3ffb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -248,11 +248,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
248 | 248 | ||
249 | public scriptEvents AggregateScriptEvents; | 249 | public scriptEvents AggregateScriptEvents; |
250 | 250 | ||
251 | public Vector3 AttachedPos | 251 | public Vector3 AttachedPos { get; set; } |
252 | { | ||
253 | get; | ||
254 | set; | ||
255 | } | ||
256 | 252 | ||
257 | // rotation locks on local X,Y and or Z axis bit flags | 253 | // rotation locks on local X,Y and or Z axis bit flags |
258 | // bits are as in llSetStatus defined in SceneObjectGroup.axisSelect enum | 254 | // bits are as in llSetStatus defined in SceneObjectGroup.axisSelect enum |
@@ -955,13 +951,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
955 | m_log.Error("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message); | 951 | m_log.Error("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message); |
956 | } | 952 | } |
957 | } | 953 | } |
958 | |||
959 | // float roll, pitch, yaw = 0; | ||
960 | // m_rotationOffset.GetEulerAngles(out roll, out pitch, out yaw); | ||
961 | // | ||
962 | // m_log.DebugFormat( | ||
963 | // "[SCENE OBJECT PART]: Set euler {0} for RotationOffset on {1} {2}", | ||
964 | // new Vector3(roll, pitch, yaw), Name, LocalId); | ||
965 | } | 954 | } |
966 | } | 955 | } |
967 | 956 | ||
@@ -2266,7 +2255,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2266 | dupe.KeyframeMotion = null; | 2255 | dupe.KeyframeMotion = null; |
2267 | dupe.PayPrice = (int[])PayPrice.Clone(); | 2256 | dupe.PayPrice = (int[])PayPrice.Clone(); |
2268 | 2257 | ||
2269 | dupe.DynAttrs.CopyFrom(DynAttrs); | 2258 | if(DynAttrs != null) |
2259 | dupe.DynAttrs.CopyFrom(DynAttrs); | ||
2270 | 2260 | ||
2271 | if (userExposed) | 2261 | if (userExposed) |
2272 | { | 2262 | { |
@@ -3834,7 +3824,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3834 | texcolor.A = clippedAlpha; | 3824 | texcolor.A = clippedAlpha; |
3835 | } | 3825 | } |
3836 | tex.FaceTextures[face].RGBA = texcolor; | 3826 | tex.FaceTextures[face].RGBA = texcolor; |
3837 | UpdateTextureEntry(tex.GetBytes()); | 3827 | UpdateTextureEntry(tex); |
3838 | return; | 3828 | return; |
3839 | } | 3829 | } |
3840 | else if (face == ALL_SIDES) | 3830 | else if (face == ALL_SIDES) |
@@ -3863,7 +3853,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3863 | } | 3853 | } |
3864 | tex.DefaultTexture.RGBA = texcolor; | 3854 | tex.DefaultTexture.RGBA = texcolor; |
3865 | } | 3855 | } |
3866 | UpdateTextureEntry(tex.GetBytes()); | 3856 | UpdateTextureEntry(tex); |
3867 | return; | 3857 | return; |
3868 | } | 3858 | } |
3869 | } | 3859 | } |
@@ -5178,15 +5168,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5178 | /// <param name="serializedTextureEntry"></param> | 5168 | /// <param name="serializedTextureEntry"></param> |
5179 | public void UpdateTextureEntry(byte[] serializedTextureEntry) | 5169 | public void UpdateTextureEntry(byte[] serializedTextureEntry) |
5180 | { | 5170 | { |
5181 | UpdateTextureEntry(new Primitive.TextureEntry(serializedTextureEntry, 0, serializedTextureEntry.Length)); | 5171 | Primitive.TextureEntry newTex = new Primitive.TextureEntry(serializedTextureEntry, 0, serializedTextureEntry.Length); |
5182 | } | ||
5183 | |||
5184 | /// <summary> | ||
5185 | /// Update the texture entry for this part. | ||
5186 | /// </summary> | ||
5187 | /// <param name="newTex"></param> | ||
5188 | public void UpdateTextureEntry(Primitive.TextureEntry newTex) | ||
5189 | { | ||
5190 | Primitive.TextureEntry oldTex = Shape.Textures; | 5172 | Primitive.TextureEntry oldTex = Shape.Textures; |
5191 | 5173 | ||
5192 | Changed changeFlags = 0; | 5174 | Changed changeFlags = 0; |
@@ -5215,7 +5197,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5215 | 5197 | ||
5216 | bool otherFieldsChanged = false; | 5198 | bool otherFieldsChanged = false; |
5217 | int nsides = GetNumberOfSides(); | 5199 | int nsides = GetNumberOfSides(); |
5218 | for (int i = 0 ; i < nsides; i++) | 5200 | for (int i = 0; i < nsides; i++) |
5219 | { | 5201 | { |
5220 | Primitive.TextureEntryFace newFace = defaultNewFace; | 5202 | Primitive.TextureEntryFace newFace = defaultNewFace; |
5221 | Primitive.TextureEntryFace oldFace = defaultOldFace; | 5203 | Primitive.TextureEntryFace oldFace = defaultOldFace; |
@@ -5253,7 +5235,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5253 | if (oldFace.Rotation != newFace.Rotation) otherFieldsChanged = true; | 5235 | if (oldFace.Rotation != newFace.Rotation) otherFieldsChanged = true; |
5254 | if (oldFace.Shiny != newFace.Shiny) otherFieldsChanged = true; | 5236 | if (oldFace.Shiny != newFace.Shiny) otherFieldsChanged = true; |
5255 | if (oldFace.TexMapType != newFace.TexMapType) otherFieldsChanged = true; | 5237 | if (oldFace.TexMapType != newFace.TexMapType) otherFieldsChanged = true; |
5256 | if(otherFieldsChanged) | 5238 | if (otherFieldsChanged) |
5257 | changeFlags |= Changed.TEXTURE; | 5239 | changeFlags |= Changed.TEXTURE; |
5258 | } | 5240 | } |
5259 | } | 5241 | } |
@@ -5264,6 +5246,36 @@ namespace OpenSim.Region.Framework.Scenes | |||
5264 | TriggerScriptChangedEvent(changeFlags); | 5246 | TriggerScriptChangedEvent(changeFlags); |
5265 | ParentGroup.HasGroupChanged = true; | 5247 | ParentGroup.HasGroupChanged = true; |
5266 | ScheduleFullUpdate(); | 5248 | ScheduleFullUpdate(); |
5249 | |||
5250 | } | ||
5251 | |||
5252 | /// <summary> | ||
5253 | /// Update the texture entry for this part. | ||
5254 | /// </summary> | ||
5255 | /// <param name="newTex"></param> | ||
5256 | public void UpdateTextureEntry(Primitive.TextureEntry newTex) | ||
5257 | { | ||
5258 | TextureAttributes dirty = newTex.GetDirtyFlags(32, true); | ||
5259 | dirty &= ~TextureAttributes.MaterialID; | ||
5260 | if(dirty == TextureAttributes.None) | ||
5261 | return; | ||
5262 | |||
5263 | Changed changeFlags = 0; | ||
5264 | if((dirty & TextureAttributes.RGBA) != 0) | ||
5265 | { | ||
5266 | changeFlags = Changed.COLOR; | ||
5267 | dirty &= ~TextureAttributes.RGBA; | ||
5268 | } | ||
5269 | if (dirty != TextureAttributes.None) | ||
5270 | changeFlags |= Changed.TEXTURE; | ||
5271 | |||
5272 | if (changeFlags == 0) | ||
5273 | return; | ||
5274 | |||
5275 | m_shape.TextureEntry = newTex.GetBytes(); | ||
5276 | TriggerScriptChangedEvent(changeFlags); | ||
5277 | ParentGroup.HasGroupChanged = true; | ||
5278 | ScheduleFullUpdate(); | ||
5267 | } | 5279 | } |
5268 | 5280 | ||
5269 | internal void UpdatePhysicsSubscribedEvents() | 5281 | internal void UpdatePhysicsSubscribedEvents() |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 22443a9..2969060 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1947,7 +1947,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1947 | texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); | 1947 | texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); |
1948 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); | 1948 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); |
1949 | tex.FaceTextures[face].RGBA = texcolor; | 1949 | tex.FaceTextures[face].RGBA = texcolor; |
1950 | part.UpdateTextureEntry(tex.GetBytes()); | 1950 | part.UpdateTextureEntry(tex); |
1951 | return; | 1951 | return; |
1952 | } | 1952 | } |
1953 | else if (face == ScriptBaseClass.ALL_SIDES) | 1953 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1968,7 +1968,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1968 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); | 1968 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); |
1969 | tex.DefaultTexture.RGBA = texcolor; | 1969 | tex.DefaultTexture.RGBA = texcolor; |
1970 | } | 1970 | } |
1971 | part.UpdateTextureEntry(tex.GetBytes()); | 1971 | part.UpdateTextureEntry(tex); |
1972 | return; | 1972 | return; |
1973 | } | 1973 | } |
1974 | 1974 | ||
@@ -2069,7 +2069,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2069 | { | 2069 | { |
2070 | tex.CreateFace((uint) face); | 2070 | tex.CreateFace((uint) face); |
2071 | tex.FaceTextures[face].TexMapType = textype; | 2071 | tex.FaceTextures[face].TexMapType = textype; |
2072 | part.UpdateTextureEntry(tex.GetBytes()); | 2072 | part.UpdateTextureEntry(tex); |
2073 | return; | 2073 | return; |
2074 | } | 2074 | } |
2075 | else if (face == ScriptBaseClass.ALL_SIDES) | 2075 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2080,9 +2080,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2080 | { | 2080 | { |
2081 | tex.FaceTextures[i].TexMapType = textype; | 2081 | tex.FaceTextures[i].TexMapType = textype; |
2082 | } | 2082 | } |
2083 | tex.DefaultTexture.TexMapType = textype; | ||
2084 | } | 2083 | } |
2085 | part.UpdateTextureEntry(tex.GetBytes()); | 2084 | tex.DefaultTexture.TexMapType = textype; |
2085 | part.UpdateTextureEntry(tex); | ||
2086 | return; | 2086 | return; |
2087 | } | 2087 | } |
2088 | } | 2088 | } |
@@ -2099,7 +2099,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2099 | { | 2099 | { |
2100 | tex.CreateFace((uint) face); | 2100 | tex.CreateFace((uint) face); |
2101 | tex.FaceTextures[face].Glow = glow; | 2101 | tex.FaceTextures[face].Glow = glow; |
2102 | part.UpdateTextureEntry(tex.GetBytes()); | 2102 | part.UpdateTextureEntry(tex); |
2103 | return; | 2103 | return; |
2104 | } | 2104 | } |
2105 | else if (face == ScriptBaseClass.ALL_SIDES) | 2105 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2110,9 +2110,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2110 | { | 2110 | { |
2111 | tex.FaceTextures[i].Glow = glow; | 2111 | tex.FaceTextures[i].Glow = glow; |
2112 | } | 2112 | } |
2113 | tex.DefaultTexture.Glow = glow; | ||
2114 | } | 2113 | } |
2115 | part.UpdateTextureEntry(tex.GetBytes()); | 2114 | tex.DefaultTexture.Glow = glow; |
2115 | part.UpdateTextureEntry(tex); | ||
2116 | return; | 2116 | return; |
2117 | } | 2117 | } |
2118 | } | 2118 | } |
@@ -2151,7 +2151,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2151 | tex.CreateFace((uint) face); | 2151 | tex.CreateFace((uint) face); |
2152 | tex.FaceTextures[face].Shiny = sval; | 2152 | tex.FaceTextures[face].Shiny = sval; |
2153 | tex.FaceTextures[face].Bump = bump; | 2153 | tex.FaceTextures[face].Bump = bump; |
2154 | part.UpdateTextureEntry(tex.GetBytes()); | 2154 | part.UpdateTextureEntry(tex); |
2155 | return; | 2155 | return; |
2156 | } | 2156 | } |
2157 | else if (face == ScriptBaseClass.ALL_SIDES) | 2157 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2163,10 +2163,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2163 | tex.FaceTextures[i].Shiny = sval; | 2163 | tex.FaceTextures[i].Shiny = sval; |
2164 | tex.FaceTextures[i].Bump = bump; | 2164 | tex.FaceTextures[i].Bump = bump; |
2165 | } | 2165 | } |
2166 | tex.DefaultTexture.Shiny = sval; | ||
2167 | tex.DefaultTexture.Bump = bump; | ||
2168 | } | 2166 | } |
2169 | part.UpdateTextureEntry(tex.GetBytes()); | 2167 | tex.DefaultTexture.Shiny = sval; |
2168 | tex.DefaultTexture.Bump = bump; | ||
2169 | part.UpdateTextureEntry(tex); | ||
2170 | return; | 2170 | return; |
2171 | } | 2171 | } |
2172 | } | 2172 | } |
@@ -2182,7 +2182,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2182 | { | 2182 | { |
2183 | tex.CreateFace((uint) face); | 2183 | tex.CreateFace((uint) face); |
2184 | tex.FaceTextures[face].Fullbright = bright; | 2184 | tex.FaceTextures[face].Fullbright = bright; |
2185 | part.UpdateTextureEntry(tex.GetBytes()); | 2185 | part.UpdateTextureEntry(tex); |
2186 | return; | 2186 | return; |
2187 | } | 2187 | } |
2188 | else if (face == ScriptBaseClass.ALL_SIDES) | 2188 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2195,7 +2195,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2195 | } | 2195 | } |
2196 | } | 2196 | } |
2197 | tex.DefaultTexture.Fullbright = bright; | 2197 | tex.DefaultTexture.Fullbright = bright; |
2198 | part.UpdateTextureEntry(tex.GetBytes()); | 2198 | part.UpdateTextureEntry(tex); |
2199 | return; | 2199 | return; |
2200 | } | 2200 | } |
2201 | } | 2201 | } |
@@ -2263,7 +2263,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2263 | texcolor = tex.CreateFace((uint)face).RGBA; | 2263 | texcolor = tex.CreateFace((uint)face).RGBA; |
2264 | texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); | 2264 | texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); |
2265 | tex.FaceTextures[face].RGBA = texcolor; | 2265 | tex.FaceTextures[face].RGBA = texcolor; |
2266 | part.UpdateTextureEntry(tex.GetBytes()); | 2266 | part.UpdateTextureEntry(tex); |
2267 | return; | 2267 | return; |
2268 | } | 2268 | } |
2269 | else if (face == ScriptBaseClass.ALL_SIDES) | 2269 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2287,7 +2287,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2287 | tex.DefaultTexture.RGBA = texcolor; | 2287 | tex.DefaultTexture.RGBA = texcolor; |
2288 | } | 2288 | } |
2289 | 2289 | ||
2290 | part.UpdateTextureEntry(tex.GetBytes()); | 2290 | part.UpdateTextureEntry(tex); |
2291 | return; | 2291 | return; |
2292 | } | 2292 | } |
2293 | } | 2293 | } |
@@ -2464,7 +2464,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2464 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); | 2464 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); |
2465 | texface.TextureID = textureID; | 2465 | texface.TextureID = textureID; |
2466 | tex.FaceTextures[face] = texface; | 2466 | tex.FaceTextures[face] = texface; |
2467 | part.UpdateTextureEntry(tex.GetBytes()); | 2467 | part.UpdateTextureEntry(tex); |
2468 | return; | 2468 | return; |
2469 | } | 2469 | } |
2470 | else if (face == ScriptBaseClass.ALL_SIDES) | 2470 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2477,7 +2477,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2477 | } | 2477 | } |
2478 | } | 2478 | } |
2479 | tex.DefaultTexture.TextureID = textureID; | 2479 | tex.DefaultTexture.TextureID = textureID; |
2480 | part.UpdateTextureEntry(tex.GetBytes()); | 2480 | part.UpdateTextureEntry(tex); |
2481 | return; | 2481 | return; |
2482 | } | 2482 | } |
2483 | } | 2483 | } |
@@ -2504,7 +2504,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2504 | texface.RepeatU = (float)u; | 2504 | texface.RepeatU = (float)u; |
2505 | texface.RepeatV = (float)v; | 2505 | texface.RepeatV = (float)v; |
2506 | tex.FaceTextures[face] = texface; | 2506 | tex.FaceTextures[face] = texface; |
2507 | part.UpdateTextureEntry(tex.GetBytes()); | 2507 | part.UpdateTextureEntry(tex); |
2508 | return; | 2508 | return; |
2509 | } | 2509 | } |
2510 | if (face == ScriptBaseClass.ALL_SIDES) | 2510 | if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2519,7 +2519,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2519 | } | 2519 | } |
2520 | tex.DefaultTexture.RepeatU = (float)u; | 2520 | tex.DefaultTexture.RepeatU = (float)u; |
2521 | tex.DefaultTexture.RepeatV = (float)v; | 2521 | tex.DefaultTexture.RepeatV = (float)v; |
2522 | part.UpdateTextureEntry(tex.GetBytes()); | 2522 | part.UpdateTextureEntry(tex); |
2523 | return; | 2523 | return; |
2524 | } | 2524 | } |
2525 | } | 2525 | } |
@@ -2545,7 +2545,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2545 | texface.OffsetU = (float)u; | 2545 | texface.OffsetU = (float)u; |
2546 | texface.OffsetV = (float)v; | 2546 | texface.OffsetV = (float)v; |
2547 | tex.FaceTextures[face] = texface; | 2547 | tex.FaceTextures[face] = texface; |
2548 | part.UpdateTextureEntry(tex.GetBytes()); | 2548 | part.UpdateTextureEntry(tex); |
2549 | return; | 2549 | return; |
2550 | } | 2550 | } |
2551 | if (face == ScriptBaseClass.ALL_SIDES) | 2551 | if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2560,7 +2560,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2560 | } | 2560 | } |
2561 | tex.DefaultTexture.OffsetU = (float)u; | 2561 | tex.DefaultTexture.OffsetU = (float)u; |
2562 | tex.DefaultTexture.OffsetV = (float)v; | 2562 | tex.DefaultTexture.OffsetV = (float)v; |
2563 | part.UpdateTextureEntry(tex.GetBytes()); | 2563 | part.UpdateTextureEntry(tex); |
2564 | return; | 2564 | return; |
2565 | } | 2565 | } |
2566 | } | 2566 | } |
@@ -2585,7 +2585,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2585 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); | 2585 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); |
2586 | texface.Rotation = (float)rotation; | 2586 | texface.Rotation = (float)rotation; |
2587 | tex.FaceTextures[face] = texface; | 2587 | tex.FaceTextures[face] = texface; |
2588 | part.UpdateTextureEntry(tex.GetBytes()); | 2588 | part.UpdateTextureEntry(tex); |
2589 | return; | 2589 | return; |
2590 | } | 2590 | } |
2591 | if (face == ScriptBaseClass.ALL_SIDES) | 2591 | if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2598,7 +2598,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2598 | } | 2598 | } |
2599 | } | 2599 | } |
2600 | tex.DefaultTexture.Rotation = (float)rotation; | 2600 | tex.DefaultTexture.Rotation = (float)rotation; |
2601 | part.UpdateTextureEntry(tex.GetBytes()); | 2601 | part.UpdateTextureEntry(tex); |
2602 | return; | 2602 | return; |
2603 | } | 2603 | } |
2604 | } | 2604 | } |
@@ -13110,6 +13110,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13110 | ParcelMediaCommandEnum? commandToSend = null; | 13110 | ParcelMediaCommandEnum? commandToSend = null; |
13111 | float time = 0.0f; // default is from start | 13111 | float time = 0.0f; // default is from start |
13112 | 13112 | ||
13113 | uint cmndFlags = 0; | ||
13113 | ScenePresence presence = null; | 13114 | ScenePresence presence = null; |
13114 | int cmd; | 13115 | int cmd; |
13115 | for (int i = 0; i < commandList.Data.Length; i++) | 13116 | for (int i = 0; i < commandList.Data.Length; i++) |
@@ -13142,19 +13143,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13142 | 13143 | ||
13143 | case ParcelMediaCommandEnum.Loop: | 13144 | case ParcelMediaCommandEnum.Loop: |
13144 | loop = 1; | 13145 | loop = 1; |
13146 | cmndFlags |= (1 << ScriptBaseClass.PARCEL_MEDIA_COMMAND_LOOP); | ||
13145 | commandToSend = command; | 13147 | commandToSend = command; |
13146 | update = true; //need to send the media update packet to set looping | 13148 | update = true; //need to send the media update packet to set looping |
13147 | break; | 13149 | break; |
13148 | 13150 | ||
13149 | case ParcelMediaCommandEnum.Play: | 13151 | case ParcelMediaCommandEnum.Play: |
13150 | loop = 0; | 13152 | loop = 0; |
13153 | cmndFlags |= (1 << ScriptBaseClass.PARCEL_MEDIA_COMMAND_PLAY); | ||
13151 | commandToSend = command; | 13154 | commandToSend = command; |
13152 | update = true; //need to send the media update packet to make sure it doesn't loop | 13155 | update = true; //need to send the media update packet to make sure it doesn't loop |
13153 | break; | 13156 | break; |
13154 | 13157 | ||
13155 | case ParcelMediaCommandEnum.Pause: | 13158 | case ParcelMediaCommandEnum.Pause: |
13159 | cmndFlags |= (1 << ScriptBaseClass.PARCEL_MEDIA_COMMAND_PAUSE); | ||
13160 | commandToSend = command; | ||
13161 | break; | ||
13156 | case ParcelMediaCommandEnum.Stop: | 13162 | case ParcelMediaCommandEnum.Stop: |
13163 | cmndFlags |= (1 << ScriptBaseClass.PARCEL_MEDIA_COMMAND_STOP); | ||
13164 | commandToSend = command; | ||
13165 | break; | ||
13157 | case ParcelMediaCommandEnum.Unload: | 13166 | case ParcelMediaCommandEnum.Unload: |
13167 | cmndFlags |= (1 << ScriptBaseClass.PARCEL_MEDIA_COMMAND_UNLOAD); | ||
13158 | commandToSend = command; | 13168 | commandToSend = command; |
13159 | break; | 13169 | break; |
13160 | 13170 | ||
@@ -13190,6 +13200,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13190 | if (commandList.Data[i + 1] is LSL_Float) | 13200 | if (commandList.Data[i + 1] is LSL_Float) |
13191 | { | 13201 | { |
13192 | time = (float)(LSL_Float)commandList.Data[i + 1]; | 13202 | time = (float)(LSL_Float)commandList.Data[i + 1]; |
13203 | cmndFlags |= (1 << ScriptBaseClass.PARCEL_MEDIA_COMMAND_TIME); | ||
13193 | } | 13204 | } |
13194 | else Error("llParcelMediaCommandList", "The argument of PARCEL_MEDIA_COMMAND_TIME must be a float"); | 13205 | else Error("llParcelMediaCommandList", "The argument of PARCEL_MEDIA_COMMAND_TIME must be a float"); |
13195 | ++i; | 13206 | ++i; |
@@ -13316,14 +13327,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13316 | { | 13327 | { |
13317 | if (sp.currentParcelUUID == landData.GlobalID) | 13328 | if (sp.currentParcelUUID == landData.GlobalID) |
13318 | { | 13329 | { |
13319 | sp.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this? | 13330 | sp.ControllingClient.SendParcelMediaCommand(cmndFlags, |
13320 | commandToSend.Value, time); | 13331 | commandToSend.Value, time); |
13321 | } | 13332 | } |
13322 | }); | 13333 | }); |
13323 | } | 13334 | } |
13324 | else if (!presence.IsChildAgent) | 13335 | else if (!presence.IsChildAgent) |
13325 | { | 13336 | { |
13326 | presence.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this? | 13337 | presence.ControllingClient.SendParcelMediaCommand(cmndFlags, |
13327 | commandToSend.Value, time); | 13338 | commandToSend.Value, time); |
13328 | } | 13339 | } |
13329 | } | 13340 | } |
@@ -13334,6 +13345,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13334 | { | 13345 | { |
13335 | m_host.AddScriptLPS(1); | 13346 | m_host.AddScriptLPS(1); |
13336 | LSL_List list = new LSL_List(); | 13347 | LSL_List list = new LSL_List(); |
13348 | Vector3 pos = m_host.AbsolutePosition; | ||
13349 | |||
13350 | ILandObject landObject = World.LandChannel.GetLandObject(pos); | ||
13351 | if(landObject == null) | ||
13352 | return list; | ||
13353 | |||
13354 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia, false)) | ||
13355 | return list; | ||
13356 | |||
13357 | LandData land = landObject.LandData; | ||
13358 | if(land == null) | ||
13359 | return list; | ||
13360 | |||
13337 | //TO DO: make the implementation for the missing commands | 13361 | //TO DO: make the implementation for the missing commands |
13338 | //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) | 13362 | //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) |
13339 | for (int i = 0; i < aList.Data.Length; i++) | 13363 | for (int i = 0; i < aList.Data.Length; i++) |
@@ -13344,27 +13368,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13344 | switch ((ParcelMediaCommandEnum) Convert.ToInt32(aList.Data[i].ToString())) | 13368 | switch ((ParcelMediaCommandEnum) Convert.ToInt32(aList.Data[i].ToString())) |
13345 | { | 13369 | { |
13346 | case ParcelMediaCommandEnum.Url: | 13370 | case ParcelMediaCommandEnum.Url: |
13347 | list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaURL)); | 13371 | list.Add(new LSL_String(land.MediaURL)); |
13348 | break; | 13372 | break; |
13349 | case ParcelMediaCommandEnum.Desc: | 13373 | case ParcelMediaCommandEnum.Desc: |
13350 | list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).Description)); | 13374 | list.Add(new LSL_String(land.MediaDescription)); |
13351 | break; | 13375 | break; |
13352 | case ParcelMediaCommandEnum.Texture: | 13376 | case ParcelMediaCommandEnum.Texture: |
13353 | list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaID.ToString())); | 13377 | list.Add(new LSL_String(land.MediaID.ToString())); |
13354 | break; | 13378 | break; |
13355 | case ParcelMediaCommandEnum.Type: | 13379 | case ParcelMediaCommandEnum.Type: |
13356 | list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaType)); | 13380 | list.Add(new LSL_String(land.MediaType)); |
13357 | break; | 13381 | break; |
13358 | case ParcelMediaCommandEnum.Size: | 13382 | case ParcelMediaCommandEnum.Size: |
13359 | list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaWidth)); | 13383 | list.Add(new LSL_String(land.MediaWidth)); |
13360 | list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaHeight)); | 13384 | list.Add(new LSL_String(land.MediaHeight)); |
13361 | break; | 13385 | break; |
13362 | default: | 13386 | default: |
13363 | ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url; | 13387 | ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url; |
13364 | NotImplemented("llParcelMediaQuery", "Parameter not supported yet: " + Enum.Parse(mediaCommandEnum.GetType() , aList.Data[i].ToString()).ToString()); | 13388 | NotImplemented("llParcelMediaQuery", "Parameter not supported yet: " + Enum.Parse(mediaCommandEnum.GetType() , aList.Data[i].ToString()).ToString()); |
13365 | break; | 13389 | break; |
13366 | } | 13390 | } |
13367 | |||
13368 | } | 13391 | } |
13369 | } | 13392 | } |
13370 | ScriptSleep(m_sleepMsOnParcelMediaQuery); | 13393 | ScriptSleep(m_sleepMsOnParcelMediaQuery); |
diff --git a/bin/OpenMetaverse.Rendering.Meshmerizer.dll b/bin/OpenMetaverse.Rendering.Meshmerizer.dll index ae79057..d416048 100755 --- a/bin/OpenMetaverse.Rendering.Meshmerizer.dll +++ b/bin/OpenMetaverse.Rendering.Meshmerizer.dll | |||
Binary files differ | |||
diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll index ff7b4f6..8131e5c 100755 --- a/bin/OpenMetaverse.StructuredData.dll +++ b/bin/OpenMetaverse.StructuredData.dll | |||
Binary files differ | |||
diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index e39a4d4..44bd2ad 100755 --- a/bin/OpenMetaverse.dll +++ b/bin/OpenMetaverse.dll | |||
Binary files differ | |||
diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll index ca1017b..2c3e778 100755 --- a/bin/OpenMetaverseTypes.dll +++ b/bin/OpenMetaverseTypes.dll | |||
Binary files differ | |||