aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/LandManagement/Land.cs
diff options
context:
space:
mode:
authorlbsa712007-07-26 14:55:42 +0000
committerlbsa712007-07-26 14:55:42 +0000
commit39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6 (patch)
tree81ab89a9749577c6fa1a3a19c1ed09c1942ec201 /OpenSim/Region/Environment/LandManagement/Land.cs
parentAdded the default shape to the OpenSim library. Now need to get the new ruth ... (diff)
downloadopensim-SC-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.zip
opensim-SC-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.tar.gz
opensim-SC-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.tar.bz2
opensim-SC-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.tar.xz
* Started renaming world to Scene
* Update and UpdateMovement now first stores array to avoid collection update exceptions * Ignored some bins
Diffstat (limited to 'OpenSim/Region/Environment/LandManagement/Land.cs')
-rw-r--r--OpenSim/Region/Environment/LandManagement/Land.cs33
1 files changed, 18 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs
index bae3b0e..625b176 100644
--- a/OpenSim/Region/Environment/LandManagement/Land.cs
+++ b/OpenSim/Region/Environment/LandManagement/Land.cs
@@ -18,7 +18,7 @@ namespace OpenSim.Region.Environment.LandManagement
18 public LandData landData = new LandData(); 18 public LandData landData = new LandData();
19 public List<SceneObject> primsOverMe = new List<SceneObject>(); 19 public List<SceneObject> primsOverMe = new List<SceneObject>();
20 20
21 public Scene m_world; 21 public Scene m_scene;
22 22
23 private bool[,] landBitmap = new bool[64, 64]; 23 private bool[,] landBitmap = new bool[64, 64];
24 24
@@ -26,9 +26,9 @@ namespace OpenSim.Region.Environment.LandManagement
26 26
27 27
28 #region Constructors 28 #region Constructors
29 public Land(LLUUID owner_id, bool is_group_owned, Scene world) 29 public Land(LLUUID owner_id, bool is_group_owned, Scene scene)
30 { 30 {
31 m_world = world; 31 m_scene = scene;
32 landData.ownerID = owner_id; 32 landData.ownerID = owner_id;
33 landData.isGroupOwned = is_group_owned; 33 landData.isGroupOwned = is_group_owned;
34 34
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Environment.LandManagement
59 59
60 public Land Copy() 60 public Land Copy()
61 { 61 {
62 Land newLand = new Land(this.landData.ownerID, this.landData.isGroupOwned, m_world); 62 Land newLand = new Land(this.landData.ownerID, this.landData.isGroupOwned, m_scene);
63 63
64 //Place all new variables here! 64 //Place all new variables here!
65 newLand.landBitmap = (bool[,])(this.landBitmap.Clone()); 65 newLand.landBitmap = (bool[,])(this.landBitmap.Clone());
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Environment.LandManagement
101 updatePacket.ParcelData.LocalID = landData.localID; 101 updatePacket.ParcelData.LocalID = landData.localID;
102 if (landData.area > 0) 102 if (landData.area > 0)
103 { 103 {
104 updatePacket.ParcelData.MaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor))); 104 updatePacket.ParcelData.MaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_scene.RegionInfo.estateSettings.objectBonusFactor)));
105 } 105 }
106 else 106 else
107 { 107 {
@@ -118,14 +118,17 @@ namespace OpenSim.Region.Environment.LandManagement
118 updatePacket.ParcelData.OwnerID = landData.ownerID; 118 updatePacket.ParcelData.OwnerID = landData.ownerID;
119 updatePacket.ParcelData.OwnerPrims = landData.ownerPrims; 119 updatePacket.ParcelData.OwnerPrims = landData.ownerPrims;
120 updatePacket.ParcelData.ParcelFlags = landData.landFlags; 120 updatePacket.ParcelData.ParcelFlags = landData.landFlags;
121 updatePacket.ParcelData.ParcelPrimBonus = m_world.RegionInfo.estateSettings.objectBonusFactor; 121 updatePacket.ParcelData.ParcelPrimBonus = m_scene.RegionInfo.estateSettings.objectBonusFactor;
122 updatePacket.ParcelData.PassHours = landData.passHours; 122 updatePacket.ParcelData.PassHours = landData.passHours;
123 updatePacket.ParcelData.PassPrice = landData.passPrice; 123 updatePacket.ParcelData.PassPrice = landData.passPrice;
124 updatePacket.ParcelData.PublicCount = 0; //unemplemented 124 updatePacket.ParcelData.PublicCount = 0; //unemplemented
125 updatePacket.ParcelData.RegionDenyAnonymous = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0); 125
126 updatePacket.ParcelData.RegionDenyIdentified = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0); 126 uint regionFlags = (uint)m_scene.RegionInfo.estateSettings.regionFlags;
127 updatePacket.ParcelData.RegionDenyTransacted = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0); 127 updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0);
128 updatePacket.ParcelData.RegionPushOverride = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0); 128 updatePacket.ParcelData.RegionDenyIdentified = ((regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0);
129 updatePacket.ParcelData.RegionDenyTransacted = ((regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0);
130 updatePacket.ParcelData.RegionPushOverride = ((regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0);
131
129 updatePacket.ParcelData.RentPrice = 0; 132 updatePacket.ParcelData.RentPrice = 0;
130 updatePacket.ParcelData.RequestResult = request_result; 133 updatePacket.ParcelData.RequestResult = request_result;
131 updatePacket.ParcelData.SalePrice = landData.salePrice; 134 updatePacket.ParcelData.SalePrice = landData.salePrice;
@@ -134,7 +137,7 @@ namespace OpenSim.Region.Environment.LandManagement
134 updatePacket.ParcelData.SequenceID = sequence_id; 137 updatePacket.ParcelData.SequenceID = sequence_id;
135 if (landData.simwideArea > 0) 138 if (landData.simwideArea > 0)
136 { 139 {
137 updatePacket.ParcelData.SimWideMaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.simwideArea) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor))); 140 updatePacket.ParcelData.SimWideMaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.simwideArea) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_scene.RegionInfo.estateSettings.objectBonusFactor)));
138 } 141 }
139 else 142 else
140 { 143 {
@@ -180,10 +183,10 @@ namespace OpenSim.Region.Environment.LandManagement
180 183
181 public void sendLandUpdateToAvatarsOverMe() 184 public void sendLandUpdateToAvatarsOverMe()
182 { 185 {
183 List<ScenePresence> avatars = m_world.RequestAvatarList(); 186 List<ScenePresence> avatars = m_scene.RequestAvatarList();
184 for (int i = 0; i < avatars.Count; i++) 187 for (int i = 0; i < avatars.Count; i++)
185 { 188 {
186 Land over = m_world.LandManager.getLandObject((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y)); 189 Land over = m_scene.LandManager.getLandObject((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y));
187 if (over.landData.localID == this.landData.localID) 190 if (over.landData.localID == this.landData.localID)
188 { 191 {
189 sendLandProperties(0, false, 0, avatars[i].ControllingClient); 192 sendLandProperties(0, false, 0, avatars[i].ControllingClient);
@@ -219,8 +222,8 @@ namespace OpenSim.Region.Environment.LandManagement
219 } 222 }
220 } 223 }
221 } 224 }
222 landData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_world.Terrain.GetHeight((min_x * 4), (min_y * 4))); 225 landData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_scene.Terrain.GetHeight((min_x * 4), (min_y * 4)));
223 landData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_world.Terrain.GetHeight((max_x * 4), (max_y * 4))); 226 landData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_scene.Terrain.GetHeight((max_x * 4), (max_y * 4)));
224 landData.area = tempArea; 227 landData.area = tempArea;
225 } 228 }
226 229