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