diff options
Diffstat (limited to 'OpenSim/Region')
14 files changed, 153 insertions, 185 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 8a1f267..77b07ed 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -1512,6 +1512,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1512 | { | 1512 | { |
1513 | AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); | 1513 | AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); |
1514 | bool tp = (aCircuit.teleportFlags > 0); | 1514 | bool tp = (aCircuit.teleportFlags > 0); |
1515 | // Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from | ||
1515 | if (!tp) | 1516 | if (!tp) |
1516 | client.SceneAgent.SendInitialDataToMe(); | 1517 | client.SceneAgent.SendInitialDataToMe(); |
1517 | } | 1518 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index 2fc3b1c..6ce6227 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs | |||
@@ -127,25 +127,27 @@ namespace OpenSim.Region.CoreModules.Framework | |||
127 | Caps caps; | 127 | Caps caps; |
128 | String capsObjectPath = GetCapsPath(agentId); | 128 | String capsObjectPath = GetCapsPath(agentId); |
129 | 129 | ||
130 | if (m_capsObjects.ContainsKey(circuitCode)) | 130 | lock (m_capsObjects) |
131 | { | 131 | { |
132 | Caps oldCaps = m_capsObjects[circuitCode]; | 132 | if (m_capsObjects.ContainsKey(circuitCode)) |
133 | 133 | { | |
134 | m_log.DebugFormat( | 134 | Caps oldCaps = m_capsObjects[circuitCode]; |
135 | "[CAPS]: Recreating caps for agent {0}. Old caps path {1}, new caps path {2}. ", | 135 | |
136 | agentId, oldCaps.CapsObjectPath, capsObjectPath); | 136 | m_log.DebugFormat( |
137 | // This should not happen. The caller code is confused. We need to fix that. | 137 | "[CAPS]: Recreating caps for agent {0}. Old caps path {1}, new caps path {2}. ", |
138 | // CAPs can never be reregistered, or the client will be confused. | 138 | agentId, oldCaps.CapsObjectPath, capsObjectPath); |
139 | // Hence this return here. | 139 | // This should not happen. The caller code is confused. We need to fix that. |
140 | //return; | 140 | // CAPs can never be reregistered, or the client will be confused. |
141 | } | 141 | // Hence this return here. |
142 | 142 | //return; | |
143 | caps = new Caps(MainServer.Instance, m_scene.RegionInfo.ExternalHostName, | 143 | } |
144 | (MainServer.Instance == null) ? 0: MainServer.Instance.Port, | ||
145 | capsObjectPath, agentId, m_scene.RegionInfo.RegionName); | ||
146 | 144 | ||
147 | m_capsObjects[circuitCode] = caps; | 145 | caps = new Caps(MainServer.Instance, m_scene.RegionInfo.ExternalHostName, |
146 | (MainServer.Instance == null) ? 0: MainServer.Instance.Port, | ||
147 | capsObjectPath, agentId, m_scene.RegionInfo.RegionName); | ||
148 | 148 | ||
149 | m_capsObjects[circuitCode] = caps; | ||
150 | } | ||
149 | m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps); | 151 | m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps); |
150 | } | 152 | } |
151 | 153 | ||
@@ -301,7 +303,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
301 | { | 303 | { |
302 | foreach (KeyValuePair<uint, Caps> kvp in m_capsObjects) | 304 | foreach (KeyValuePair<uint, Caps> kvp in m_capsObjects) |
303 | { | 305 | { |
304 | caps.AppendFormat("** User {0}:\n", kvp.Key); | 306 | caps.AppendFormat("** Circuit {0}:\n", kvp.Key); |
305 | 307 | ||
306 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false, null).GetEnumerator(); kvp2.MoveNext(); ) | 308 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false, null).GetEnumerator(); kvp2.MoveNext(); ) |
307 | { | 309 | { |
@@ -345,7 +347,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
345 | 347 | ||
346 | private void BuildDetailedStatsByCapReport(StringBuilder sb, string capName) | 348 | private void BuildDetailedStatsByCapReport(StringBuilder sb, string capName) |
347 | { | 349 | { |
348 | /* | 350 | /* |
349 | sb.AppendFormat("Capability name {0}\n", capName); | 351 | sb.AppendFormat("Capability name {0}\n", capName); |
350 | 352 | ||
351 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); | 353 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); |
@@ -387,7 +389,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
387 | 389 | ||
388 | private void BuildSummaryStatsByCapReport(StringBuilder sb) | 390 | private void BuildSummaryStatsByCapReport(StringBuilder sb) |
389 | { | 391 | { |
390 | /* | 392 | /* |
391 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); | 393 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); |
392 | cdt.AddColumn("Name", 34); | 394 | cdt.AddColumn("Name", 34); |
393 | cdt.AddColumn("Req Received", 12); | 395 | cdt.AddColumn("Req Received", 12); |
@@ -434,6 +436,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
434 | 436 | ||
435 | private void HandleShowCapsStatsByUserCommand(string module, string[] cmdParams) | 437 | private void HandleShowCapsStatsByUserCommand(string module, string[] cmdParams) |
436 | { | 438 | { |
439 | /* | ||
437 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) | 440 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) |
438 | return; | 441 | return; |
439 | 442 | ||
@@ -464,6 +467,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
464 | } | 467 | } |
465 | 468 | ||
466 | MainConsole.Instance.Output(sb.ToString()); | 469 | MainConsole.Instance.Output(sb.ToString()); |
470 | */ | ||
467 | } | 471 | } |
468 | 472 | ||
469 | private void BuildDetailedStatsByUserReport(StringBuilder sb, ScenePresence sp) | 473 | private void BuildDetailedStatsByUserReport(StringBuilder sb, ScenePresence sp) |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index b9c88d4..a3c539d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -822,7 +822,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
822 | "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", | 822 | "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", |
823 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); | 823 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); |
824 | 824 | ||
825 | Fail(sp, finalDestination, logout, "Connection between viewer and destination region could not be established."); | 825 | Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); |
826 | return; | 826 | return; |
827 | } | 827 | } |
828 | 828 | ||
@@ -834,7 +834,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
834 | "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request", | 834 | "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request", |
835 | sp.Name, finalDestination.RegionName, sp.Scene.Name); | 835 | sp.Name, finalDestination.RegionName, sp.Scene.Name); |
836 | 836 | ||
837 | CleanupFailedInterRegionTeleport(sp, finalDestination); | 837 | CleanupFailedInterRegionTeleport(sp, currentAgentCircuit.SessionID.ToString(), finalDestination); |
838 | 838 | ||
839 | return; | 839 | return; |
840 | } | 840 | } |
@@ -878,7 +878,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
878 | "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", | 878 | "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", |
879 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); | 879 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); |
880 | 880 | ||
881 | Fail(sp, finalDestination, logout, "Destination region did not signal teleport completion."); | 881 | Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion."); |
882 | 882 | ||
883 | return; | 883 | return; |
884 | } | 884 | } |
@@ -932,7 +932,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
932 | /// <remarks> | 932 | /// <remarks> |
933 | /// <param name='sp'> </param> | 933 | /// <param name='sp'> </param> |
934 | /// <param name='finalDestination'></param> | 934 | /// <param name='finalDestination'></param> |
935 | protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, GridRegion finalDestination) | 935 | protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination) |
936 | { | 936 | { |
937 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); | 937 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); |
938 | 938 | ||
@@ -943,7 +943,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
943 | 943 | ||
944 | // Finally, kill the agent we just created at the destination. | 944 | // Finally, kill the agent we just created at the destination. |
945 | // XXX: Possibly this should be done asynchronously. | 945 | // XXX: Possibly this should be done asynchronously. |
946 | Scene.SimulationService.CloseAgent(finalDestination, sp.UUID); | 946 | Scene.SimulationService.CloseAgent(finalDestination, sp.UUID, auth_token); |
947 | } | 947 | } |
948 | 948 | ||
949 | /// <summary> | 949 | /// <summary> |
@@ -953,9 +953,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
953 | /// <param name='finalDestination'></param> | 953 | /// <param name='finalDestination'></param> |
954 | /// <param name='logout'></param> | 954 | /// <param name='logout'></param> |
955 | /// <param name='reason'>Human readable reason for teleport failure. Will be sent to client.</param> | 955 | /// <param name='reason'>Human readable reason for teleport failure. Will be sent to client.</param> |
956 | protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout, string reason) | 956 | protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout, string auth_code, string reason) |
957 | { | 957 | { |
958 | CleanupFailedInterRegionTeleport(sp, finalDestination); | 958 | CleanupFailedInterRegionTeleport(sp, auth_code, finalDestination); |
959 | 959 | ||
960 | m_interRegionTeleportFailures.Value++; | 960 | m_interRegionTeleportFailures.Value++; |
961 | 961 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 975fccf..1cf1884 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -207,6 +207,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
207 | { | 207 | { |
208 | m_GatekeeperConnector = new GatekeeperServiceConnector(scene.AssetService); | 208 | m_GatekeeperConnector = new GatekeeperServiceConnector(scene.AssetService); |
209 | m_UAS = scene.RequestModuleInterface<IUserAgentService>(); | 209 | m_UAS = scene.RequestModuleInterface<IUserAgentService>(); |
210 | if (m_UAS == null) | ||
211 | m_UAS = new UserAgentServiceConnector(m_ThisHomeURI); | ||
212 | |||
210 | } | 213 | } |
211 | } | 214 | } |
212 | 215 | ||
@@ -571,12 +574,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
571 | if (uMan != null && uMan.IsLocalGridUser(obj.AgentId)) | 574 | if (uMan != null && uMan.IsLocalGridUser(obj.AgentId)) |
572 | { | 575 | { |
573 | // local grid user | 576 | // local grid user |
577 | m_UAS.LogoutAgent(obj.AgentId, obj.SessionId); | ||
574 | return; | 578 | return; |
575 | } | 579 | } |
576 | 580 | ||
577 | AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode); | 581 | AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode); |
578 | 582 | if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("HomeURI")) | |
579 | if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) | ||
580 | { | 583 | { |
581 | string url = aCircuit.ServiceURLs["HomeURI"].ToString(); | 584 | string url = aCircuit.ServiceURLs["HomeURI"].ToString(); |
582 | IUserAgentService security = new UserAgentServiceConnector(url); | 585 | IUserAgentService security = new UserAgentServiceConnector(url); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index e4aa7bc..8207fb9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -250,26 +250,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
250 | return true; | 250 | return true; |
251 | } | 251 | } |
252 | 252 | ||
253 | public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent) | ||
254 | { | ||
255 | agent = null; | ||
256 | |||
257 | if (destination == null) | ||
258 | return false; | ||
259 | |||
260 | if (m_scenes.ContainsKey(destination.RegionID)) | ||
261 | { | ||
262 | // m_log.DebugFormat( | ||
263 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", | ||
264 | // s.RegionInfo.RegionName, destination.RegionHandle); | ||
265 | |||
266 | return m_scenes[destination.RegionID].IncomingRetrieveRootAgent(id, out agent); | ||
267 | } | ||
268 | |||
269 | //m_log.Debug("[LOCAL COMMS]: region not found for ChildAgentUpdate"); | ||
270 | return false; | ||
271 | } | ||
272 | |||
273 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) | 253 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) |
274 | { | 254 | { |
275 | reason = "Communications failure"; | 255 | reason = "Communications failure"; |
@@ -306,12 +286,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
306 | return false; | 286 | return false; |
307 | } | 287 | } |
308 | 288 | ||
309 | public bool CloseChildAgent(GridRegion destination, UUID id) | 289 | public bool CloseAgent(GridRegion destination, UUID id, string auth_token) |
310 | { | ||
311 | return CloseAgent(destination, id); | ||
312 | } | ||
313 | |||
314 | public bool CloseAgent(GridRegion destination, UUID id) | ||
315 | { | 290 | { |
316 | if (destination == null) | 291 | if (destination == null) |
317 | return false; | 292 | return false; |
@@ -322,7 +297,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
322 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", | 297 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", |
323 | // s.RegionInfo.RegionName, destination.RegionHandle); | 298 | // s.RegionInfo.RegionName, destination.RegionHandle); |
324 | 299 | ||
325 | m_scenes[destination.RegionID].IncomingCloseAgent(id, false); | 300 | m_scenes[destination.RegionID].IncomingCloseAgent(id, false, auth_token); |
326 | return true; | 301 | return true; |
327 | } | 302 | } |
328 | //m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent"); | 303 | //m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent"); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index f7dae59..a1ab3e3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -212,24 +212,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
212 | return m_remoteConnector.UpdateAgent(destination, cAgentData); | 212 | return m_remoteConnector.UpdateAgent(destination, cAgentData); |
213 | } | 213 | } |
214 | 214 | ||
215 | public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent) | ||
216 | { | ||
217 | agent = null; | ||
218 | |||
219 | if (destination == null) | ||
220 | return false; | ||
221 | |||
222 | // Try local first | ||
223 | if (m_localBackend.RetrieveAgent(destination, id, out agent)) | ||
224 | return true; | ||
225 | |||
226 | // else do the remote thing | ||
227 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) | ||
228 | return m_remoteConnector.RetrieveAgent(destination, id, out agent); | ||
229 | |||
230 | return false; | ||
231 | } | ||
232 | |||
233 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) | 215 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) |
234 | { | 216 | { |
235 | reason = "Communications failure"; | 217 | reason = "Communications failure"; |
@@ -262,34 +244,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
262 | return false; | 244 | return false; |
263 | } | 245 | } |
264 | 246 | ||
265 | public bool CloseChildAgent(GridRegion destination, UUID id) | 247 | public bool CloseAgent(GridRegion destination, UUID id, string auth_token) |
266 | { | ||
267 | if (destination == null) | ||
268 | return false; | ||
269 | |||
270 | // Try local first | ||
271 | if (m_localBackend.CloseChildAgent(destination, id)) | ||
272 | return true; | ||
273 | |||
274 | // else do the remote thing | ||
275 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) | ||
276 | return m_remoteConnector.CloseChildAgent(destination, id); | ||
277 | |||
278 | return false; | ||
279 | } | ||
280 | |||
281 | public bool CloseAgent(GridRegion destination, UUID id) | ||
282 | { | 248 | { |
283 | if (destination == null) | 249 | if (destination == null) |
284 | return false; | 250 | return false; |
285 | 251 | ||
286 | // Try local first | 252 | // Try local first |
287 | if (m_localBackend.CloseAgent(destination, id)) | 253 | if (m_localBackend.CloseAgent(destination, id, auth_token)) |
288 | return true; | 254 | return true; |
289 | 255 | ||
290 | // else do the remote thing | 256 | // else do the remote thing |
291 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) | 257 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) |
292 | return m_remoteConnector.CloseAgent(destination, id); | 258 | return m_remoteConnector.CloseAgent(destination, id, auth_token); |
293 | 259 | ||
294 | return false; | 260 | return false; |
295 | } | 261 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d293a8b..c132c5d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3609,7 +3609,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3609 | regions.Remove(RegionInfo.RegionHandle); | 3609 | regions.Remove(RegionInfo.RegionHandle); |
3610 | 3610 | ||
3611 | // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours. | 3611 | // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours. |
3612 | m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); | 3612 | m_sceneGridService.SendCloseChildAgentConnections(agentID, acd.SessionID.ToString(), regions); |
3613 | } | 3613 | } |
3614 | 3614 | ||
3615 | m_eventManager.TriggerClientClosed(agentID, this); | 3615 | m_eventManager.TriggerClientClosed(agentID, this); |
@@ -3856,7 +3856,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3856 | m_log.WarnFormat( | 3856 | m_log.WarnFormat( |
3857 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | 3857 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", |
3858 | sp.Name, sp.UUID, RegionInfo.RegionName); | 3858 | sp.Name, sp.UUID, RegionInfo.RegionName); |
3859 | |||
3860 | 3859 | ||
3861 | if (sp.ControllingClient != null) | 3860 | if (sp.ControllingClient != null) |
3862 | sp.ControllingClient.Close(true, true); | 3861 | sp.ControllingClient.Close(true, true); |
@@ -4395,10 +4394,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
4395 | 4394 | ||
4396 | if (childAgentUpdate != null) | 4395 | if (childAgentUpdate != null) |
4397 | { | 4396 | { |
4397 | if (cAgentData.SessionID != childAgentUpdate.ControllingClient.SessionId) | ||
4398 | { | ||
4399 | m_log.WarnFormat("[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", childAgentUpdate.UUID, cAgentData.SessionID); | ||
4400 | Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", | ||
4401 | childAgentUpdate.UUID, childAgentUpdate.ControllingClient.SessionId, cAgentData.SessionID)); | ||
4402 | } | ||
4403 | |||
4398 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); | 4404 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); |
4399 | return true; | 4405 | return true; |
4400 | } | 4406 | } |
4401 | |||
4402 | return false; | 4407 | return false; |
4403 | } | 4408 | } |
4404 | 4409 | ||
@@ -4414,20 +4419,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
4414 | ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); | 4419 | ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); |
4415 | if (childAgentUpdate != null) | 4420 | if (childAgentUpdate != null) |
4416 | { | 4421 | { |
4417 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. | 4422 | if (childAgentUpdate.ControllingClient.SessionId == cAgentData.SessionID) |
4418 | // however to avoid a race condition crossing borders.. | 4423 | { |
4419 | if (childAgentUpdate.IsChildAgent) | 4424 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. |
4420 | { | 4425 | // however to avoid a race condition crossing borders.. |
4421 | uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); | 4426 | if (childAgentUpdate.IsChildAgent) |
4422 | uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); | 4427 | { |
4423 | uint tRegionX = RegionInfo.RegionLocX; | 4428 | uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); |
4424 | uint tRegionY = RegionInfo.RegionLocY; | 4429 | uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); |
4425 | //Send Data to ScenePresence | 4430 | uint tRegionX = RegionInfo.RegionLocX; |
4426 | childAgentUpdate.ChildAgentDataUpdate(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); | 4431 | uint tRegionY = RegionInfo.RegionLocY; |
4427 | // Not Implemented: | 4432 | //Send Data to ScenePresence |
4428 | //TODO: Do we need to pass the message on to one of our neighbors? | 4433 | childAgentUpdate.ChildAgentDataUpdate(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); |
4434 | // Not Implemented: | ||
4435 | //TODO: Do we need to pass the message on to one of our neighbors? | ||
4436 | } | ||
4429 | } | 4437 | } |
4430 | 4438 | else | |
4439 | m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}", childAgentUpdate.UUID, cAgentData.SessionID); | ||
4431 | return true; | 4440 | return true; |
4432 | } | 4441 | } |
4433 | 4442 | ||
@@ -4470,6 +4479,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
4470 | 4479 | ||
4471 | return false; | 4480 | return false; |
4472 | } | 4481 | } |
4482 | /// <summary> | ||
4483 | /// Authenticated close (via network) | ||
4484 | /// </summary> | ||
4485 | /// <param name="agentID"></param> | ||
4486 | /// <param name="force"></param> | ||
4487 | /// <param name="auth_token"></param> | ||
4488 | /// <returns></returns> | ||
4489 | public bool IncomingCloseAgent(UUID agentID, bool force, string auth_token) | ||
4490 | { | ||
4491 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent {0} in region {1} with auth_token {2}", agentID, RegionInfo.RegionName, auth_token); | ||
4492 | |||
4493 | // Check that the auth_token is valid | ||
4494 | AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID); | ||
4495 | if (acd != null && acd.SessionID.ToString() == auth_token) | ||
4496 | return IncomingCloseAgent(agentID, force); | ||
4497 | else | ||
4498 | m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token); | ||
4499 | return false; | ||
4500 | } | ||
4473 | 4501 | ||
4474 | public bool IncomingCloseAgent(UUID agentID) | 4502 | public bool IncomingCloseAgent(UUID agentID) |
4475 | { | 4503 | { |
@@ -4492,7 +4520,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4492 | public bool IncomingCloseAgent(UUID agentID, bool force) | 4520 | public bool IncomingCloseAgent(UUID agentID, bool force) |
4493 | { | 4521 | { |
4494 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); | 4522 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); |
4495 | |||
4496 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); | 4523 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); |
4497 | if (presence != null) | 4524 | if (presence != null) |
4498 | { | 4525 | { |
@@ -4500,7 +4527,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4500 | return true; | 4527 | return true; |
4501 | } | 4528 | } |
4502 | 4529 | ||
4503 | // Agent not here | 4530 | // Agent not here |
4504 | return false; | 4531 | return false; |
4505 | } | 4532 | } |
4506 | 4533 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index df61dde..52f46f2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -200,7 +200,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
200 | /// This Closes child agents on neighboring regions | 200 | /// This Closes child agents on neighboring regions |
201 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. | 201 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. |
202 | /// </summary> | 202 | /// </summary> |
203 | protected void SendCloseChildAgentAsync(UUID agentID, ulong regionHandle) | 203 | protected void SendCloseChildAgent(UUID agentID, ulong regionHandle, string auth_token) |
204 | { | 204 | { |
205 | // let's do our best, but there's not much we can do if the neighbour doesn't accept. | 205 | // let's do our best, but there's not much we can do if the neighbour doesn't accept. |
206 | 206 | ||
@@ -209,24 +209,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
209 | Utils.LongToUInts(regionHandle, out x, out y); | 209 | Utils.LongToUInts(regionHandle, out x, out y); |
210 | 210 | ||
211 | GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y); | 211 | GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y); |
212 | m_scene.SimulationService.CloseChildAgent(destination, agentID); | ||
213 | } | ||
214 | 212 | ||
215 | private void SendCloseChildAgentCompleted(IAsyncResult iar) | 213 | m_log.DebugFormat( |
216 | { | 214 | "[SCENE COMMUNICATION SERVICE]: Sending close agent ID {0} to {1}", agentID, destination.RegionName); |
217 | SendCloseChildAgentDelegate icon = (SendCloseChildAgentDelegate)iar.AsyncState; | 215 | |
218 | icon.EndInvoke(iar); | 216 | m_scene.SimulationService.CloseAgent(destination, agentID, auth_token); |
219 | } | 217 | } |
220 | 218 | ||
221 | public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst) | 219 | /// <summary> |
220 | /// Closes a child agents in a collection of regions. Does so asynchronously | ||
221 | /// so that the caller doesn't wait. | ||
222 | /// </summary> | ||
223 | /// <param name="agentID"></param> | ||
224 | /// <param name="regionslst"></param> | ||
225 | public void SendCloseChildAgentConnections(UUID agentID, string auth_code, List<ulong> regionslst) | ||
222 | { | 226 | { |
223 | foreach (ulong handle in regionslst) | 227 | foreach (ulong handle in regionslst) |
224 | { | 228 | { |
225 | ulong handleCopy = handle; | 229 | ulong handleCopy = handle; |
226 | SendCloseChildAgentDelegate d = SendCloseChildAgentAsync; | 230 | Util.FireAndForget((o) => { SendCloseChildAgent(agentID, handleCopy, auth_code); }); |
227 | d.BeginInvoke(agentID, handleCopy, | ||
228 | SendCloseChildAgentCompleted, | ||
229 | d); | ||
230 | } | 231 | } |
231 | } | 232 | } |
232 | 233 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 2594b1b..59a453a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4704,50 +4704,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4704 | } | 4704 | } |
4705 | 4705 | ||
4706 | /// <summary> | 4706 | /// <summary> |
4707 | /// Subscribe for physics collision events if needed for scripts and sounds | ||
4708 | /// </summary> | ||
4709 | public void SubscribeForCollisionEvents() | ||
4710 | { | ||
4711 | PhysicsActor pa = PhysActor; | ||
4712 | |||
4713 | if (pa != null) | ||
4714 | { | ||
4715 | if ( | ||
4716 | ((AggregateScriptEvents & scriptEvents.collision) != 0) || | ||
4717 | ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || | ||
4718 | ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || | ||
4719 | ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || | ||
4720 | ((AggregateScriptEvents & scriptEvents.land_collision) != 0) || | ||
4721 | ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || | ||
4722 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.collision) != 0) || | ||
4723 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.collision_end) != 0) || | ||
4724 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.collision_start) != 0) || | ||
4725 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || | ||
4726 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.land_collision) != 0) || | ||
4727 | ((ParentGroup.RootPart.AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || | ||
4728 | (CollisionSound != UUID.Zero) | ||
4729 | ) | ||
4730 | { | ||
4731 | if (!pa.SubscribedEvents()) | ||
4732 | { | ||
4733 | // If not already subscribed for event, set up for a collision event. | ||
4734 | pa.OnCollisionUpdate += PhysicsCollision; | ||
4735 | pa.SubscribeEvents(1000); | ||
4736 | } | ||
4737 | } | ||
4738 | else | ||
4739 | { | ||
4740 | // There is no need to be subscribed to collisions so, if subscribed, remove subscription | ||
4741 | if (pa.SubscribedEvents()) | ||
4742 | { | ||
4743 | pa.OnCollisionUpdate -= PhysicsCollision; | ||
4744 | pa.UnSubscribeEvents(); | ||
4745 | } | ||
4746 | } | ||
4747 | } | ||
4748 | } | ||
4749 | |||
4750 | /// <summary> | ||
4751 | /// Adds this part to the physics scene. | 4707 | /// Adds this part to the physics scene. |
4752 | /// and sets the PhysActor property | 4708 | /// and sets the PhysActor property |
4753 | /// </summary> | 4709 | /// </summary> |
@@ -5205,7 +5161,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
5205 | { | 5161 | { |
5206 | objectflagupdate |= (uint) PrimFlags.AllowInventoryDrop; | 5162 | objectflagupdate |= (uint) PrimFlags.AllowInventoryDrop; |
5207 | } | 5163 | } |
5208 | 5164 | /* | |
5165 | PhysicsActor pa = PhysActor; | ||
5166 | if (pa != null) | ||
5167 | { | ||
5168 | if ( | ||
5169 | // ((AggregateScriptEvents & scriptEvents.collision) != 0) || | ||
5170 | // ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || | ||
5171 | // ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || | ||
5172 | // ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || | ||
5173 | // ((AggregateScriptEvents & scriptEvents.land_collision) != 0) || | ||
5174 | // ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || | ||
5175 | ((AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) || ((ParentGroup.RootPart.AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) || (CollisionSound != UUID.Zero) | ||
5176 | ) | ||
5177 | { | ||
5178 | // subscribe to physics updates. | ||
5179 | pa.OnCollisionUpdate += PhysicsCollision; | ||
5180 | pa.SubscribeEvents(1000); | ||
5181 | } | ||
5182 | else | ||
5183 | { | ||
5184 | pa.UnSubscribeEvents(); | ||
5185 | pa.OnCollisionUpdate -= PhysicsCollision; | ||
5186 | } | ||
5187 | } | ||
5188 | */ | ||
5209 | UpdatePhysicsSubscribedEvents(); | 5189 | UpdatePhysicsSubscribedEvents(); |
5210 | 5190 | ||
5211 | //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0) | 5191 | //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4ae0eb1..6e4ac98 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1151,9 +1151,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1151 | 1151 | ||
1152 | MovementFlag = 0; | 1152 | MovementFlag = 0; |
1153 | 1153 | ||
1154 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | 1154 | // DIVA NOTE: I moved TriggerOnMakeRootAgent out of here and into the end of |
1155 | 1155 | // CompleteMovement. We don't want modules doing heavy computation before CompleteMovement | |
1156 | m_scene.EventManager.OnRegionHeartbeatEnd += RegionHeartbeatEnd; | 1156 | // is over. |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | public int GetStateSource() | 1159 | public int GetStateSource() |
@@ -1519,10 +1519,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1519 | bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); | 1519 | bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); |
1520 | MakeRootAgent(AbsolutePosition, flying); | 1520 | MakeRootAgent(AbsolutePosition, flying); |
1521 | ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); | 1521 | ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); |
1522 | // Remember in HandleUseCircuitCode, we delayed this to here | ||
1523 | // This will also send the initial data to clients when TP to a neighboring region. | ||
1524 | // Not ideal, but until we know we're TP-ing from a neighboring region, there's not much we can do | ||
1525 | if (m_teleportFlags > 0) | ||
1526 | SendInitialDataToMe(); | ||
1522 | 1527 | ||
1523 | // m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); | 1528 | // m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); |
1524 | 1529 | ||
1525 | if ((m_callbackURI != null) && !m_callbackURI.Equals("")) | 1530 | if (!string.IsNullOrEmpty(m_callbackURI)) |
1526 | { | 1531 | { |
1527 | // We cannot sleep here since this would hold up the inbound packet processing thread, as | 1532 | // We cannot sleep here since this would hold up the inbound packet processing thread, as |
1528 | // CompleteMovement() is executed synchronously. However, it might be better to delay the release | 1533 | // CompleteMovement() is executed synchronously. However, it might be better to delay the release |
@@ -1550,9 +1555,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1550 | // Create child agents in neighbouring regions | 1555 | // Create child agents in neighbouring regions |
1551 | if (openChildAgents && !IsChildAgent) | 1556 | if (openChildAgents && !IsChildAgent) |
1552 | { | 1557 | { |
1553 | // Remember in HandleUseCircuitCode, we delayed this to here | ||
1554 | SendInitialDataToMe(); | ||
1555 | |||
1556 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | 1558 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); |
1557 | if (m_agentTransfer != null) | 1559 | if (m_agentTransfer != null) |
1558 | m_agentTransfer.EnableChildAgents(this); | 1560 | m_agentTransfer.EnableChildAgents(this); |
@@ -1575,6 +1577,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1575 | // m_log.DebugFormat( | 1577 | // m_log.DebugFormat( |
1576 | // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", | 1578 | // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", |
1577 | // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); | 1579 | // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); |
1580 | |||
1581 | // DIVA NOTE: moved this here from MakeRoot. We don't want modules making heavy | ||
1582 | // computations before CompleteMovement is over | ||
1583 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | ||
1584 | |||
1578 | } | 1585 | } |
1579 | 1586 | ||
1580 | /// <summary> | 1587 | /// <summary> |
@@ -2886,11 +2893,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2886 | SendOtherAgentsAppearanceToMe(); | 2893 | SendOtherAgentsAppearanceToMe(); |
2887 | 2894 | ||
2888 | EntityBase[] entities = Scene.Entities.GetEntities(); | 2895 | EntityBase[] entities = Scene.Entities.GetEntities(); |
2889 | foreach(EntityBase e in entities) | 2896 | foreach (EntityBase e in entities) |
2890 | { | 2897 | { |
2891 | if (e != null && e is SceneObjectGroup) | 2898 | if (e != null && e is SceneObjectGroup) |
2892 | ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient); | 2899 | ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient); |
2893 | } | 2900 | } |
2901 | |||
2894 | }); | 2902 | }); |
2895 | } | 2903 | } |
2896 | 2904 | ||
@@ -3116,7 +3124,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3116 | cadu.Velocity = Velocity; | 3124 | cadu.Velocity = Velocity; |
3117 | 3125 | ||
3118 | AgentPosition agentpos = new AgentPosition(); | 3126 | AgentPosition agentpos = new AgentPosition(); |
3119 | agentpos.CopyFrom(cadu); | 3127 | agentpos.CopyFrom(cadu, ControllingClient.SessionId); |
3120 | 3128 | ||
3121 | // Let's get this out of the update loop | 3129 | // Let's get this out of the update loop |
3122 | Util.FireAndForget(delegate { m_scene.SendOutChildAgentUpdates(agentpos, this); }); | 3130 | Util.FireAndForget(delegate { m_scene.SendOutChildAgentUpdates(agentpos, this); }); |
@@ -3355,7 +3363,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3355 | { | 3363 | { |
3356 | m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); | 3364 | m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); |
3357 | 3365 | ||
3358 | m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions); | 3366 | AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(UUID); |
3367 | string auth = string.Empty; | ||
3368 | if (acd != null) | ||
3369 | auth = acd.SessionID.ToString(); | ||
3370 | m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, auth, byebyeRegions); | ||
3359 | } | 3371 | } |
3360 | 3372 | ||
3361 | foreach (ulong handle in byebyeRegions) | 3373 | foreach (ulong handle in byebyeRegions) |
@@ -3456,6 +3468,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3456 | 3468 | ||
3457 | cAgent.AgentID = UUID; | 3469 | cAgent.AgentID = UUID; |
3458 | cAgent.RegionID = Scene.RegionInfo.RegionID; | 3470 | cAgent.RegionID = Scene.RegionInfo.RegionID; |
3471 | cAgent.SessionID = ControllingClient.SessionId; | ||
3459 | 3472 | ||
3460 | cAgent.Position = AbsolutePosition; | 3473 | cAgent.Position = AbsolutePosition; |
3461 | cAgent.Velocity = m_velocity; | 3474 | cAgent.Velocity = m_velocity; |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs index 5a72239..5df9aba 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs | |||
@@ -112,6 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
112 | //moveArgs.BodyRotation = Quaternion.CreateFromEulers(Vector3.Zero); | 112 | //moveArgs.BodyRotation = Quaternion.CreateFromEulers(Vector3.Zero); |
113 | moveArgs.BodyRotation = Quaternion.CreateFromEulers(new Vector3(0, 0, (float)-(Math.PI / 2))); | 113 | moveArgs.BodyRotation = Quaternion.CreateFromEulers(new Vector3(0, 0, (float)-(Math.PI / 2))); |
114 | moveArgs.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS; | 114 | moveArgs.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS; |
115 | moveArgs.SessionID = acd.SessionID; | ||
115 | 116 | ||
116 | originalSp.HandleAgentUpdate(originalSp.ControllingClient, moveArgs); | 117 | originalSp.HandleAgentUpdate(originalSp.ControllingClient, moveArgs); |
117 | 118 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index a6db2e5..44a7c14 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -353,12 +353,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
353 | // Position of a sensor in a child prim attached to an avatar | 353 | // Position of a sensor in a child prim attached to an avatar |
354 | // will be still wrong. | 354 | // will be still wrong. |
355 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); | 355 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); |
356 | fromRegionPos = avatar.AbsolutePosition; | ||
357 | q = avatar.Rotation; | ||
358 | 356 | ||
359 | // Don't proceed if the avatar for this attachment has since been removed from the scene. | 357 | // Don't proceed if the avatar for this attachment has since been removed from the scene. |
360 | if (avatar == null) | 358 | if (avatar == null) |
361 | return sensedEntities; | 359 | return sensedEntities; |
360 | |||
361 | fromRegionPos = avatar.AbsolutePosition; | ||
362 | q = avatar.Rotation; | ||
362 | } | 363 | } |
363 | 364 | ||
364 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); | 365 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); |
@@ -487,6 +488,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
487 | // Position of a sensor in a child prim attached to an avatar | 488 | // Position of a sensor in a child prim attached to an avatar |
488 | // will be still wrong. | 489 | // will be still wrong. |
489 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); | 490 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); |
491 | |||
492 | // Don't proceed if the avatar for this attachment has since been removed from the scene. | ||
490 | if (avatar == null) | 493 | if (avatar == null) |
491 | return sensedEntities; | 494 | return sensedEntities; |
492 | fromRegionPos = avatar.AbsolutePosition; | 495 | fromRegionPos = avatar.AbsolutePosition; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index b25894a..d211a2b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -343,7 +343,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
343 | void llSetDamage(double damage); | 343 | void llSetDamage(double damage); |
344 | void llSetForce(LSL_Vector force, int local); | 344 | void llSetForce(LSL_Vector force, int local); |
345 | void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local); | 345 | void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local); |
346 | void llSetVelocity(LSL_Vector velocity, int local); | ||
347 | void llSetAngularVelocity(LSL_Vector angularVelocity, int local); | 346 | void llSetAngularVelocity(LSL_Vector angularVelocity, int local); |
348 | void llSetHoverHeight(double height, int water, double tau); | 347 | void llSetHoverHeight(double height, int water, double tau); |
349 | void llSetInventoryPermMask(string item, int mask, int value); | 348 | void llSetInventoryPermMask(string item, int mask, int value); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 2f528af..4fc8d65 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -1550,11 +1550,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1550 | m_LSL_Functions.llSetForceAndTorque(force, torque, local); | 1550 | m_LSL_Functions.llSetForceAndTorque(force, torque, local); |
1551 | } | 1551 | } |
1552 | 1552 | ||
1553 | public void llSetVelocity(LSL_Vector force, int local) | ||
1554 | { | ||
1555 | m_LSL_Functions.llSetVelocity(force, local); | ||
1556 | } | ||
1557 | |||
1558 | public void llSetAngularVelocity(LSL_Vector force, int local) | 1553 | public void llSetAngularVelocity(LSL_Vector force, int local) |
1559 | { | 1554 | { |
1560 | m_LSL_Functions.llSetAngularVelocity(force, local); | 1555 | m_LSL_Functions.llSetAngularVelocity(force, local); |