From 424b4b2b8663f0f6780d2d3a2656e5b298418711 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 30 Jul 2010 21:41:44 +0100 Subject: move attachment subscription events into AttachmentsModule from scene. restored to some heavy casting in order to preserve RegionCombinerModule semantics, pending better events. --- OpenSim/Region/Framework/Scenes/Scene.cs | 36 ++------------------------------ 1 file changed, 2 insertions(+), 34 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9141d44..088d210 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2783,17 +2783,12 @@ namespace OpenSim.Region.Framework.Scenes SubscribeToClientPrimEvents(client); SubscribeToClientPrimRezEvents(client); SubscribeToClientInventoryEvents(client); - SubscribeToClientAttachmentEvents(client); SubscribeToClientTeleportEvents(client); SubscribeToClientScriptEvents(client); SubscribeToClientParcelEvents(client); SubscribeToClientGridEvents(client); SubscribeToClientGodEvents(client); - SubscribeToClientNetworkEvents(client); - - - // EventManager.TriggerOnNewClient(client); } public virtual void SubscribeToClientTerrainEvents(IClientAPI client) @@ -2874,18 +2869,6 @@ namespace OpenSim.Region.Framework.Scenes client.OnMoveTaskItem += ClientMoveTaskInventoryItem; } - public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) - { - if (AttachmentsModule != null) - { - client.OnRezSingleAttachmentFromInv += AttachmentsModule.RezSingleAttachmentFromInventory; - client.OnRezMultipleAttachmentsFromInv += AttachmentsModule.RezMultipleAttachmentsFromInventory; - client.OnObjectAttach += AttachmentsModule.AttachObject; - client.OnObjectDetach += AttachmentsModule.DetachObject; - client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; - } - } - public virtual void SubscribeToClientTeleportEvents(IClientAPI client) { client.OnTeleportLocationRequest += RequestTeleportLocation; @@ -2934,16 +2917,15 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// Register for events from the client + /// Unsubscribe the client from events. /// - /// The IClientAPI of the connected client + /// The IClientAPI of the client public virtual void UnSubscribeToClientEvents(IClientAPI client) { UnSubscribeToClientTerrainEvents(client); UnSubscribeToClientPrimEvents(client); UnSubscribeToClientPrimRezEvents(client); UnSubscribeToClientInventoryEvents(client); - UnSubscribeToClientAttachmentEvents(client); UnSubscribeToClientTeleportEvents(client); UnSubscribeToClientScriptEvents(client); UnSubscribeToClientParcelEvents(client); @@ -2951,8 +2933,6 @@ namespace OpenSim.Region.Framework.Scenes UnSubscribeToClientGodEvents(client); UnSubscribeToClientNetworkEvents(client); - - // EventManager.TriggerOnNewClient(client); } public virtual void UnSubscribeToClientTerrainEvents(IClientAPI client) @@ -3029,18 +3009,6 @@ namespace OpenSim.Region.Framework.Scenes client.OnMoveTaskItem -= ClientMoveTaskInventoryItem; } - public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) - { - if (AttachmentsModule != null) - { - client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; - client.OnRezMultipleAttachmentsFromInv -= AttachmentsModule.RezMultipleAttachmentsFromInventory; - client.OnObjectAttach -= AttachmentsModule.AttachObject; - client.OnObjectDetach -= AttachmentsModule.DetachObject; - client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; - } - } - public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) { client.OnTeleportLocationRequest -= RequestTeleportLocation; -- cgit v1.1 From 63f3a16b72b5abde70872292cdaf3ebb8523a7e7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 30 Jul 2010 21:44:50 +0100 Subject: remove empty, unused and uncalled UnsubscribeToClientEvents() --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 088d210..61817f2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2912,10 +2912,6 @@ namespace OpenSim.Region.Framework.Scenes client.OnViewerEffect += ProcessViewerEffect; } - protected virtual void UnsubscribeToClientEvents(IClientAPI client) - { - } - /// /// Unsubscribe the client from events. /// -- cgit v1.1 From f84dbafb0c1de99c8211c3f9b96182a845d4d7b4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 30 Jul 2010 21:58:24 +0100 Subject: remove gods event subscription to gods module from scene --- OpenSim/Region/Framework/Scenes/Scene.cs | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 61817f2..83489e8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2787,7 +2787,6 @@ namespace OpenSim.Region.Framework.Scenes SubscribeToClientScriptEvents(client); SubscribeToClientParcelEvents(client); SubscribeToClientGridEvents(client); - SubscribeToClientGodEvents(client); SubscribeToClientNetworkEvents(client); } @@ -2798,8 +2797,7 @@ namespace OpenSim.Region.Framework.Scenes } public virtual void SubscribeToClientPrimEvents(IClientAPI client) - { - + { client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition; client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition; client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation; @@ -2898,14 +2896,7 @@ namespace OpenSim.Region.Framework.Scenes client.OnSetStartLocationRequest += SetHomeRezPoint; client.OnRegionHandleRequest += RegionHandleRequest; } - - public virtual void SubscribeToClientGodEvents(IClientAPI client) - { - IGodsModule godsModule = RequestModuleInterface(); - client.OnGodKickUser += godsModule.KickUser; - client.OnRequestGodlikePowers += godsModule.RequestGodlikePowers; - } - + public virtual void SubscribeToClientNetworkEvents(IClientAPI client) { client.OnNetworkStatsUpdate += StatsReporter.AddPacketsStats; @@ -2915,6 +2906,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Unsubscribe the client from events. /// + /// FIXME: Not called anywhere! /// The IClientAPI of the client public virtual void UnSubscribeToClientEvents(IClientAPI client) { @@ -2926,8 +2918,6 @@ namespace OpenSim.Region.Framework.Scenes UnSubscribeToClientScriptEvents(client); UnSubscribeToClientParcelEvents(client); UnSubscribeToClientGridEvents(client); - UnSubscribeToClientGodEvents(client); - UnSubscribeToClientNetworkEvents(client); } @@ -3036,13 +3026,6 @@ namespace OpenSim.Region.Framework.Scenes client.OnRegionHandleRequest -= RegionHandleRequest; } - public virtual void UnSubscribeToClientGodEvents(IClientAPI client) - { - IGodsModule godsModule = RequestModuleInterface(); - client.OnGodKickUser -= godsModule.KickUser; - client.OnRequestGodlikePowers -= godsModule.RequestGodlikePowers; - } - public virtual void UnSubscribeToClientNetworkEvents(IClientAPI client) { client.OnNetworkStatsUpdate -= StatsReporter.AddPacketsStats; @@ -5256,4 +5239,4 @@ namespace OpenSim.Region.Framework.Scenes return offsets.ToArray(); } } -} +} \ No newline at end of file -- cgit v1.1