diff options
author | Melanie Thielker | 2014-08-11 02:07:23 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-08-11 02:07:23 +0200 |
commit | 01e381fa33a7bd8ca9141a73f8dca0ff7832aaca (patch) | |
tree | 5c1d91a46187a713a9784f564437993dc6fe8e04 /OpenSim | |
parent | LSL llListFindList fix: check types as well as content. Items must be same type (diff) | |
download | opensim-SC_OLD-01e381fa33a7bd8ca9141a73f8dca0ff7832aaca.zip opensim-SC_OLD-01e381fa33a7bd8ca9141a73f8dca0ff7832aaca.tar.gz opensim-SC_OLD-01e381fa33a7bd8ca9141a73f8dca0ff7832aaca.tar.bz2 opensim-SC_OLD-01e381fa33a7bd8ca9141a73f8dca0ff7832aaca.tar.xz |
Make texture anims work right on singu
Diffstat (limited to 'OpenSim')
-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 055473d..a292c79 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1878,22 +1878,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
1878 | 1878 | ||
1879 | public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) | 1879 | public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) |
1880 | { | 1880 | { |
1881 | byte[] data = new byte[16]; | 1881 | if (((int)pTexAnim.Flags & 1) == 0) // ANIM_ON |
1882 | int pos = 0; | 1882 | { |
1883 | byte[] data = new byte[16]; | ||
1884 | int pos = 0; | ||
1883 | 1885 | ||
1884 | // The flags don't like conversion from uint to byte, so we have to do | 1886 | // The flags don't like conversion from uint to byte, so we have to do |
1885 | // it the crappy way. See the above function :( | 1887 | // it the crappy way. See the above function :( |
1886 | 1888 | ||
1887 | data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++; | 1889 | data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++; |
1888 | data[pos] = (byte)pTexAnim.Face; pos++; | 1890 | data[pos] = (byte)pTexAnim.Face; pos++; |
1889 | data[pos] = (byte)pTexAnim.SizeX; pos++; | 1891 | data[pos] = (byte)pTexAnim.SizeX; pos++; |
1890 | data[pos] = (byte)pTexAnim.SizeY; pos++; | 1892 | data[pos] = (byte)pTexAnim.SizeY; pos++; |
1891 | 1893 | ||
1892 | Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); | 1894 | Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); |
1893 | Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); | 1895 | Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); |
1894 | Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); | 1896 | Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); |
1895 | 1897 | ||
1896 | m_TextureAnimation = data; | 1898 | m_TextureAnimation = data; |
1899 | } | ||
1900 | else | ||
1901 | { | ||
1902 | m_TextureAnimation = Utils.EmptyBytes; | ||
1903 | } | ||
1897 | } | 1904 | } |
1898 | 1905 | ||
1899 | public void AdjustSoundGain(double volume) | 1906 | public void AdjustSoundGain(double volume) |