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.mb-throttle-test
parent
a3bd708e77
commit
70953dbfcd
|
@ -1589,20 +1589,29 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
|
||||
{
|
||||
byte[] data = new byte[16];
|
||||
int pos = 0;
|
||||
byte[] data;
|
||||
|
||||
// The flags don't like conversion from uint to byte, so we have to do
|
||||
// it the crappy way. See the above function :(
|
||||
if (pTexAnim.Flags == Primitive.TextureAnimMode.ANIM_OFF)
|
||||
{
|
||||
data = Utils.EmptyBytes;
|
||||
}
|
||||
else
|
||||
{
|
||||
data = new byte[16];
|
||||
int pos = 0;
|
||||
|
||||
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++;
|
||||
// The flags don't like conversion from uint to byte, so we have to do
|
||||
// it the crappy way. See the above function :(
|
||||
|
||||
Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
|
||||
Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
|
||||
Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
|
||||
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);
|
||||
}
|
||||
|
||||
m_TextureAnimation = data;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue