diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 19 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalBackEndServices.cs | 44 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 164 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | 48 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/ChatModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MyWorld.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/Program.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 2 |
11 files changed, 321 insertions, 11 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index eb09de3..11345c3 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -59,6 +59,7 @@ namespace OpenSim | |||
59 | public bool m_sandbox; | 59 | public bool m_sandbox; |
60 | public bool user_accounts; | 60 | public bool user_accounts; |
61 | public bool m_gridLocalAsset; | 61 | public bool m_gridLocalAsset; |
62 | public bool m_SendChildAgentTaskData; | ||
62 | 63 | ||
63 | private OpenSimController m_controller; | 64 | private OpenSimController m_controller; |
64 | 65 | ||
@@ -156,6 +157,9 @@ namespace OpenSim | |||
156 | config.Set("physics", "basicphysics"); | 157 | config.Set("physics", "basicphysics"); |
157 | config.Set("verbose", true); | 158 | config.Set("verbose", true); |
158 | config.Set("physical_prim", true); | 159 | config.Set("physical_prim", true); |
160 | |||
161 | config.Set("child_get_tasks", false); | ||
162 | |||
159 | config.Set("serverside_object_permissions", false); | 163 | config.Set("serverside_object_permissions", false); |
160 | 164 | ||
161 | config.Set("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); | 165 | config.Set("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); |
@@ -166,6 +170,7 @@ namespace OpenSim | |||
166 | config.Set("script_engine", "DotNetEngine"); | 170 | config.Set("script_engine", "DotNetEngine"); |
167 | 171 | ||
168 | config.Set("asset_database", "sqlite"); | 172 | config.Set("asset_database", "sqlite"); |
173 | |||
169 | } | 174 | } |
170 | 175 | ||
171 | if (m_config.Configs["StandAlone"] == null) | 176 | if (m_config.Configs["StandAlone"] == null) |
@@ -215,7 +220,11 @@ namespace OpenSim | |||
215 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); | 220 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); |
216 | m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); | 221 | m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); |
217 | m_verbose = startupConfig.GetBoolean("verbose", true); | 222 | m_verbose = startupConfig.GetBoolean("verbose", true); |
223 | |||
218 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); | 224 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); |
225 | |||
226 | m_SendChildAgentTaskData = startupConfig.GetBoolean("child_get_tasks", false); | ||
227 | |||
219 | m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false); | 228 | m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false); |
220 | 229 | ||
221 | m_storageDll = startupConfig.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); | 230 | m_storageDll = startupConfig.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); |
@@ -243,7 +252,10 @@ namespace OpenSim | |||
243 | 252 | ||
244 | m_dumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); | 253 | m_dumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); |
245 | } | 254 | } |
255 | if (!m_sandbox) | ||
256 | m_SendChildAgentTaskData = false; | ||
246 | 257 | ||
258 | |||
247 | m_networkServersInfo.loadFromConfiguration(m_config); | 259 | m_networkServersInfo.loadFromConfiguration(m_config); |
248 | } | 260 | } |
249 | 261 | ||
@@ -368,9 +380,14 @@ namespace OpenSim | |||
368 | { | 380 | { |
369 | PermissionManager permissionManager = new PermissionManager(); | 381 | PermissionManager permissionManager = new PermissionManager(); |
370 | SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); | 382 | SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); |
383 | if (m_SendChildAgentTaskData) | ||
384 | { | ||
385 | MainLog.Instance.Error("WARNING", "Send Child Agent Task Updates is enabled. This is for testing only. It doesn't work on grid mode!"); | ||
386 | System.Threading.Thread.Sleep(12000); | ||
387 | } | ||
371 | return | 388 | return |
372 | new Scene(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, | 389 | new Scene(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, |
373 | m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim); | 390 | m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_SendChildAgentTaskData); |
374 | } | 391 | } |
375 | 392 | ||
376 | protected override void Initialize() | 393 | protected override void Initialize() |
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 5d4e702..4efaa23 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -173,6 +173,15 @@ namespace OpenSim.Region.Communications.Local | |||
173 | return false; | 173 | return false; |
174 | } | 174 | } |
175 | 175 | ||
176 | public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) | ||
177 | { | ||
178 | if (m_regionListeners.ContainsKey(regionHandle)) | ||
179 | { | ||
180 | m_regionListeners[regionHandle].TriggerExpectPrim(regionHandle, primID, objData); | ||
181 | return true; | ||
182 | } | ||
183 | return false; | ||
184 | } | ||
176 | /// <summary> | 185 | /// <summary> |
177 | /// | 186 | /// |
178 | /// </summary> | 187 | /// </summary> |
@@ -190,6 +199,15 @@ namespace OpenSim.Region.Communications.Local | |||
190 | } | 199 | } |
191 | return false; | 200 | return false; |
192 | } | 201 | } |
202 | public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) | ||
203 | { | ||
204 | if (m_regionListeners.ContainsKey(regionHandle)) | ||
205 | { | ||
206 | m_regionListeners[regionHandle].TriggerExpectPrimCrossing(regionHandle, primID, position, isPhysical); | ||
207 | return true; | ||
208 | } | ||
209 | return false; | ||
210 | } | ||
193 | 211 | ||
194 | public void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) | 212 | public void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) |
195 | { | 213 | { |
@@ -207,6 +225,14 @@ namespace OpenSim.Region.Communications.Local | |||
207 | } | 225 | } |
208 | return false; | 226 | return false; |
209 | } | 227 | } |
228 | public bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID) | ||
229 | { | ||
230 | if (m_regionListeners.ContainsKey(regionHandle)) | ||
231 | { | ||
232 | return true; | ||
233 | } | ||
234 | return false; | ||
235 | } | ||
210 | 236 | ||
211 | /// <summary> | 237 | /// <summary> |
212 | /// Is a Sandbox mode method, used by the local Login server to inform a region of a connection user/session | 238 | /// Is a Sandbox mode method, used by the local Login server to inform a region of a connection user/session |
@@ -240,6 +266,15 @@ namespace OpenSim.Region.Communications.Local | |||
240 | } | 266 | } |
241 | } | 267 | } |
242 | 268 | ||
269 | public void TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData) | ||
270 | { | ||
271 | if (m_regionListeners.ContainsKey(regionHandle)) | ||
272 | { | ||
273 | m_regionListeners[regionHandle].TriggerExpectPrim(regionHandle, primID, objData); | ||
274 | } | ||
275 | |||
276 | } | ||
277 | |||
243 | public void PingCheckReply(Hashtable respData) | 278 | public void PingCheckReply(Hashtable respData) |
244 | { | 279 | { |
245 | foreach (ulong region in m_regions.Keys) | 280 | foreach (ulong region in m_regions.Keys) |
@@ -264,6 +299,15 @@ namespace OpenSim.Region.Communications.Local | |||
264 | return false; | 299 | return false; |
265 | } | 300 | } |
266 | 301 | ||
302 | public bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) | ||
303 | { | ||
304 | if (m_regionListeners.ContainsKey(regionHandle)) | ||
305 | { | ||
306 | return m_regionListeners[regionHandle].TriggerExpectPrimCrossing(regionHandle, primID, position, isPhysical); | ||
307 | } | ||
308 | return false; | ||
309 | } | ||
310 | |||
267 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) | 311 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) |
268 | { | 312 | { |
269 | if (m_regionListeners.ContainsKey(regionHandle)) | 313 | if (m_regionListeners.ContainsKey(regionHandle)) |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index d355f92..fe46632 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -63,6 +63,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
63 | { | 63 | { |
64 | serversInfo = servers_info; | 64 | serversInfo = servers_info; |
65 | httpServer = httpServe; | 65 | httpServer = httpServe; |
66 | //Respond to Grid Services requests | ||
66 | httpServer.AddXmlRPCHandler("expect_user", ExpectUser); | 67 | httpServer.AddXmlRPCHandler("expect_user", ExpectUser); |
67 | httpServer.AddXmlRPCHandler("check", PingCheckReply); | 68 | httpServer.AddXmlRPCHandler("check", PingCheckReply); |
68 | 69 | ||
@@ -340,7 +341,12 @@ namespace OpenSim.Region.Communications.OGS1 | |||
340 | 341 | ||
341 | return new XmlRpcResponse(); | 342 | return new XmlRpcResponse(); |
342 | } | 343 | } |
344 | |||
343 | 345 | ||
346 | |||
347 | |||
348 | |||
349 | |||
344 | #region m_interRegion Comms | 350 | #region m_interRegion Comms |
345 | 351 | ||
346 | /// <summary> | 352 | /// <summary> |
@@ -357,16 +363,22 @@ namespace OpenSim.Region.Communications.OGS1 | |||
357 | RemotingConfiguration.RegisterWellKnownServiceType(wellType); | 363 | RemotingConfiguration.RegisterWellKnownServiceType(wellType); |
358 | InterRegionSingleton.Instance.OnArrival += TriggerExpectAvatarCrossing; | 364 | InterRegionSingleton.Instance.OnArrival += TriggerExpectAvatarCrossing; |
359 | InterRegionSingleton.Instance.OnChildAgent += IncomingChildAgent; | 365 | InterRegionSingleton.Instance.OnChildAgent += IncomingChildAgent; |
366 | InterRegionSingleton.Instance.OnPrimGroupArrival += IncomingPrim; | ||
367 | InterRegionSingleton.Instance.OnPrimGroupNear += TriggerExpectPrimCrossing; | ||
368 | |||
360 | } | 369 | } |
361 | 370 | ||
362 | #region Methods called by regions in this instance | 371 | #region Methods called by regions in this instance |
363 | 372 | ||
373 | |||
374 | |||
364 | /// <summary> | 375 | /// <summary> |
365 | /// | 376 | /// |
366 | /// </summary> | 377 | /// </summary> |
367 | /// <param name="regionHandle"></param> | 378 | /// <param name="regionHandle"></param> |
368 | /// <param name="agentData"></param> | 379 | /// <param name="agentData"></param> |
369 | /// <returns></returns> | 380 | /// <returns></returns> |
381 | |||
370 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) | 382 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) |
371 | { | 383 | { |
372 | try | 384 | try |
@@ -432,7 +444,78 @@ namespace OpenSim.Region.Communications.OGS1 | |||
432 | } | 444 | } |
433 | return true; | 445 | return true; |
434 | } | 446 | } |
447 | /// <summary> | ||
448 | /// | ||
449 | /// </summary> | ||
450 | /// <param name="regionHandle"></param> | ||
451 | /// <param name="agentData"></param> | ||
452 | /// <returns></returns> | ||
453 | |||
454 | public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) | ||
455 | { | ||
456 | try | ||
457 | { | ||
458 | if (m_localBackend.InformRegionOfPrimCrossing(regionHandle,primID, objData)) | ||
459 | { | ||
460 | return true; | ||
461 | } | ||
435 | 462 | ||
463 | RegionInfo regInfo = RequestNeighbourInfo(regionHandle); | ||
464 | if (regInfo != null) | ||
465 | { | ||
466 | //don't want to be creating a new link to the remote instance every time like we are here | ||
467 | bool retValue = false; | ||
468 | |||
469 | |||
470 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( | ||
471 | typeof (OGS1InterRegionRemoting), | ||
472 | "tcp://" + regInfo.RemotingAddress + | ||
473 | ":" + regInfo.RemotingPort + | ||
474 | "/InterRegions"); | ||
475 | |||
476 | if (remObject != null) | ||
477 | { | ||
478 | retValue = remObject.InformRegionOfPrimCrossing(regionHandle,primID, objData); | ||
479 | } | ||
480 | else | ||
481 | { | ||
482 | Console.WriteLine("remoting object not found"); | ||
483 | } | ||
484 | remObject = null; | ||
485 | |||
486 | |||
487 | return retValue; | ||
488 | } | ||
489 | |||
490 | return false; | ||
491 | } | ||
492 | catch (RemotingException e) | ||
493 | { | ||
494 | MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); | ||
495 | return false; | ||
496 | } | ||
497 | catch (SocketException e) | ||
498 | { | ||
499 | MainLog.Instance.Error("Socket Error: Unable to connect to remote region.\n" + e.ToString()); | ||
500 | return false; | ||
501 | } | ||
502 | catch (InvalidCredentialException e) | ||
503 | { | ||
504 | MainLog.Instance.Error("Invalid Credentials: Unable to connect to remote region.\n" + e.ToString()); | ||
505 | return false; | ||
506 | } | ||
507 | catch (AuthenticationException e) | ||
508 | { | ||
509 | MainLog.Instance.Error("Authentication exception: Unable to connect to remote region.\n" + e.ToString()); | ||
510 | return false; | ||
511 | } | ||
512 | catch (Exception e) | ||
513 | { | ||
514 | MainLog.Instance.Error("Unknown exception: Unable to connect to remote region.\n" + e.ToString()); | ||
515 | return false; | ||
516 | } | ||
517 | return true; | ||
518 | } | ||
436 | /// <summary> | 519 | /// <summary> |
437 | /// | 520 | /// |
438 | /// </summary> | 521 | /// </summary> |
@@ -484,6 +567,50 @@ namespace OpenSim.Region.Communications.OGS1 | |||
484 | return false; | 567 | return false; |
485 | } | 568 | } |
486 | } | 569 | } |
570 | public bool ExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical) | ||
571 | { | ||
572 | try | ||
573 | { | ||
574 | if (m_localBackend.TriggerExpectPrimCrossing(regionHandle, agentID, position, isPhysical)) | ||
575 | { | ||
576 | return true; | ||
577 | } | ||
578 | |||
579 | RegionInfo regInfo = RequestNeighbourInfo(regionHandle); | ||
580 | if (regInfo != null) | ||
581 | { | ||
582 | bool retValue = false; | ||
583 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | ||
584 | typeof(OGS1InterRegionRemoting), | ||
585 | "tcp://" + regInfo.RemotingAddress + | ||
586 | ":" + regInfo.RemotingPort + | ||
587 | "/InterRegions"); | ||
588 | if (remObject != null) | ||
589 | { | ||
590 | retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position, isPhysical); | ||
591 | } | ||
592 | else | ||
593 | { | ||
594 | Console.WriteLine("remoting object not found"); | ||
595 | } | ||
596 | remObject = null; | ||
597 | |||
598 | return retValue; | ||
599 | } | ||
600 | //TODO need to see if we know about where this region is and use .net remoting | ||
601 | // to inform it. | ||
602 | return false; | ||
603 | } | ||
604 | catch (RemotingException e) | ||
605 | { | ||
606 | MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); | ||
607 | return false; | ||
608 | } | ||
609 | catch | ||
610 | { | ||
611 | return false; | ||
612 | } | ||
613 | } | ||
487 | 614 | ||
488 | public void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) | 615 | public void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) |
489 | { | 616 | { |
@@ -495,6 +622,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
495 | return m_localBackend.AcknowledgeAgentCrossed(regionHandle, agentId); | 622 | return m_localBackend.AcknowledgeAgentCrossed(regionHandle, agentId); |
496 | } | 623 | } |
497 | 624 | ||
625 | public bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primId) | ||
626 | { | ||
627 | return m_localBackend.AcknowledgePrimCrossed(regionHandle, primId); | ||
628 | } | ||
498 | #endregion | 629 | #endregion |
499 | 630 | ||
500 | #region Methods triggered by calls from external instances | 631 | #region Methods triggered by calls from external instances |
@@ -522,6 +653,27 @@ namespace OpenSim.Region.Communications.OGS1 | |||
522 | /// | 653 | /// |
523 | /// </summary> | 654 | /// </summary> |
524 | /// <param name="regionHandle"></param> | 655 | /// <param name="regionHandle"></param> |
656 | /// <param name="agentData"></param> | ||
657 | /// <returns></returns> | ||
658 | public bool IncomingPrim(ulong regionHandle, LLUUID primID, string objData) | ||
659 | { | ||
660 | // Is this necessary? | ||
661 | try | ||
662 | { | ||
663 | //return m_localBackend.TriggerExpectPrim(regionHandle,primID, objData); | ||
664 | //m_localBackend. | ||
665 | return false; | ||
666 | } | ||
667 | catch (RemotingException e) | ||
668 | { | ||
669 | MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); | ||
670 | return false; | ||
671 | } | ||
672 | } | ||
673 | /// <summary> | ||
674 | /// | ||
675 | /// </summary> | ||
676 | /// <param name="regionHandle"></param> | ||
525 | /// <param name="agentID"></param> | 677 | /// <param name="agentID"></param> |
526 | /// <param name="position"></param> | 678 | /// <param name="position"></param> |
527 | /// <returns></returns> | 679 | /// <returns></returns> |
@@ -537,6 +689,18 @@ namespace OpenSim.Region.Communications.OGS1 | |||
537 | return false; | 689 | return false; |
538 | } | 690 | } |
539 | } | 691 | } |
692 | public bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical) | ||
693 | { | ||
694 | try | ||
695 | { | ||
696 | return m_localBackend.TriggerExpectPrimCrossing(regionHandle, agentID, position, isPhysical); | ||
697 | } | ||
698 | catch (RemotingException e) | ||
699 | { | ||
700 | MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); | ||
701 | return false; | ||
702 | } | ||
703 | } | ||
540 | 704 | ||
541 | #endregion | 705 | #endregion |
542 | 706 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index a127010..70018fd 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | |||
@@ -37,12 +37,18 @@ namespace OpenSim.Region.Communications.OGS1 | |||
37 | 37 | ||
38 | public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying); | 38 | public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying); |
39 | 39 | ||
40 | public delegate bool InformRegionPrimGroup(ulong regionHandle, LLUUID primID, LLVector3 Positon, bool isPhysical); | ||
41 | |||
42 | public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData); | ||
43 | |||
40 | public sealed class InterRegionSingleton | 44 | public sealed class InterRegionSingleton |
41 | { | 45 | { |
42 | private static readonly InterRegionSingleton instance = new InterRegionSingleton(); | 46 | private static readonly InterRegionSingleton instance = new InterRegionSingleton(); |
43 | 47 | ||
44 | public event InformRegionChild OnChildAgent; | 48 | public event InformRegionChild OnChildAgent; |
45 | public event ExpectArrival OnArrival; | 49 | public event ExpectArrival OnArrival; |
50 | public event InformRegionPrimGroup OnPrimGroupNear; | ||
51 | public event PrimGroupArrival OnPrimGroupArrival; | ||
46 | 52 | ||
47 | static InterRegionSingleton() | 53 | static InterRegionSingleton() |
48 | { | 54 | { |
@@ -74,6 +80,22 @@ namespace OpenSim.Region.Communications.OGS1 | |||
74 | } | 80 | } |
75 | return false; | 81 | return false; |
76 | } | 82 | } |
83 | public bool InformRegionPrim(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) | ||
84 | { | ||
85 | if (OnPrimGroupNear != null) | ||
86 | { | ||
87 | return OnPrimGroupNear(regionHandle, primID, position, isPhysical); | ||
88 | } | ||
89 | return false; | ||
90 | } | ||
91 | public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData) | ||
92 | { | ||
93 | if (OnPrimGroupArrival != null) | ||
94 | { | ||
95 | return OnPrimGroupArrival(regionHandle, primID, objData); | ||
96 | } | ||
97 | return false; | ||
98 | } | ||
77 | } | 99 | } |
78 | 100 | ||
79 | public class OGS1InterRegionRemoting : MarshalByRefObject | 101 | public class OGS1InterRegionRemoting : MarshalByRefObject |
@@ -107,5 +129,31 @@ namespace OpenSim.Region.Communications.OGS1 | |||
107 | return false; | 129 | return false; |
108 | } | 130 | } |
109 | } | 131 | } |
132 | public bool InformRegionPrim(ulong regionHandle, LLUUID SceneObjectGroupID, LLVector3 position, bool isPhysical) | ||
133 | { | ||
134 | try | ||
135 | { | ||
136 | return InterRegionSingleton.Instance.InformRegionPrim(regionHandle, SceneObjectGroupID, position, isPhysical); | ||
137 | } | ||
138 | catch (RemotingException e) | ||
139 | { | ||
140 | Console.WriteLine("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); | ||
141 | return false; | ||
142 | } | ||
143 | |||
144 | } | ||
145 | public bool InformRegionOfPrimCrossing(ulong regionHandle,LLUUID primID, string objData) | ||
146 | { | ||
147 | try | ||
148 | { | ||
149 | return InterRegionSingleton.Instance.ExpectPrimCrossing(regionHandle, primID, objData); | ||
150 | } | ||
151 | catch (RemotingException e) | ||
152 | { | ||
153 | Console.WriteLine("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); | ||
154 | return false; | ||
155 | } | ||
156 | } | ||
157 | |||
110 | } | 158 | } |
111 | } \ No newline at end of file | 159 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index a78e4f6..82cec82 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -181,7 +181,7 @@ namespace OpenSim.Region.Environment.Modules | |||
181 | foreach (Scene m_scene in m_scenes) | 181 | foreach (Scene m_scene in m_scenes) |
182 | { | 182 | { |
183 | m_scene.ForEachScenePresence(delegate(ScenePresence presence) | 183 | m_scene.ForEachScenePresence(delegate(ScenePresence presence) |
184 | { | 184 | { |
185 | if (!presence.IsChildAgent) | 185 | if (!presence.IsChildAgent) |
186 | { | 186 | { |
187 | int dis = -100000; | 187 | int dis = -100000; |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 405f2e3..90306f2 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
69 | 69 | ||
70 | private readonly Mutex updateLock; | 70 | private readonly Mutex updateLock; |
71 | public bool m_physicalPrim; | 71 | public bool m_physicalPrim; |
72 | public bool m_sendTasksToChild; | ||
72 | protected ModuleLoader m_moduleLoader; | 73 | protected ModuleLoader m_moduleLoader; |
73 | protected StorageManager m_storageManager; | 74 | protected StorageManager m_storageManager; |
74 | protected AgentCircuitManager m_authenticateHandler; | 75 | protected AgentCircuitManager m_authenticateHandler; |
@@ -197,7 +198,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
197 | 198 | ||
198 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, PermissionManager permissionManager, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | 199 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, PermissionManager permissionManager, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, |
199 | AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, | 200 | AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, |
200 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim) | 201 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool SendTasksToChild) |
201 | { | 202 | { |
202 | updateLock = new Mutex(false); | 203 | updateLock = new Mutex(false); |
203 | 204 | ||
@@ -213,6 +214,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
213 | m_datastore = m_regInfo.DataStore; | 214 | m_datastore = m_regInfo.DataStore; |
214 | RegisterRegionWithComms(); | 215 | RegisterRegionWithComms(); |
215 | m_physicalPrim = physicalPrim; | 216 | m_physicalPrim = physicalPrim; |
217 | m_sendTasksToChild = SendTasksToChild; | ||
216 | 218 | ||
217 | m_LandManager = new LandManager(this, m_regInfo); | 219 | m_LandManager = new LandManager(this, m_regInfo); |
218 | m_estateManager = new EstateManager(this, m_regInfo); | 220 | m_estateManager = new EstateManager(this, m_regInfo); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 4d4f78f..ad7ff58 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -20,6 +20,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
20 | public event AgentCrossing OnAvatarCrossingIntoRegion; | 20 | public event AgentCrossing OnAvatarCrossingIntoRegion; |
21 | public event ExpectUserDelegate OnExpectUser; | 21 | public event ExpectUserDelegate OnExpectUser; |
22 | public event CloseAgentConnection OnCloseAgentConnection; | 22 | public event CloseAgentConnection OnCloseAgentConnection; |
23 | public event PrimCrossing OnPrimCrossingIntoRegion; | ||
24 | |||
23 | 25 | ||
24 | public SceneCommunicationService(CommunicationsManager commsMan) | 26 | public SceneCommunicationService(CommunicationsManager commsMan) |
25 | { | 27 | { |
@@ -34,7 +36,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
34 | { | 36 | { |
35 | regionCommsHost.OnExpectUser += NewUserConnection; | 37 | regionCommsHost.OnExpectUser += NewUserConnection; |
36 | regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing; | 38 | regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing; |
39 | regionCommsHost.OnPrimCrossingIntoRegion += PrimCrossing; | ||
37 | regionCommsHost.OnCloseAgentConnection += CloseConnection; | 40 | regionCommsHost.OnCloseAgentConnection += CloseConnection; |
41 | |||
42 | |||
38 | } | 43 | } |
39 | } | 44 | } |
40 | 45 | ||
@@ -42,6 +47,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
42 | { | 47 | { |
43 | regionCommsHost.OnExpectUser -= NewUserConnection; | 48 | regionCommsHost.OnExpectUser -= NewUserConnection; |
44 | regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing; | 49 | regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing; |
50 | regionCommsHost.OnPrimCrossingIntoRegion -= PrimCrossing; | ||
45 | regionCommsHost.OnCloseAgentConnection -= CloseConnection; | 51 | regionCommsHost.OnCloseAgentConnection -= CloseConnection; |
46 | m_commsProvider.GridService.DeregisterRegion(m_regionInfo); | 52 | m_commsProvider.GridService.DeregisterRegion(m_regionInfo); |
47 | regionCommsHost = null; | 53 | regionCommsHost = null; |
@@ -68,6 +74,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
68 | OnAvatarCrossingIntoRegion(regionHandle, agentID, position, isFlying); | 74 | OnAvatarCrossingIntoRegion(regionHandle, agentID, position, isFlying); |
69 | } | 75 | } |
70 | } | 76 | } |
77 | protected void PrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) | ||
78 | { | ||
79 | if (OnPrimCrossingIntoRegion != null) | ||
80 | { | ||
81 | OnPrimCrossingIntoRegion(regionHandle, primID, position, isPhysical); | ||
82 | } | ||
83 | } | ||
71 | 84 | ||
72 | protected void CloseConnection(ulong regionHandle, LLUUID agentID) | 85 | protected void CloseConnection(ulong regionHandle, LLUUID agentID) |
73 | { | 86 | { |
@@ -222,6 +235,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
222 | return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying); | 235 | return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying); |
223 | } | 236 | } |
224 | 237 | ||
238 | public bool PrimCrossToNeighboringRegion(ulong regionhandle, LLUUID primID, LLVector3 position, bool isPhysical) | ||
239 | { | ||
240 | return m_commsProvider.InterRegion.ExpectPrimCrossing(regionhandle, primID, position, isPhysical); | ||
241 | } | ||
242 | |||
225 | public void CloseChildAgentConnections(ScenePresence presence) | 243 | public void CloseChildAgentConnections(ScenePresence presence) |
226 | { | 244 | { |
227 | foreach (ulong regionHandle in presence.KnownChildRegions) | 245 | foreach (ulong regionHandle in presence.KnownChildRegions) |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index ea8d5c4..be21748 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
69 | private bool m_newForce = false; | 69 | private bool m_newForce = false; |
70 | private bool m_newAvatar = false; | 70 | private bool m_newAvatar = false; |
71 | private bool m_newCoarseLocations = true; | 71 | private bool m_newCoarseLocations = true; |
72 | private bool m_gotAllObjectsInScene = false; | ||
72 | private float m_avHeight = 127.0f; | 73 | private float m_avHeight = 127.0f; |
73 | 74 | ||
74 | protected RegionInfo m_regionInfo; | 75 | protected RegionInfo m_regionInfo; |
@@ -327,7 +328,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
327 | // this.UpdateQuadTreeNode(); | 328 | // this.UpdateQuadTreeNode(); |
328 | //this.RefreshQuadObject(); | 329 | //this.RefreshQuadObject(); |
329 | //} | 330 | //} |
330 | 331 | if (!m_gotAllObjectsInScene) | |
332 | { | ||
333 | if (!m_isChildAgent || m_scene.m_sendTasksToChild) | ||
334 | { | ||
335 | m_scene.SendAllSceneObjectsToClient(this); | ||
336 | m_gotAllObjectsInScene = true; | ||
337 | } | ||
338 | } | ||
331 | if (m_partsUpdateQueue.Count > 0) | 339 | if (m_partsUpdateQueue.Count > 0) |
332 | { | 340 | { |
333 | bool runUpdate = true; | 341 | bool runUpdate = true; |
@@ -400,7 +408,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
400 | AddToPhysicalScene(); | 408 | AddToPhysicalScene(); |
401 | m_physicsActor.Flying = isFlying; | 409 | m_physicsActor.Flying = isFlying; |
402 | 410 | ||
403 | m_scene.SendAllSceneObjectsToClient(this); | 411 | if (!m_gotAllObjectsInScene) |
412 | { | ||
413 | m_scene.SendAllSceneObjectsToClient(this); | ||
414 | m_gotAllObjectsInScene = true; | ||
415 | } | ||
416 | |||
404 | } | 417 | } |
405 | 418 | ||
406 | public void MakeChildAgent() | 419 | public void MakeChildAgent() |
@@ -409,7 +422,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
409 | m_isChildAgent = true; | 422 | m_isChildAgent = true; |
410 | 423 | ||
411 | RemoveFromPhysicalScene(); | 424 | RemoveFromPhysicalScene(); |
412 | 425 | ||
413 | //this.Pos = new LLVector3(128, 128, 70); | 426 | //this.Pos = new LLVector3(128, 128, 70); |
414 | } | 427 | } |
415 | 428 | ||
@@ -952,7 +965,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
952 | SendFullUpdateToOtherClient(avatar); | 965 | SendFullUpdateToOtherClient(avatar); |
953 | if (avatar.LocalId != LocalId) | 966 | if (avatar.LocalId != LocalId) |
954 | { | 967 | { |
955 | if (!avatar.m_isChildAgent) | 968 | if (!avatar.m_isChildAgent || m_scene.m_sendTasksToChild) |
956 | { | 969 | { |
957 | avatar.SendFullUpdateToOtherClient(this); | 970 | avatar.SendFullUpdateToOtherClient(this); |
958 | avatar.SendAppearanceToOtherAgent(this); | 971 | avatar.SendAppearanceToOtherAgent(this); |
@@ -985,7 +998,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
985 | public void SendOwnAppearance( ) | 998 | public void SendOwnAppearance( ) |
986 | { | 999 | { |
987 | SendOwnWearables( ); | 1000 | SendOwnWearables( ); |
1001 | |||
1002 | //Ugly hack x.x - Trap set appearence to send all objects in this scene! | ||
1003 | |||
988 | m_scene.SendAllSceneObjectsToClient(this); | 1004 | m_scene.SendAllSceneObjectsToClient(this); |
1005 | m_gotAllObjectsInScene = true; | ||
989 | // TODO: remove this once the SunModule is slightly more tested | 1006 | // TODO: remove this once the SunModule is slightly more tested |
990 | // m_controllingClient.SendViewerTime(m_scene.TimePhase); | 1007 | // m_controllingClient.SendViewerTime(m_scene.TimePhase); |
991 | } | 1008 | } |
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs index b501baf..389ba47 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs | |||
@@ -44,8 +44,8 @@ namespace SimpleApp | |||
44 | 44 | ||
45 | public MyWorld(RegionInfo regionInfo, AgentCircuitManager authen, PermissionManager permissionManager, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | 45 | public MyWorld(RegionInfo regionInfo, AgentCircuitManager authen, PermissionManager permissionManager, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, |
46 | AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer, | 46 | AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer, |
47 | ModuleLoader moduleLoader, bool physicalPrim) | 47 | ModuleLoader moduleLoader, bool physicalPrim, bool ChildGetTasks) |
48 | : base(regionInfo, authen, permissionManager, commsMan, sceneGridService, assetCach, storeMan, httpServer, moduleLoader, false, true) | 48 | : base(regionInfo, authen, permissionManager, commsMan, sceneGridService, assetCach, storeMan, httpServer, moduleLoader, false, true, false) |
49 | { | 49 | { |
50 | m_avatars = new List<Avatar>(); | 50 | m_avatars = new List<Avatar>(); |
51 | } | 51 | } |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 10b6258..7ed58f5 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -173,7 +173,7 @@ namespace SimpleApp | |||
173 | SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); | 173 | SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); |
174 | return | 174 | return |
175 | new MyWorld(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, | 175 | new MyWorld(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, |
176 | new ModuleLoader(m_log, m_config), true); | 176 | new ModuleLoader(m_log, m_config), true, false); |
177 | } | 177 | } |
178 | 178 | ||
179 | protected override StorageManager CreateStorageManager(string connectionstring) | 179 | protected override StorageManager CreateStorageManager(string connectionstring) |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 84ff60c..ec7d04d 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -604,7 +604,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
604 | public IntPtr calculateSpaceForGeom(PhysicsVector pos) | 604 | public IntPtr calculateSpaceForGeom(PhysicsVector pos) |
605 | { | 605 | { |
606 | int[] xyspace = calculateSpaceArrayItemFromPos(pos); | 606 | int[] xyspace = calculateSpaceArrayItemFromPos(pos); |
607 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); | 607 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); |
608 | IntPtr locationbasedspace = staticPrimspace[xyspace[0],xyspace[1]]; | 608 | IntPtr locationbasedspace = staticPrimspace[xyspace[0],xyspace[1]]; |
609 | 609 | ||
610 | //locationbasedspace = space; | 610 | //locationbasedspace = space; |