diff options
author | Justin Clark-Casey (justincc) | 2011-09-22 01:08:38 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-22 01:08:38 +0100 |
commit | 3ccb58c05c0a11fb4cff0f3adf90ca29d67b0c8b (patch) | |
tree | 61fc62cade525b6ac53a805eb89babc0a38a7599 /OpenSim/Region/CoreModules/Avatar/InstantMessage | |
parent | Reinstate option to land an npc when it reaches a target. (diff) | |
download | opensim-SC_OLD-3ccb58c05c0a11fb4cff0f3adf90ca29d67b0c8b.zip opensim-SC_OLD-3ccb58c05c0a11fb4cff0f3adf90ca29d67b0c8b.tar.gz opensim-SC_OLD-3ccb58c05c0a11fb4cff0f3adf90ca29d67b0c8b.tar.bz2 opensim-SC_OLD-3ccb58c05c0a11fb4cff0f3adf90ca29d67b0c8b.tar.xz |
Fix failure to teleport when an agent is lured on the same sim (and probably in neighbouring sims) with HG lure active
It turns out that the HG lure module was setting up a pending lure when it intercepted the instant message on its way out to the target avatar.
However, an IM would only be sent if the user was remote, so it would not be set up for users on the same sim or in an immediate neighbour.
We fix this by adding the pending lure when the message goes out and ignoring a duplicate pending lure add if it goes to out via IM.
Hopefully addresses http://opensimulator.org/mantis/view.php?id=5690
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs index 7753c25..d294692 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs | |||
@@ -24,6 +24,7 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | |||
27 | using System; | 28 | using System; |
28 | using System.Collections; | 29 | using System.Collections; |
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
@@ -145,14 +146,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
145 | scene.Entities[toAgentID] is ScenePresence) | 146 | scene.Entities[toAgentID] is ScenePresence) |
146 | { | 147 | { |
147 | // m_log.DebugFormat( | 148 | // m_log.DebugFormat( |
148 | // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", | 149 | // "[HG INSTANT MESSAGE]: Looking for root agent {0} in {1}", |
149 | // toAgentID.ToString(), scene.RegionInfo.RegionName); | 150 | // toAgentID.ToString(), scene.RegionInfo.RegionName); |
150 | 151 | ||
151 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; | 152 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; |
152 | if (!user.IsChildAgent) | 153 | if (!user.IsChildAgent) |
153 | { | 154 | { |
154 | // Local message | 155 | // Local message |
155 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); | 156 | // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); |
156 | user.ControllingClient.SendInstantMessage(im); | 157 | user.ControllingClient.SendInstantMessage(im); |
157 | 158 | ||
158 | // Message sent | 159 | // Message sent |
@@ -166,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
166 | foreach (Scene scene in m_Scenes) | 167 | foreach (Scene scene in m_Scenes) |
167 | { | 168 | { |
168 | // m_log.DebugFormat( | 169 | // m_log.DebugFormat( |
169 | // "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); | 170 | // "[HG INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); |
170 | 171 | ||
171 | if (scene.Entities.ContainsKey(toAgentID) && | 172 | if (scene.Entities.ContainsKey(toAgentID) && |
172 | scene.Entities[toAgentID] is ScenePresence) | 173 | scene.Entities[toAgentID] is ScenePresence) |
@@ -174,7 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
174 | // Local message | 175 | // Local message |
175 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; | 176 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; |
176 | 177 | ||
177 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID); | 178 | // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID); |
178 | user.ControllingClient.SendInstantMessage(im); | 179 | user.ControllingClient.SendInstantMessage(im); |
179 | 180 | ||
180 | // Message sent | 181 | // Message sent |
@@ -183,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
183 | } | 184 | } |
184 | } | 185 | } |
185 | 186 | ||
186 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); | 187 | // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); |
187 | // Is the user a local user? | 188 | // Is the user a local user? |
188 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, toAgentID); | 189 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, toAgentID); |
189 | string url = string.Empty; | 190 | string url = string.Empty; |