From 01e381fa33a7bd8ca9141a73f8dca0ff7832aaca Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 11 Aug 2014 02:07:23 +0200 Subject: Make texture anims work right on singu --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 31 +++++++++++++--------- 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') 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 public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) { - byte[] data = new byte[16]; - int pos = 0; + if (((int)pTexAnim.Flags & 1) == 0) // ANIM_ON + { + byte[] data = new byte[16]; + int pos = 0; - // The flags don't like conversion from uint to byte, so we have to do - // it the crappy way. See the above function :( + // The flags don't like conversion from uint to byte, so we have to do + // it the crappy way. See the above function :( - data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++; - data[pos] = (byte)pTexAnim.Face; pos++; - data[pos] = (byte)pTexAnim.SizeX; pos++; - data[pos] = (byte)pTexAnim.SizeY; pos++; + data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++; + data[pos] = (byte)pTexAnim.Face; pos++; + data[pos] = (byte)pTexAnim.SizeX; pos++; + data[pos] = (byte)pTexAnim.SizeY; pos++; - Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); - Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); - Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); + Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); + Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); + Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); - m_TextureAnimation = data; + m_TextureAnimation = data; + } + else + { + m_TextureAnimation = Utils.EmptyBytes; + } } public void AdjustSoundGain(double volume) -- cgit v1.1