diff options
author | Adam Frisby | 2008-05-01 16:35:00 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 16:35:00 +0000 |
commit | 13526097f24b7a8ad63b1d482c44b44397fa055f (patch) | |
tree | 7a82c20ed7c63e2aea5ad3863325e37f64e1cbea /OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs | |
parent | * Breaking all the code, breaking all the code..! (diff) | |
download | opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.zip opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.gz opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.bz2 opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.xz |
* Spring cleaning on Region.Environment.
* Converted a large number of read-only fields to be actually, readonly.
* Reformatted code sections.
* Removed redundant code.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs index 9ac3cc3..20d02c4 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs | |||
@@ -44,8 +44,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
44 | //Land types set with flags in ParcelOverlay. | 44 | //Land types set with flags in ParcelOverlay. |
45 | //Only one of these can be used. | 45 | //Only one of these can be used. |
46 | public const float BAN_LINE_SAFETY_HIEGHT = 100; | 46 | public const float BAN_LINE_SAFETY_HIEGHT = 100; |
47 | public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = (byte) 128; //Equals 10000000 | 47 | public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = 128; //Equals 10000000 |
48 | public const byte LAND_FLAG_PROPERTY_BORDER_WEST = (byte) 64; //Equals 01000000 | 48 | public const byte LAND_FLAG_PROPERTY_BORDER_WEST = 64; //Equals 01000000 |
49 | 49 | ||
50 | //RequestResults (I think these are right, they seem to work): | 50 | //RequestResults (I think these are right, they seem to work): |
51 | public const int LAND_RESULT_MULTIPLE = 1; // The request they made contained more than a single peice of land | 51 | public const int LAND_RESULT_MULTIPLE = 1; // The request they made contained more than a single peice of land |
@@ -55,26 +55,26 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
55 | public const int LAND_SELECT_OBJECTS_GROUP = 4; | 55 | public const int LAND_SELECT_OBJECTS_GROUP = 4; |
56 | public const int LAND_SELECT_OBJECTS_OTHER = 8; | 56 | public const int LAND_SELECT_OBJECTS_OTHER = 8; |
57 | public const int LAND_SELECT_OBJECTS_OWNER = 2; | 57 | public const int LAND_SELECT_OBJECTS_OWNER = 2; |
58 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101 | 58 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = 5; //Equals 00000101 |
59 | public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100 | 59 | public const byte LAND_TYPE_IS_FOR_SALE = 4; //Equals 00000100 |
60 | public const byte LAND_TYPE_OWNED_BY_GROUP = (byte) 2; //Equals 00000010 | 60 | public const byte LAND_TYPE_OWNED_BY_GROUP = 2; //Equals 00000010 |
61 | public const byte LAND_TYPE_OWNED_BY_OTHER = (byte) 1; //Equals 00000001 | 61 | public const byte LAND_TYPE_OWNED_BY_OTHER = 1; //Equals 00000001 |
62 | public const byte LAND_TYPE_OWNED_BY_REQUESTER = (byte) 3; //Equals 00000011 | 62 | public const byte LAND_TYPE_OWNED_BY_REQUESTER = 3; //Equals 00000011 |
63 | public const byte LAND_TYPE_PUBLIC = (byte) 0; //Equals 00000000 | 63 | public const byte LAND_TYPE_PUBLIC = 0; //Equals 00000000 |
64 | 64 | ||
65 | //These are other constants. Yay! | 65 | //These are other constants. Yay! |
66 | public const int START_LAND_LOCAL_ID = 1; | 66 | public const int START_LAND_LOCAL_ID = 1; |
67 | 67 | ||
68 | #endregion | 68 | #endregion |
69 | 69 | ||
70 | private int[,] landIDList = new int[64,64]; | 70 | private readonly int[,] landIDList = new int[64,64]; |
71 | private Dictionary<int, ILandObject> landList = new Dictionary<int, ILandObject>(); | 71 | private readonly Dictionary<int, ILandObject> landList = new Dictionary<int, ILandObject>(); |
72 | private readonly Scene m_scene; | ||
72 | 73 | ||
73 | private bool landPrimCountTainted = false; | 74 | private bool landPrimCountTainted; |
74 | private int lastLandLocalID = START_LAND_LOCAL_ID - 1; | 75 | private int lastLandLocalID = START_LAND_LOCAL_ID - 1; |
75 | 76 | ||
76 | private bool m_allowedForcefulBans = true; | 77 | private bool m_allowedForcefulBans = true; |
77 | private Scene m_scene; | ||
78 | 78 | ||
79 | public LandChannel(Scene scene) | 79 | public LandChannel(Scene scene) |
80 | { | 80 | { |
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
192 | { | 192 | { |
193 | lastLandLocalID++; | 193 | lastLandLocalID++; |
194 | new_land.landData.localID = lastLandLocalID; | 194 | new_land.landData.localID = lastLandLocalID; |
195 | landList.Add(lastLandLocalID, (LandObject) new_land.Copy()); | 195 | landList.Add(lastLandLocalID, new_land.Copy()); |
196 | 196 | ||
197 | 197 | ||
198 | bool[,] landBitmap = new_land.getLandBitmap(); | 198 | bool[,] landBitmap = new_land.getLandBitmap(); |
@@ -532,7 +532,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
532 | { | 532 | { |
533 | for (x = 0; x < 64; x++) | 533 | for (x = 0; x < 64; x++) |
534 | { | 534 | { |
535 | byte tempByte = (byte) 0; //This represents the byte for the current 4x4 | 535 | byte tempByte = 0; //This represents the byte for the current 4x4 |
536 | ILandObject currentParcelBlock = null; | 536 | ILandObject currentParcelBlock = null; |
537 | 537 | ||
538 | try | 538 | try |
@@ -611,7 +611,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
611 | packet = (ParcelOverlayPacket) PacketPool.Instance.GetPacket(PacketType.ParcelOverlay); | 611 | packet = (ParcelOverlayPacket) PacketPool.Instance.GetPacket(PacketType.ParcelOverlay); |
612 | packet.ParcelData.Data = byteArray; | 612 | packet.ParcelData.Data = byteArray; |
613 | packet.ParcelData.SequenceID = sequenceID; | 613 | packet.ParcelData.SequenceID = sequenceID; |
614 | remote_client.OutPacket((Packet) packet, ThrottleOutPacketType.Task); | 614 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); |
615 | sequenceID++; | 615 | sequenceID++; |
616 | byteArray = new byte[LAND_BLOCKS_PER_PACKET]; | 616 | byteArray = new byte[LAND_BLOCKS_PER_PACKET]; |
617 | } | 617 | } |