SendAnimations from SIM->CM->client
parent
3b9a6a565f
commit
5eca61585d
|
@ -494,6 +494,23 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
|
||||
{
|
||||
m_log.Debug("[REGION SYNC AVATAR] SendAnimations");
|
||||
if (m_clientView != null)
|
||||
{
|
||||
OSDMap data = new OSDMap();
|
||||
data["agentID"] = OSD.FromUUID(m_agentID);
|
||||
OSDArray animatA = new OSDArray();
|
||||
foreach (UUID uu in animations) animatA.Add(OSD.FromUUID(uu));
|
||||
data["animations"] = animatA;
|
||||
OSDArray seqsA = new OSDArray();
|
||||
foreach (int ss in seqs) seqsA.Add(OSD.FromInteger(ss));
|
||||
data["seqs"] = seqsA;
|
||||
data["sourceAgentID"] = OSD.FromUUID(sourceAgentId);
|
||||
OSDArray obIDA = new OSDArray();
|
||||
foreach (UUID ii in objectIDs) obIDA.Add(OSD.FromUUID(ii));
|
||||
data["objectIDs"] = obIDA;
|
||||
RegionSyncMessage rsm = new RegionSyncMessage(RegionSyncMessage.MsgType.SendAnimations, OSDParser.SerializeJsonString(data));
|
||||
m_clientView.Send(rsm);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName,
|
||||
|
|
|
@ -708,6 +708,39 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
String.Format("Agent {0} not found in the scene for SitResponse.", agentID));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
case RegionSyncMessage.MsgType.SendAnimations:
|
||||
{
|
||||
OSDMap data = DeserializeMessage(msg);
|
||||
if (data == null)
|
||||
{
|
||||
RegionSyncMessage.HandleError(LogHeader, msg, "Could not deserialize JSON data.");
|
||||
return;
|
||||
}
|
||||
|
||||
UUID agentID = data["agentID"].AsUUID();
|
||||
|
||||
OSDArray animatA = (OSDArray)data["animations"];
|
||||
UUID[] animIDs = new UUID[animatA.Count];
|
||||
for (int ii = 0; ii < animatA.Count; ii++) animIDs[ii] = animatA[ii].AsUUID();
|
||||
|
||||
OSDArray seqsA = (OSDArray)data["seqs"];
|
||||
int[] seqs = new int[seqsA.Count];
|
||||
for (int jj = 0; jj < seqsA.Count; jj++) seqs[jj] = seqsA[jj].AsInteger();
|
||||
|
||||
UUID sourceAgentID = data["sourceAgentID"].AsUUID();
|
||||
|
||||
OSDArray obIDA = (OSDArray)data["objectIDs"];
|
||||
UUID[] objectIDs = new UUID[obIDA.Count];
|
||||
for (int kk = 0; kk < obIDA.Count; kk++) objectIDs[kk] = obIDA[kk].AsUUID();
|
||||
|
||||
ScenePresence sp;
|
||||
m_scene.TryGetScenePresence(agentID, out sp);
|
||||
if (sp != null)
|
||||
{
|
||||
sp.ControllingClient.SendAnimations(animIDs, seqs, sourceAgentID, objectIDs);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case RegionSyncMessage.MsgType.BalanceClientLoad:
|
||||
|
|
|
@ -68,6 +68,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
BalanceClientLoad, // Tells CM a client load target and a place to teleport the extras
|
||||
ChatFromSim,
|
||||
SitResponse,
|
||||
SendAnimations,
|
||||
// BIDIR
|
||||
EchoRequest,
|
||||
EchoResponse,
|
||||
|
|
|
@ -259,7 +259,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
[XmlIgnore]
|
||||
public bool IgnoreUndoUpdate = false;
|
||||
|
||||
private PrimFlags LocalFlags;
|
||||
public PrimFlags LocalFlags;
|
||||
[XmlIgnore]
|
||||
private float m_damage = -1.0f;
|
||||
private byte[] m_TextureAnimation;
|
||||
|
|
Loading…
Reference in New Issue