aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
authorlbsa712008-03-14 15:28:34 +0000
committerlbsa712008-03-14 15:28:34 +0000
commit24aedf52c6b903720f588694880e9613b115cc0c (patch)
tree7b49f8104251eff2c5e961b0134ab3c5c655cd56 /OpenSim/Region/Environment/Scenes/InnerScene.cs
parentAttempt to fix mantis #741, could not replicate it myself. But the error was... (diff)
downloadopensim-SC-24aedf52c6b903720f588694880e9613b115cc0c.zip
opensim-SC-24aedf52c6b903720f588694880e9613b115cc0c.tar.gz
opensim-SC-24aedf52c6b903720f588694880e9613b115cc0c.tar.bz2
opensim-SC-24aedf52c6b903720f588694880e9613b115cc0c.tar.xz
* Added null root part guard
* Normalized some UUID handling * Compacted a few Contains/Add into Set
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs27
1 files changed, 7 insertions, 20 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 053fc85..c75ca81 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -489,40 +489,27 @@ namespace OpenSim.Region.Environment.Scenes
489 if (child) 489 if (child)
490 { 490 {
491 m_numChildAgents++; 491 m_numChildAgents++;
492 m_log.Info("[SCENE]"+ m_regInfo.RegionName + ": Creating new child agent."); 492 m_log.Info("[SCENE]" + m_regInfo.RegionName + ": Creating new child agent.");
493 } 493 }
494 else 494 else
495 { 495 {
496 m_numRootAgents++; 496 m_numRootAgents++;
497 m_log.Info("[SCENE] "+ m_regInfo.RegionName + ": Creating new root agent."); 497 m_log.Info("[SCENE] " + m_regInfo.RegionName + ": Creating new root agent.");
498 m_log.Info("[SCENE] "+ m_regInfo.RegionName + ": Adding Physical agent."); 498 m_log.Info("[SCENE] " + m_regInfo.RegionName + ": Adding Physical agent.");
499 499
500 presence.AddToPhysicalScene(); 500 presence.AddToPhysicalScene();
501 } 501 }
502 502
503 lock (Entities) 503 lock (Entities)
504 { 504 {
505 if (!Entities.ContainsKey(presence.m_uuid)) 505 Entities[presence.UUID] = presence;
506 {
507 Entities.Add(presence.m_uuid, presence);
508 }
509 else
510 {
511 Entities[presence.m_uuid] = presence;
512 }
513 } 506 }
507
514 lock (ScenePresences) 508 lock (ScenePresences)
515 { 509 {
516 if (ScenePresences.ContainsKey(presence.m_uuid)) 510 ScenePresences[presence.UUID] = presence;
517 {
518 ScenePresences[presence.m_uuid] = presence;
519 }
520 else
521 {
522 ScenePresences.Add(presence.m_uuid, presence);
523 }
524 } 511 }
525 } 512 }
526 513
527 public void SwapRootChildAgent(bool direction_RC_CR_T_F) 514 public void SwapRootChildAgent(bool direction_RC_CR_T_F)
528 { 515 {