aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-09-12 00:34:39 +0100
committerJustin Clark-Casey (justincc)2014-09-12 00:34:39 +0100
commit70953dbfcdf70b24fb939252775fa5e2a7ac2316 (patch)
tree827babb93b90336776868be1046d8cc392ac50d5 /OpenSim/Region
parentFix regression from recent a02dae5 where stand positions are no longer correc... (diff)
downloadopensim-SC-70953dbfcdf70b24fb939252775fa5e2a7ac2316.zip
opensim-SC-70953dbfcdf70b24fb939252775fa5e2a7ac2316.tar.gz
opensim-SC-70953dbfcdf70b24fb939252775fa5e2a7ac2316.tar.bz2
opensim-SC-70953dbfcdf70b24fb939252775fa5e2a7ac2316.tar.xz
Fix issues where setting llSetTextureAnim(FALSE... did not work properly).
I ended up amalgamating patches from http://opensimulator.org/mantis/view.php?id=7313 and http://opensimulator.org/mantis/view.php?id=7318 Thanks a lot to both bobshaffer2 and cinderblocks.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs31
1 files changed, 20 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 8785ca9..c587b2a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1589,20 +1589,29 @@ namespace OpenSim.Region.Framework.Scenes
1589 1589
1590 public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim) 1590 public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
1591 { 1591 {
1592 byte[] data = new byte[16]; 1592 byte[] data;
1593 int pos = 0;
1594 1593
1595 // The flags don't like conversion from uint to byte, so we have to do 1594 if (pTexAnim.Flags == Primitive.TextureAnimMode.ANIM_OFF)
1596 // it the crappy way. See the above function :( 1595 {
1596 data = Utils.EmptyBytes;
1597 }
1598 else
1599 {
1600 data = new byte[16];
1601 int pos = 0;
1602
1603 // The flags don't like conversion from uint to byte, so we have to do
1604 // it the crappy way. See the above function :(
1597 1605
1598 data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++; 1606 data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++;
1599 data[pos] = (byte)pTexAnim.Face; pos++; 1607 data[pos] = (byte)pTexAnim.Face; pos++;
1600 data[pos] = (byte)pTexAnim.SizeX; pos++; 1608 data[pos] = (byte)pTexAnim.SizeX; pos++;
1601 data[pos] = (byte)pTexAnim.SizeY; pos++; 1609 data[pos] = (byte)pTexAnim.SizeY; pos++;
1602 1610
1603 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); 1611 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
1604 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); 1612 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
1605 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); 1613 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
1614 }
1606 1615
1607 m_TextureAnimation = data; 1616 m_TextureAnimation = data;
1608 } 1617 }