diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/CoreModules/World/Land/LandObject.cs | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandObject.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 4cbc8b8..fc2282d 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
75 | return free; | 75 | return free; |
76 | } | 76 | } |
77 | 77 | ||
78 | protected LandData m_landData; | 78 | protected LandData m_landData; |
79 | public LandData LandData | 79 | public LandData LandData |
80 | { | 80 | { |
81 | get { return m_landData; } | 81 | get { return m_landData; } |
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
196 | else if(testpos.Y >= maxy) | 196 | else if(testpos.Y >= maxy) |
197 | return null; // will never get there | 197 | return null; // will never get there |
198 | } | 198 | } |
199 | 199 | ||
200 | while(!LandBitmap[(int)testpos.X, (int)testpos.Y]) | 200 | while(!LandBitmap[(int)testpos.X, (int)testpos.Y]) |
201 | { | 201 | { |
202 | testpos += direction; | 202 | testpos += direction; |
@@ -278,14 +278,14 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
278 | else | 278 | else |
279 | LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit]; | 279 | LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit]; |
280 | 280 | ||
281 | LandData = new LandData(); | 281 | LandData = new LandData(); |
282 | LandData.OwnerID = owner_id; | 282 | LandData.OwnerID = owner_id; |
283 | if (is_group_owned) | 283 | if (is_group_owned) |
284 | LandData.GroupID = owner_id; | 284 | LandData.GroupID = owner_id; |
285 | else | 285 | else |
286 | LandData.GroupID = UUID.Zero; | 286 | LandData.GroupID = UUID.Zero; |
287 | LandData.IsGroupOwned = is_group_owned; | 287 | LandData.IsGroupOwned = is_group_owned; |
288 | 288 | ||
289 | m_scene.EventManager.OnFrame += OnFrame; | 289 | m_scene.EventManager.OnFrame += OnFrame; |
290 | } | 290 | } |
291 | 291 | ||
@@ -294,7 +294,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
294 | #region Member Functions | 294 | #region Member Functions |
295 | 295 | ||
296 | #region General Functions | 296 | #region General Functions |
297 | 297 | ||
298 | /// <summary> | 298 | /// <summary> |
299 | /// Checks to see if this land object contains a point | 299 | /// Checks to see if this land object contains a point |
300 | /// </summary> | 300 | /// </summary> |
@@ -373,12 +373,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
373 | 373 | ||
374 | if(simMax > m_scene.RegionInfo.ObjectCapacity) | 374 | if(simMax > m_scene.RegionInfo.ObjectCapacity) |
375 | simMax = m_scene.RegionInfo.ObjectCapacity; | 375 | simMax = m_scene.RegionInfo.ObjectCapacity; |
376 | //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}, SimWidePrims {3}", | 376 | //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}, SimWidePrims {3}", |
377 | // LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax, LandData.SimwidePrims); | 377 | // LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax, LandData.SimwidePrims); |
378 | return simMax; | 378 | return simMax; |
379 | } | 379 | } |
380 | } | 380 | } |
381 | 381 | ||
382 | #endregion | 382 | #endregion |
383 | 383 | ||
384 | #region Packet Request Handling | 384 | #region Packet Request Handling |
@@ -552,7 +552,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
552 | needOverlay = true; | 552 | needOverlay = true; |
553 | 553 | ||
554 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); | 554 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); |
555 | return true; | 555 | return true; |
556 | } | 556 | } |
557 | return false; | 557 | return false; |
558 | } | 558 | } |
@@ -720,11 +720,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
720 | 720 | ||
721 | if(sp==null || !sp.isNPC) | 721 | if(sp==null || !sp.isNPC) |
722 | return true; | 722 | return true; |
723 | 723 | ||
724 | INPC npccli = (INPC)sp.ControllingClient; | 724 | INPC npccli = (INPC)sp.ControllingClient; |
725 | if(npccli== null) | 725 | if(npccli== null) |
726 | return true; | 726 | return true; |
727 | 727 | ||
728 | UUID owner = npccli.Owner; | 728 | UUID owner = npccli.Owner; |
729 | 729 | ||
730 | if(owner == UUID.Zero) | 730 | if(owner == UUID.Zero) |
@@ -898,7 +898,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
898 | // update use lists flags | 898 | // update use lists flags |
899 | // rights already checked or we wont be here | 899 | // rights already checked or we wont be here |
900 | uint parcelflags = newData.Flags; | 900 | uint parcelflags = newData.Flags; |
901 | 901 | ||
902 | if((flags & (uint)AccessList.Access) != 0) | 902 | if((flags & (uint)AccessList.Access) != 0) |
903 | parcelflags |= (uint)ParcelFlags.UseAccessList; | 903 | parcelflags |= (uint)ParcelFlags.UseAccessList; |
904 | if((flags & (uint)AccessList.Ban) != 0) | 904 | if((flags & (uint)AccessList.Ban) != 0) |
@@ -1024,7 +1024,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1024 | LandData.AABBMin = new Vector3(tx, ty, 0f); | 1024 | LandData.AABBMin = new Vector3(tx, ty, 0f); |
1025 | else | 1025 | else |
1026 | LandData.AABBMin = new Vector3(tx, ty, (float)m_scene.Heightmap[tx, ty]); | 1026 | LandData.AABBMin = new Vector3(tx, ty, (float)m_scene.Heightmap[tx, ty]); |
1027 | 1027 | ||
1028 | max_x++; | 1028 | max_x++; |
1029 | tx = max_x * landUnit; | 1029 | tx = max_x * landUnit; |
1030 | if (tx > regionSizeX) | 1030 | if (tx > regionSizeX) |
@@ -1042,7 +1042,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1042 | LandData.AABBMax = new Vector3(tx, ty, 0f); | 1042 | LandData.AABBMax = new Vector3(tx, ty, 0f); |
1043 | else | 1043 | else |
1044 | LandData.AABBMax = new Vector3(tx, ty, (float)m_scene.Heightmap[tx - 1, ty - 1]); | 1044 | LandData.AABBMax = new Vector3(tx, ty, (float)m_scene.Heightmap[tx - 1, ty - 1]); |
1045 | 1045 | ||
1046 | LandData.Area = tempArea * landUnit * landUnit; | 1046 | LandData.Area = tempArea * landUnit * landUnit; |
1047 | } | 1047 | } |
1048 | 1048 | ||
@@ -1073,7 +1073,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1073 | { | 1073 | { |
1074 | return GetSquareLandBitmap(0, 0, (int)m_scene.RegionInfo.RegionSizeX, (int) m_scene.RegionInfo.RegionSizeY, true); | 1074 | return GetSquareLandBitmap(0, 0, (int)m_scene.RegionInfo.RegionSizeX, (int) m_scene.RegionInfo.RegionSizeY, true); |
1075 | } | 1075 | } |
1076 | 1076 | ||
1077 | public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true) | 1077 | public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true) |
1078 | { | 1078 | { |
1079 | // Empty bitmap for the whole region | 1079 | // Empty bitmap for the whole region |
@@ -1317,7 +1317,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1317 | /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param> | 1317 | /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param> |
1318 | /// <param name="AABBMin">out: parcel.AABBMin <x,y,0></param> | 1318 | /// <param name="AABBMin">out: parcel.AABBMin <x,y,0></param> |
1319 | /// <param name="AABBMax">out: parcel.AABBMax <x,y,0></param> | 1319 | /// <param name="AABBMax">out: parcel.AABBMax <x,y,0></param> |
1320 | /// <returns>New parcel bitmap</returns> | 1320 | /// <returns>New parcel bitmap</returns> |
1321 | public bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax) | 1321 | public bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax) |
1322 | { | 1322 | { |
1323 | // get the size of the incoming bitmaps | 1323 | // get the size of the incoming bitmaps |
@@ -1409,7 +1409,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1409 | // Importing land parcel data from an OAR where the source region is a different size to the dest region requires us | 1409 | // Importing land parcel data from an OAR where the source region is a different size to the dest region requires us |
1410 | // to make a LandBitmap that's not derived from the current region's size. We use the LandData.Bitmap size in bytes | 1410 | // to make a LandBitmap that's not derived from the current region's size. We use the LandData.Bitmap size in bytes |
1411 | // to figure out what the OAR's region dimensions are. (Is there a better way to get the src region x and y from the OAR?) | 1411 | // to figure out what the OAR's region dimensions are. (Is there a better way to get the src region x and y from the OAR?) |
1412 | // This method assumes we always will have square regions | 1412 | // This method assumes we always will have square regions |
1413 | 1413 | ||
1414 | bitmapLen = LandData.Bitmap.Length; | 1414 | bitmapLen = LandData.Bitmap.Length; |
1415 | xLen = (int)Math.Abs(Math.Sqrt(bitmapLen * 8)); | 1415 | xLen = (int)Math.Abs(Math.Sqrt(bitmapLen * 8)); |
@@ -1550,9 +1550,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1550 | lock (primsOverMe) | 1550 | lock (primsOverMe) |
1551 | { | 1551 | { |
1552 | // m_log.DebugFormat( | 1552 | // m_log.DebugFormat( |
1553 | // "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region", | 1553 | // "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region", |
1554 | // remote_client.Name, primsOverMe.Count); | 1554 | // remote_client.Name, primsOverMe.Count); |
1555 | 1555 | ||
1556 | try | 1556 | try |
1557 | { | 1557 | { |
1558 | foreach (SceneObjectGroup obj in primsOverMe) | 1558 | foreach (SceneObjectGroup obj in primsOverMe) |
@@ -1593,7 +1593,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1593 | public Dictionary<UUID, int> GetLandObjectOwners() | 1593 | public Dictionary<UUID, int> GetLandObjectOwners() |
1594 | { | 1594 | { |
1595 | Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); | 1595 | Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); |
1596 | 1596 | ||
1597 | lock (primsOverMe) | 1597 | lock (primsOverMe) |
1598 | { | 1598 | { |
1599 | try | 1599 | try |
@@ -1669,7 +1669,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1669 | { | 1669 | { |
1670 | // m_log.DebugFormat( | 1670 | // m_log.DebugFormat( |
1671 | // "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name); | 1671 | // "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name); |
1672 | 1672 | ||
1673 | Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>(); | 1673 | Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>(); |
1674 | 1674 | ||
1675 | lock (primsOverMe) | 1675 | lock (primsOverMe) |
@@ -1752,7 +1752,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1752 | public void AddPrimOverMe(SceneObjectGroup obj) | 1752 | public void AddPrimOverMe(SceneObjectGroup obj) |
1753 | { | 1753 | { |
1754 | // m_log.DebugFormat("[LAND OBJECT]: Adding scene object {0} {1} over {2}", obj.Name, obj.LocalId, LandData.Name); | 1754 | // m_log.DebugFormat("[LAND OBJECT]: Adding scene object {0} {1} over {2}", obj.Name, obj.LocalId, LandData.Name); |
1755 | 1755 | ||
1756 | lock (primsOverMe) | 1756 | lock (primsOverMe) |
1757 | primsOverMe.Add(obj); | 1757 | primsOverMe.Add(obj); |
1758 | } | 1758 | } |
@@ -1760,13 +1760,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1760 | public void RemovePrimFromOverMe(SceneObjectGroup obj) | 1760 | public void RemovePrimFromOverMe(SceneObjectGroup obj) |
1761 | { | 1761 | { |
1762 | // m_log.DebugFormat("[LAND OBJECT]: Removing scene object {0} {1} from over {2}", obj.Name, obj.LocalId, LandData.Name); | 1762 | // m_log.DebugFormat("[LAND OBJECT]: Removing scene object {0} {1} from over {2}", obj.Name, obj.LocalId, LandData.Name); |
1763 | 1763 | ||
1764 | lock (primsOverMe) | 1764 | lock (primsOverMe) |
1765 | primsOverMe.Remove(obj); | 1765 | primsOverMe.Remove(obj); |
1766 | } | 1766 | } |
1767 | 1767 | ||
1768 | #endregion | 1768 | #endregion |
1769 | 1769 | ||
1770 | /// <summary> | 1770 | /// <summary> |
1771 | /// Set the media url for this land parcel | 1771 | /// Set the media url for this land parcel |
1772 | /// </summary> | 1772 | /// </summary> |
@@ -1777,7 +1777,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1777 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData); | 1777 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData); |
1778 | SendLandUpdateToAvatarsOverMe(); | 1778 | SendLandUpdateToAvatarsOverMe(); |
1779 | } | 1779 | } |
1780 | 1780 | ||
1781 | /// <summary> | 1781 | /// <summary> |
1782 | /// Set the music url for this land parcel | 1782 | /// Set the music url for this land parcel |
1783 | /// </summary> | 1783 | /// </summary> |
@@ -1824,7 +1824,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1824 | { | 1824 | { |
1825 | LandData.ParcelAccessList.Remove(entry); | 1825 | LandData.ParcelAccessList.Remove(entry); |
1826 | ScenePresence presence; | 1826 | ScenePresence presence; |
1827 | 1827 | ||
1828 | if (m_scene.TryGetScenePresence(entry.AgentID, out presence) && (!presence.IsChildAgent)) | 1828 | if (m_scene.TryGetScenePresence(entry.AgentID, out presence) && (!presence.IsChildAgent)) |
1829 | { | 1829 | { |
1830 | ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); | 1830 | ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); |