mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
Make texture anims work right on singu
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user