diff options
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EntityBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 27 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 1 | ||||
-rw-r--r-- | ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs | 14 |
5 files changed, 25 insertions, 29 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 2a8c1e9..670ca13 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
46 | get { return m_scene; } | 46 | get { return m_scene; } |
47 | } | 47 | } |
48 | 48 | ||
49 | public LLUUID m_uuid; | 49 | protected LLUUID m_uuid; |
50 | 50 | ||
51 | public virtual LLUUID UUID | 51 | public virtual LLUUID UUID |
52 | { | 52 | { |
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 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 47c4567..e295f87 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -123,7 +123,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
123 | 123 | ||
124 | public override LLVector3 AbsolutePosition | 124 | public override LLVector3 AbsolutePosition |
125 | { | 125 | { |
126 | get { return m_rootPart.GroupPosition; } | 126 | get |
127 | { | ||
128 | if( m_rootPart == null ) | ||
129 | { | ||
130 | throw new NullReferenceException(string.Format("Object {0} has no root part.", m_uuid)); | ||
131 | } | ||
132 | |||
133 | return m_rootPart.GroupPosition; | ||
134 | } | ||
127 | set | 135 | set |
128 | { | 136 | { |
129 | LLVector3 val = value; | 137 | LLVector3 val = value; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 5b3ea0f..060003e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -270,6 +270,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
270 | m_groupPosition.Y = PhysActor.Position.Y; | 270 | m_groupPosition.Y = PhysActor.Position.Y; |
271 | m_groupPosition.Z = PhysActor.Position.Z; | 271 | m_groupPosition.Z = PhysActor.Position.Z; |
272 | } | 272 | } |
273 | |||
273 | return m_groupPosition; | 274 | return m_groupPosition; |
274 | } | 275 | } |
275 | set | 276 | set |
diff --git a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs index 27fa148..325385a 100644 --- a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs +++ b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs | |||
@@ -438,9 +438,9 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
438 | string filename; | 438 | string filename; |
439 | IClientAPI controller = null; | 439 | IClientAPI controller = null; |
440 | 440 | ||
441 | m_log.InfoFormat("[BALANCER] "+"agent id : {0}", pre.m_uuid); | 441 | m_log.InfoFormat("[BALANCER] "+"agent id : {0}", pre.UUID); |
442 | 442 | ||
443 | uint[] circuits = scene.ClientManager.GetAllCircuits(pre.m_uuid); | 443 | uint[] circuits = scene.ClientManager.GetAllCircuits(pre.UUID); |
444 | 444 | ||
445 | foreach (uint code in circuits) | 445 | foreach (uint code in circuits) |
446 | { | 446 | { |
@@ -535,12 +535,12 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
535 | } | 535 | } |
536 | 536 | ||
537 | sp = (ScenePresence)Util.DeserializeFromFile(filename); | 537 | sp = (ScenePresence)Util.DeserializeFromFile(filename); |
538 | Console.WriteLine("agent id = {0}", sp.m_uuid); | 538 | Console.WriteLine("agent id = {0}", sp.UUID); |
539 | 539 | ||
540 | scene.m_restorePresences.Add(sp.m_uuid, sp); | 540 | scene.m_restorePresences.Add(sp.UUID, sp); |
541 | File.Delete(filename); | 541 | File.Delete(filename); |
542 | 542 | ||
543 | m_log.InfoFormat("[BALANCER] " + "scene presence deserialized [{0}]", sp.m_uuid); | 543 | m_log.InfoFormat("[BALANCER] " + "scene presence deserialized [{0}]", sp.UUID); |
544 | 544 | ||
545 | // restore the ClientView | 545 | // restore the ClientView |
546 | 546 | ||
@@ -645,7 +645,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
645 | // remove all scene presences | 645 | // remove all scene presences |
646 | foreach (ScenePresence pre in presences) | 646 | foreach (ScenePresence pre in presences) |
647 | { | 647 | { |
648 | uint[] circuits = scene.ClientManager.GetAllCircuits(pre.m_uuid); | 648 | uint[] circuits = scene.ClientManager.GetAllCircuits(pre.UUID); |
649 | 649 | ||
650 | foreach (uint code in circuits) | 650 | foreach (uint code in circuits) |
651 | { | 651 | { |
@@ -666,7 +666,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
666 | } | 666 | } |
667 | 667 | ||
668 | // remove scene presence | 668 | // remove scene presence |
669 | scene.RemoveClient(pre.m_uuid); | 669 | scene.RemoveClient(pre.UUID); |
670 | } | 670 | } |
671 | } | 671 | } |
672 | 672 | ||