diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 261e958..a3c60ea 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1880,22 +1880,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
1880 | 1880 | ||
1881 | public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) | 1881 | public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) |
1882 | { | 1882 | { |
1883 | byte[] data = new byte[16]; | 1883 | if (((int)pTexAnim.Flags & 1) == 0) // ANIM_ON |
1884 | int pos = 0; | 1884 | { |
1885 | byte[] data = new byte[16]; | ||
1886 | int pos = 0; | ||
1885 | 1887 | ||
1886 | // The flags don't like conversion from uint to byte, so we have to do | 1888 | // The flags don't like conversion from uint to byte, so we have to do |
1887 | // it the crappy way. See the above function :( | 1889 | // it the crappy way. See the above function :( |
1888 | 1890 | ||
1889 | data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++; | 1891 | data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++; |
1890 | data[pos] = (byte)pTexAnim.Face; pos++; | 1892 | data[pos] = (byte)pTexAnim.Face; pos++; |
1891 | data[pos] = (byte)pTexAnim.SizeX; pos++; | 1893 | data[pos] = (byte)pTexAnim.SizeX; pos++; |
1892 | data[pos] = (byte)pTexAnim.SizeY; pos++; | 1894 | data[pos] = (byte)pTexAnim.SizeY; pos++; |
1893 | 1895 | ||
1894 | Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); | 1896 | Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); |
1895 | Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); | 1897 | Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); |
1896 | Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); | 1898 | Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); |
1897 | 1899 | ||
1898 | m_TextureAnimation = data; | 1900 | m_TextureAnimation = data; |
1901 | } | ||
1902 | else | ||
1903 | { | ||
1904 | m_TextureAnimation = Utils.EmptyBytes; | ||
1905 | } | ||
1899 | } | 1906 | } |
1900 | 1907 | ||
1901 | public void AdjustSoundGain(double volume) | 1908 | public void AdjustSoundGain(double volume) |