diff options
author | Melanie Thielker | 2014-08-11 02:07:23 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-08-11 02:08:17 +0200 |
commit | 036017bba7195d052efa9eb4d289c87cd38515e0 (patch) | |
tree | 47a2591ae324f0a3affc7bd2bb8ddb7cce785539 /OpenSim/Region/Framework | |
parent | LSL llListFindList fix: check types as well as content. Items must be same type (diff) | |
download | opensim-SC-036017bba7195d052efa9eb4d289c87cd38515e0.zip opensim-SC-036017bba7195d052efa9eb4d289c87cd38515e0.tar.gz opensim-SC-036017bba7195d052efa9eb4d289c87cd38515e0.tar.bz2 opensim-SC-036017bba7195d052efa9eb4d289c87cd38515e0.tar.xz |
Make texture anims work right on singu
Diffstat (limited to 'OpenSim/Region/Framework')
-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) |