More refactoring.
parent
f96083a903
commit
eafd91ba80
|
@ -38,6 +38,7 @@ namespace OpenSim
|
|||
public event GenericCall2 OnCompleteMovementToRegion;
|
||||
public event GenericCall3 OnAgentUpdate;
|
||||
public event StartAnim OnStartAnim;
|
||||
public event GenericCall OnRequestAvatarsData;
|
||||
|
||||
protected override void ProcessInPacket(Packet Pack)
|
||||
{
|
||||
|
@ -106,16 +107,7 @@ namespace OpenSim
|
|||
break;
|
||||
case PacketType.AgentWearablesRequest:
|
||||
OnRequestWearables(this);
|
||||
//need to move the follow to a event system
|
||||
foreach (ClientView client in m_clientThreads.Values)
|
||||
{
|
||||
if (client.AgentID != this.AgentID)
|
||||
{
|
||||
ObjectUpdatePacket objupdate = client.ClientAvatar.CreateUpdatePacket();
|
||||
this.OutPacket(objupdate);
|
||||
client.ClientAvatar.SendAppearanceToOtherAgent(this.ClientAvatar);
|
||||
}
|
||||
}
|
||||
OnRequestAvatarsData(this);
|
||||
break;
|
||||
case PacketType.AgentSetAppearance:
|
||||
AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
|
||||
|
|
|
@ -52,6 +52,9 @@ namespace OpenSim
|
|||
/// </summary>
|
||||
public partial class ClientView : ClientViewBase
|
||||
{
|
||||
protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
|
||||
protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance
|
||||
|
||||
public LLUUID AgentID;
|
||||
public LLUUID SessionID;
|
||||
public LLUUID SecureSessionID = LLUUID.Zero;
|
||||
|
@ -75,10 +78,6 @@ namespace OpenSim
|
|||
private RegionInfo m_regionData;
|
||||
protected AuthenticateSessionsBase m_authenticateSessionsHandler;
|
||||
|
||||
protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
|
||||
|
||||
protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance
|
||||
|
||||
public IUserServer UserServer
|
||||
{
|
||||
set
|
||||
|
@ -233,8 +232,6 @@ namespace OpenSim
|
|||
return result;
|
||||
}
|
||||
|
||||
# endregion
|
||||
|
||||
protected virtual void ClientLoop()
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:ClientLoop() - Entered loop");
|
||||
|
@ -253,6 +250,7 @@ namespace OpenSim
|
|||
}
|
||||
}
|
||||
}
|
||||
# endregion
|
||||
|
||||
# region Setup
|
||||
|
||||
|
|
|
@ -93,6 +93,11 @@ namespace OpenSim.world
|
|||
}
|
||||
|
||||
}
|
||||
public void SendUpdateToOtherClient(Avatar RemoteAvatar)
|
||||
{
|
||||
ObjectUpdatePacket objupdate = CreateUpdatePacket();
|
||||
RemoteAvatar.SendPacketToViewer(objupdate);
|
||||
}
|
||||
|
||||
public ObjectUpdatePacket CreateUpdatePacket()
|
||||
{
|
||||
|
|
|
@ -168,6 +168,20 @@ namespace OpenSim.world
|
|||
return true;
|
||||
}
|
||||
|
||||
public void SendAvatarsToClient(ClientView RemoteClient)
|
||||
{
|
||||
foreach (ClientView client in m_clientThreads.Values)
|
||||
{
|
||||
if (client.AgentID != RemoteClient.AgentID)
|
||||
{
|
||||
// ObjectUpdatePacket objupdate = client.ClientAvatar.CreateUpdatePacket();
|
||||
// RemoteClient.OutPacket(objupdate);
|
||||
client.ClientAvatar.SendUpdateToOtherClient(RemoteClient.ClientAvatar);
|
||||
client.ClientAvatar.SendAppearanceToOtherAgent(RemoteClient.ClientAvatar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public void RequestMapBlock(ClientView simClient, int minX, int minY, int maxX, int maxY)
|
||||
{
|
||||
|
|
|
@ -538,6 +538,8 @@ namespace OpenSim.world
|
|||
agentClient.OnModifyTerrain += new ClientView.ModifyTerrain(this.ModifyTerrain);
|
||||
agentClient.OnRegionHandShakeReply += new ClientView.GenericCall(this.SendLayerData);
|
||||
agentClient.OnRequestWearables += new ClientView.GenericCall(this.GetInitialPrims);
|
||||
agentClient.OnRequestAvatarsData += new ClientView.GenericCall(this.SendAvatarsToClient);
|
||||
|
||||
try
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
|
||||
|
|
Loading…
Reference in New Issue