* Committing some untested stuff regarding texture animations. This won't break anything, but the llSetTextureAnim function is completely untested.. (though it may be functional once the script engine works again)
parent
8dc5153ad7
commit
d4f32649cd
|
@ -570,6 +570,10 @@ namespace OpenSim.Framework
|
|||
void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
|
||||
void SetChildAgentThrottle(byte[] throttle);
|
||||
|
||||
void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
|
||||
LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
|
||||
uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction, byte[] textureanimation);
|
||||
|
||||
void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
|
||||
LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
|
||||
uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
|
||||
|
|
|
@ -1588,12 +1588,23 @@ namespace OpenSim.Region.ClientStack
|
|||
OutPacket(attach, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
|
||||
public void SendPrimitiveToClient(
|
||||
ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos,
|
||||
uint flags,
|
||||
LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
|
||||
LLQuaternion rotation, byte clickAction)
|
||||
{
|
||||
byte[] textureanim = new byte[0];
|
||||
|
||||
SendPrimitiveToClient(regionHandle, timeDilation, localID, primShape, pos, flags,
|
||||
objectID, ownerID, text, color, parentID, particleSystem,
|
||||
rotation, clickAction, textureanim);
|
||||
}
|
||||
public void SendPrimitiveToClient(
|
||||
ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos,
|
||||
uint flags,
|
||||
LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
|
||||
LLQuaternion rotation, byte clickAction, byte[] textureanim)
|
||||
{
|
||||
ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
|
||||
// TODO: don't create new blocks if recycling an old packet
|
||||
|
@ -1615,6 +1626,8 @@ namespace OpenSim.Region.ClientStack
|
|||
outPacket.ObjectData[0].PSBlock = particleSystem;
|
||||
outPacket.ObjectData[0].ClickAction = clickAction;
|
||||
//outPacket.ObjectData[0].Flags = 0;
|
||||
|
||||
// Sound Radius
|
||||
outPacket.ObjectData[0].Radius = 20;
|
||||
|
||||
byte[] pb = pos.GetBytes();
|
||||
|
@ -1623,6 +1636,10 @@ namespace OpenSim.Region.ClientStack
|
|||
byte[] rot = rotation.GetBytes();
|
||||
Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 36, rot.Length);
|
||||
|
||||
if (textureanim.Length > 0)
|
||||
outPacket.ObjectData[0].TextureAnim = textureanim;
|
||||
|
||||
|
||||
OutPacket(outPacket, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
|
|
|
@ -276,6 +276,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
private byte[] m_TextureAnimation;
|
||||
|
||||
protected LLVector3 m_offsetPosition;
|
||||
|
||||
public LLVector3 OffsetPosition
|
||||
|
@ -600,6 +602,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
// It's not necessary to persist this
|
||||
m_inventoryFileName = "taskinventory" + LLUUID.Random().ToString();
|
||||
m_TextureAnimation = new byte[0];
|
||||
}
|
||||
|
||||
public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
|
||||
|
@ -646,7 +649,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
m_rotationalvelocity = new LLVector3(0, 0, 0);
|
||||
AngularVelocity = new LLVector3(0, 0, 0);
|
||||
Acceleration = new LLVector3(0, 0, 0);
|
||||
|
||||
m_TextureAnimation = new byte[0];
|
||||
m_inventoryFileName = "taskinventory" + LLUUID.Random().ToString();
|
||||
m_folderID = LLUUID.Random();
|
||||
|
||||
|
@ -1364,6 +1367,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
UpdateTextureEntry(tex.ToBytes());
|
||||
}
|
||||
|
||||
public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
|
||||
{
|
||||
m_TextureAnimation = pTexAnim.GetBytes();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ParticleSystem
|
||||
|
@ -1534,7 +1542,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A};
|
||||
remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid,
|
||||
OwnerID,
|
||||
m_text, color, ParentID, m_particleSystem, lRot, m_clickAction);
|
||||
m_text, color, ParentID, m_particleSystem, lRot, m_clickAction, m_TextureAnimation);
|
||||
}
|
||||
|
||||
/// Terse updates
|
||||
|
|
|
@ -327,7 +327,13 @@ namespace SimpleApp
|
|||
byte[] particleSystem, LLQuaternion rotation, byte clickAction)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
|
||||
PrimitiveBaseShape primShape, LLVector3 pos, uint flags,
|
||||
LLUUID objectID, LLUUID ownerID, string text, byte[] color,
|
||||
uint parentID,
|
||||
byte[] particleSystem, LLQuaternion rotation, byte clickAction, byte[] textureanimation)
|
||||
{
|
||||
}
|
||||
public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
|
||||
LLVector3 position, LLQuaternion rotation)
|
||||
{
|
||||
|
|
|
@ -2007,7 +2007,16 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
|
||||
public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate)
|
||||
{
|
||||
NotImplemented("llSetTextureAnim");
|
||||
Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation();
|
||||
pTexAnim.Flags = (uint)mode;
|
||||
pTexAnim.Face = (uint)face;
|
||||
pTexAnim.Length = (float)length;
|
||||
pTexAnim.Rate = (float)rate;
|
||||
pTexAnim.SizeX = (uint)sizex;
|
||||
pTexAnim.SizeY = (uint)sizey;
|
||||
pTexAnim.Start = (float)start;
|
||||
m_host.AddTextureAnimation(pTexAnim);
|
||||
m_host.SendFullUpdateToAllClients();
|
||||
}
|
||||
|
||||
public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east,
|
||||
|
|
Loading…
Reference in New Issue