From f61e54892f2284b6f89bacf3069467c05b2eea11 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Dec 2011 18:34:23 +0000 Subject: On a new client circuit, send the initial reply ack to let the client know it's live before sending other data. This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before. This may stop some avatars appearing grey on login. This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 8 +++++--- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 380570b..70326b7 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -55,6 +55,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private UUID m_agentID = UUID.Random(); + public ISceneAgent SceneAgent { get; private set; } + private string m_username; private string m_nick; @@ -547,6 +549,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server m_connected = false; m_client.Close(); + SceneAgent = null; } public UUID SessionId @@ -890,12 +893,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Start() { - Scene.AddNewClient(this, PresenceType.User); + SceneAgent = m_scene.AddNewClient(this, PresenceType.User); // Mimicking LLClientView which gets always set appearance from client. - Scene scene = (Scene)Scene; AvatarAppearance appearance; - scene.GetAvatarAppearance(this, out appearance); + m_scene.GetAvatarAppearance(this, out appearance); OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone()); } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 152377a..ed60976 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -43,7 +43,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC private readonly UUID m_uuid = UUID.Random(); private readonly Scene m_scene; - public NPCAvatar(string firstname, string lastname, Vector3 position, Scene scene) { m_firstname = firstname; @@ -57,6 +56,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC get { return m_scene; } } + public ISceneAgent SceneAgent { get { throw new NotImplementedException(); } } + public void Say(string message) { SendOnChatFromClient(message, ChatTypeEnum.Say); @@ -841,6 +842,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void Start() { + // We never start the client, so always fail. + throw new NotImplementedException(); } public void Stop() -- cgit v1.1