diff options
author | mingchen | 2007-07-16 18:45:19 +0000 |
---|---|---|
committer | mingchen | 2007-07-16 18:45:19 +0000 |
commit | 7fabf9612a539e96c67a7e6a460f200d20cfeff6 (patch) | |
tree | 45a10ed5ba61dfc1d96d9840e1fbef84c195edfd /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | * Since we're discussing it, applying the m_ convention on some members... (diff) | |
download | opensim-SC_OLD-7fabf9612a539e96c67a7e6a460f200d20cfeff6.zip opensim-SC_OLD-7fabf9612a539e96c67a7e6a460f200d20cfeff6.tar.gz opensim-SC_OLD-7fabf9612a539e96c67a7e6a460f200d20cfeff6.tar.bz2 opensim-SC_OLD-7fabf9612a539e96c67a7e6a460f200d20cfeff6.tar.xz |
*Renamed ParcelManager to LandManager
*Made the Parcel class its own file and moved the Parcel and LandManager into their own folder in Environment
*Some renaming might need to be done so the Parcel class doesn't have issues with the libsecondlife Parcel class, but Land doesn't seem right.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index a06d74d..5689308 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -45,6 +45,8 @@ using OpenSim.Region.Terrain; | |||
45 | using Caps = OpenSim.Region.Capabilities.Caps; | 45 | using Caps = OpenSim.Region.Capabilities.Caps; |
46 | using Timer = System.Timers.Timer; | 46 | using Timer = System.Timers.Timer; |
47 | 47 | ||
48 | using OpenSim.Region.Environment.Parcels; | ||
49 | |||
48 | namespace OpenSim.Region.Environment.Scenes | 50 | namespace OpenSim.Region.Environment.Scenes |
49 | { | 51 | { |
50 | public delegate bool FilterAvatarList(ScenePresence avatar); | 52 | public delegate bool FilterAvatarList(ScenePresence avatar); |
@@ -88,10 +90,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
88 | } | 90 | } |
89 | } | 91 | } |
90 | 92 | ||
91 | private ParcelManager m_parcelManager; | 93 | private LandManager m_LandManager; |
92 | public ParcelManager ParcelManager | 94 | public LandManager LandManager |
93 | { | 95 | { |
94 | get { return m_parcelManager; } | 96 | get { return m_LandManager; } |
95 | } | 97 | } |
96 | 98 | ||
97 | private EstateManager m_estateManager; | 99 | private EstateManager m_estateManager; |
@@ -139,12 +141,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
139 | this.m_datastore = m_regInfo.DataStore; | 141 | this.m_datastore = m_regInfo.DataStore; |
140 | this.RegisterRegionWithComms(); | 142 | this.RegisterRegionWithComms(); |
141 | 143 | ||
142 | m_parcelManager = new ParcelManager(this, this.m_regInfo); | 144 | m_LandManager = new LandManager(this, this.m_regInfo); |
143 | m_estateManager = new EstateManager(this, this.m_regInfo); | 145 | m_estateManager = new EstateManager(this, this.m_regInfo); |
144 | m_scriptManager = new ScriptManager(this); | 146 | m_scriptManager = new ScriptManager(this); |
145 | m_eventManager = new EventManager(); | 147 | m_eventManager = new EventManager(); |
146 | 148 | ||
147 | m_eventManager.OnParcelPrimCountAdd += new EventManager.OnParcelPrimCountAddDelegate(m_parcelManager.addPrimToParcelCounts); | 149 | m_eventManager.OnParcelPrimCountAdd += new EventManager.OnParcelPrimCountAddDelegate(m_LandManager.addPrimToParcelCounts); |
148 | 150 | ||
149 | MainLog.Instance.Verbose("World.cs - creating new entitities instance"); | 151 | MainLog.Instance.Verbose("World.cs - creating new entitities instance"); |
150 | Entities = new Dictionary<LLUUID, EntityBase>(); | 152 | Entities = new Dictionary<LLUUID, EntityBase>(); |
@@ -245,7 +247,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
245 | this.parcelPrimCheckCount++; | 247 | this.parcelPrimCheckCount++; |
246 | if (this.parcelPrimCheckCount > 50) //check every 5 seconds for tainted prims | 248 | if (this.parcelPrimCheckCount > 50) //check every 5 seconds for tainted prims |
247 | { | 249 | { |
248 | if (m_parcelManager.parcelPrimCountTainted) | 250 | if (m_LandManager.parcelPrimCountTainted) |
249 | { | 251 | { |
250 | //Perform parcel update of prim count | 252 | //Perform parcel update of prim count |
251 | performParcelPrimCountUpdate(); | 253 | performParcelPrimCountUpdate(); |
@@ -511,9 +513,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
511 | { | 513 | { |
512 | if (this.Entities.ContainsKey(sceneObject.rootUUID)) | 514 | if (this.Entities.ContainsKey(sceneObject.rootUUID)) |
513 | { | 515 | { |
514 | m_parcelManager.removePrimFromParcelCounts(sceneObject); | 516 | m_LandManager.removePrimFromParcelCounts(sceneObject); |
515 | this.Entities.Remove(sceneObject.rootUUID); | 517 | this.Entities.Remove(sceneObject.rootUUID); |
516 | m_parcelManager.setPrimsTainted(); | 518 | m_LandManager.setPrimsTainted(); |
517 | } | 519 | } |
518 | } | 520 | } |
519 | 521 | ||
@@ -523,7 +525,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
523 | /// <param name="prim"></param> | 525 | /// <param name="prim"></param> |
524 | public void AcknowledgeNewPrim(Primitive prim) | 526 | public void AcknowledgeNewPrim(Primitive prim) |
525 | { | 527 | { |
526 | prim.OnPrimCountTainted += m_parcelManager.setPrimsTainted; | 528 | prim.OnPrimCountTainted += m_LandManager.setPrimsTainted; |
527 | } | 529 | } |
528 | #endregion | 530 | #endregion |
529 | 531 | ||
@@ -540,7 +542,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
540 | SubscribeToClientEvents(client); | 542 | SubscribeToClientEvents(client); |
541 | this.m_estateManager.sendRegionHandshake(client); | 543 | this.m_estateManager.sendRegionHandshake(client); |
542 | CreateAndAddScenePresence(client); | 544 | CreateAndAddScenePresence(client); |
543 | this.m_parcelManager.sendParcelOverlay(client); | 545 | this.m_LandManager.sendParcelOverlay(client); |
544 | 546 | ||
545 | } | 547 | } |
546 | 548 | ||
@@ -571,12 +573,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
571 | client.OnLinkObjects += this.LinkObjects; | 573 | client.OnLinkObjects += this.LinkObjects; |
572 | client.OnObjectDuplicate += this.DuplicateObject; | 574 | client.OnObjectDuplicate += this.DuplicateObject; |
573 | 575 | ||
574 | client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_parcelManager.handleParcelPropertiesRequest); | 576 | client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_LandManager.handleParcelPropertiesRequest); |
575 | client.OnParcelDivideRequest += new ParcelDivideRequest(m_parcelManager.handleParcelDivideRequest); | 577 | client.OnParcelDivideRequest += new ParcelDivideRequest(m_LandManager.handleParcelDivideRequest); |
576 | client.OnParcelJoinRequest += new ParcelJoinRequest(m_parcelManager.handleParcelJoinRequest); | 578 | client.OnParcelJoinRequest += new ParcelJoinRequest(m_LandManager.handleParcelJoinRequest); |
577 | client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(m_parcelManager.handleParcelPropertiesUpdateRequest); | 579 | client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(m_LandManager.handleParcelPropertiesUpdateRequest); |
578 | client.OnParcelSelectObjects += new ParcelSelectObjects(m_parcelManager.handleParcelSelectObjectsRequest); | 580 | client.OnParcelSelectObjects += new ParcelSelectObjects(m_LandManager.handleParcelSelectObjectsRequest); |
579 | client.OnParcelObjectOwnerRequest += new ParcelObjectOwnerRequest(m_parcelManager.handleParcelObjectOwnersRequest); | 581 | client.OnParcelObjectOwnerRequest += new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest); |
580 | 582 | ||
581 | client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); | 583 | client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); |
582 | 584 | ||
@@ -619,7 +621,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
619 | this.Avatars.Add(client.AgentId, newAvatar); | 621 | this.Avatars.Add(client.AgentId, newAvatar); |
620 | } | 622 | } |
621 | } | 623 | } |
622 | newAvatar.OnSignificantClientMovement += m_parcelManager.handleSignificantClientMovement; | 624 | newAvatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement; |
623 | return newAvatar; | 625 | return newAvatar; |
624 | } | 626 | } |
625 | 627 | ||
@@ -908,10 +910,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
908 | 910 | ||
909 | public void performParcelPrimCountUpdate() | 911 | public void performParcelPrimCountUpdate() |
910 | { | 912 | { |
911 | m_parcelManager.resetAllParcelPrimCounts(); | 913 | m_LandManager.resetAllParcelPrimCounts(); |
912 | m_eventManager.TriggerParcelPrimCountUpdate(); | 914 | m_eventManager.TriggerParcelPrimCountUpdate(); |
913 | m_parcelManager.finalizeParcelPrimCountUpdate(); | 915 | m_LandManager.finalizeParcelPrimCountUpdate(); |
914 | m_parcelManager.parcelPrimCountTainted = false; | 916 | m_LandManager.parcelPrimCountTainted = false; |
915 | } | 917 | } |
916 | #endregion | 918 | #endregion |
917 | 919 | ||