Make texture anims work right on singu
parent
4707c48828
commit
01e381fa33
|
@ -1878,22 +1878,29 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
|
public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
|
||||||
{
|
{
|
||||||
byte[] data = new byte[16];
|
if (((int)pTexAnim.Flags & 1) == 0) // ANIM_ON
|
||||||
int pos = 0;
|
{
|
||||||
|
byte[] data = new byte[16];
|
||||||
|
int pos = 0;
|
||||||
|
|
||||||
// The flags don't like conversion from uint to byte, so we have to do
|
// The flags don't like conversion from uint to byte, so we have to do
|
||||||
// it the crappy way. See the above function :(
|
// it the crappy way. See the above function :(
|
||||||
|
|
||||||
data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++;
|
data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++;
|
||||||
data[pos] = (byte)pTexAnim.Face; pos++;
|
data[pos] = (byte)pTexAnim.Face; pos++;
|
||||||
data[pos] = (byte)pTexAnim.SizeX; pos++;
|
data[pos] = (byte)pTexAnim.SizeX; pos++;
|
||||||
data[pos] = (byte)pTexAnim.SizeY; pos++;
|
data[pos] = (byte)pTexAnim.SizeY; pos++;
|
||||||
|
|
||||||
Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
|
Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
|
||||||
Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
|
Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
|
||||||
Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
|
Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
|
||||||
|
|
||||||
m_TextureAnimation = data;
|
m_TextureAnimation = data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_TextureAnimation = Utils.EmptyBytes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AdjustSoundGain(double volume)
|
public void AdjustSoundGain(double volume)
|
||||||
|
|
Loading…
Reference in New Issue