diff options
author | UbitUmarov | 2014-07-29 01:24:43 +0100 |
---|---|---|
committer | UbitUmarov | 2014-07-29 01:24:43 +0100 |
commit | 6b0521d3c91f4ca6f87734748df553663cbc3e87 (patch) | |
tree | f4f2baae17196ca7faa62f1bceffaaed6eb75ba2 /OpenSim | |
parent | change parcel overlay bytes adding LocalSound.. changed others also NEEDS (diff) | |
download | opensim-SC-6b0521d3c91f4ca6f87734748df553663cbc3e87.zip opensim-SC-6b0521d3c91f4ca6f87734748df553663cbc3e87.tar.gz opensim-SC-6b0521d3c91f4ca6f87734748df553663cbc3e87.tar.bz2 opensim-SC-6b0521d3c91f4ca6f87734748df553663cbc3e87.tar.xz |
fix the mess about exclusive fields and flags on land overlay
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandChannel.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 51 |
2 files changed, 34 insertions, 31 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index faaf41c..beb0a24 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs | |||
@@ -50,8 +50,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
50 | public const int LAND_SELECT_OBJECTS_GROUP = 4; | 50 | public const int LAND_SELECT_OBJECTS_GROUP = 4; |
51 | public const int LAND_SELECT_OBJECTS_OTHER = 8; | 51 | public const int LAND_SELECT_OBJECTS_OTHER = 8; |
52 | 52 | ||
53 | 53 | ||
54 | public const byte LAND_TYPE_PUBLIC = 0; //Equals 00000000 | 54 | public const byte LAND_TYPE_PUBLIC = 0; //Equals 00000000 |
55 | // types 1 to 7 are exclusive | ||
55 | public const byte LAND_TYPE_OWNED_BY_OTHER = 1; //Equals 00000001 | 56 | public const byte LAND_TYPE_OWNED_BY_OTHER = 1; //Equals 00000001 |
56 | public const byte LAND_TYPE_OWNED_BY_GROUP = 2; //Equals 00000010 | 57 | public const byte LAND_TYPE_OWNED_BY_GROUP = 2; //Equals 00000010 |
57 | public const byte LAND_TYPE_OWNED_BY_REQUESTER = 3; //Equals 00000011 | 58 | public const byte LAND_TYPE_OWNED_BY_REQUESTER = 3; //Equals 00000011 |
@@ -59,11 +60,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
59 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = 5; //Equals 00000101 | 60 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = 5; //Equals 00000101 |
60 | public const byte LAND_TYPE_unused6 = 6; | 61 | public const byte LAND_TYPE_unused6 = 6; |
61 | public const byte LAND_TYPE_unused7 = 7; | 62 | public const byte LAND_TYPE_unused7 = 7; |
62 | public const byte LAND_TYPE_unused8 = 8; | 63 | // next are flags |
63 | public const byte LAND_TYPE_HIDEAVATARS = 0x10; | 64 | public const byte LAND_FLAG_unused8 = 0x08; // this may become excluside in future |
64 | public const byte LAND_TYPE_LOCALSOUND = 0x20; | 65 | public const byte LAND_FLAG_HIDEAVATARS = 0x10; |
65 | public const byte LAND_TYPE_PROPERTY_BORDER_WEST = 0x40; //Equals 01000000 | 66 | public const byte LAND_FLAG_LOCALSOUND = 0x20; |
66 | public const byte LAND_TYPE_PROPERTY_BORDER_SOUTH = 0x80; //Equals 10000000 | 67 | public const byte LAND_FLAG_PROPERTY_BORDER_WEST = 0x40; //Equals 01000000 |
68 | public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = 0x80; //Equals 10000000 | ||
67 | 69 | ||
68 | 70 | ||
69 | //These are other constants. Yay! | 71 | //These are other constants. Yay! |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 834448c..173dcd5 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1040,38 +1040,37 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1040 | 1040 | ||
1041 | if (currentParcelBlock != null) | 1041 | if (currentParcelBlock != null) |
1042 | { | 1042 | { |
1043 | if (currentParcelBlock.LandData.OwnerID == UUID.Zero) | 1043 | // types |
1044 | { | 1044 | if (currentParcelBlock.LandData.OwnerID == remote_client.AgentId) |
1045 | //Public Flag | ||
1046 | tempByte |= (byte)LandChannel.LAND_TYPE_PUBLIC; // this does nothing | ||
1047 | } | ||
1048 | else if (currentParcelBlock.LandData.OwnerID == remote_client.AgentId) | ||
1049 | { | 1045 | { |
1050 | //Owner Flag | 1046 | //Owner Flag |
1051 | tempByte |= (byte)LandChannel.LAND_TYPE_OWNED_BY_REQUESTER; | 1047 | tempByte |= (byte)LandChannel.LAND_TYPE_OWNED_BY_REQUESTER; |
1052 | } | 1048 | } |
1053 | else | 1049 | else if (currentParcelBlock.LandData.IsGroupOwned && remote_client.IsGroupMember(currentParcelBlock.LandData.GroupID)) |
1054 | { | ||
1055 | //Other Flag | ||
1056 | tempByte |= (byte)LandChannel.LAND_TYPE_OWNED_BY_OTHER; | ||
1057 | } | ||
1058 | |||
1059 | if (currentParcelBlock.LandData.IsGroupOwned && remote_client.IsGroupMember(currentParcelBlock.LandData.GroupID)) | ||
1060 | { | 1050 | { |
1061 | tempByte |= (byte)LandChannel.LAND_TYPE_OWNED_BY_GROUP; | 1051 | tempByte |= (byte)LandChannel.LAND_TYPE_OWNED_BY_GROUP; |
1062 | } | 1052 | } |
1063 | 1053 | else if (currentParcelBlock.LandData.SalePrice > 0 && | |
1064 | if (currentParcelBlock.LandData.SalePrice > 0 && | ||
1065 | (currentParcelBlock.LandData.AuthBuyerID == UUID.Zero || | 1054 | (currentParcelBlock.LandData.AuthBuyerID == UUID.Zero || |
1066 | currentParcelBlock.LandData.AuthBuyerID == remote_client.AgentId)) | 1055 | currentParcelBlock.LandData.AuthBuyerID == remote_client.AgentId)) |
1067 | { | 1056 | { |
1068 | //Sale Flag | 1057 | //Sale type |
1069 | tempByte |= (byte)LandChannel.LAND_TYPE_IS_FOR_SALE; | 1058 | tempByte |= (byte)LandChannel.LAND_TYPE_IS_FOR_SALE; |
1070 | } | 1059 | } |
1060 | else if(currentParcelBlock.LandData.OwnerID == UUID.Zero) | ||
1061 | { | ||
1062 | //Public type | ||
1063 | tempByte |= (byte)LandChannel.LAND_TYPE_PUBLIC; // this does nothing, its zero | ||
1064 | } | ||
1065 | // LAND_TYPE_IS_BEING_AUCTIONED still unsuported | ||
1066 | else | ||
1067 | { | ||
1068 | //Other Flag | ||
1069 | tempByte |= (byte)LandChannel.LAND_TYPE_OWNED_BY_OTHER; | ||
1070 | } | ||
1071 | 1071 | ||
1072 | // LAND_TYPE_IS_BEING_AUCTIONED not suported? | 1072 | // now flags |
1073 | 1073 | // border control | |
1074 | //Now for border control | ||
1075 | 1074 | ||
1076 | ILandObject westParcel = null; | 1075 | ILandObject westParcel = null; |
1077 | ILandObject southParcel = null; | 1076 | ILandObject southParcel = null; |
@@ -1086,27 +1085,29 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1086 | 1085 | ||
1087 | if (x == 0) | 1086 | if (x == 0) |
1088 | { | 1087 | { |
1089 | tempByte |= (byte)LandChannel.LAND_TYPE_PROPERTY_BORDER_WEST; | 1088 | tempByte |= (byte)LandChannel.LAND_FLAG_PROPERTY_BORDER_WEST; |
1090 | } | 1089 | } |
1091 | else if (westParcel != null && westParcel != currentParcelBlock) | 1090 | else if (westParcel != null && westParcel != currentParcelBlock) |
1092 | { | 1091 | { |
1093 | tempByte |= (byte)LandChannel.LAND_TYPE_PROPERTY_BORDER_WEST; | 1092 | tempByte |= (byte)LandChannel.LAND_FLAG_PROPERTY_BORDER_WEST; |
1094 | } | 1093 | } |
1095 | 1094 | ||
1096 | if (y == 0) | 1095 | if (y == 0) |
1097 | { | 1096 | { |
1098 | tempByte |= (byte)LandChannel.LAND_TYPE_PROPERTY_BORDER_SOUTH; | 1097 | tempByte |= (byte)LandChannel.LAND_FLAG_PROPERTY_BORDER_SOUTH; |
1099 | } | 1098 | } |
1100 | else if (southParcel != null && southParcel != currentParcelBlock) | 1099 | else if (southParcel != null && southParcel != currentParcelBlock) |
1101 | { | 1100 | { |
1102 | tempByte |= (byte)LandChannel.LAND_TYPE_PROPERTY_BORDER_SOUTH; | 1101 | tempByte |= (byte)LandChannel.LAND_FLAG_PROPERTY_BORDER_SOUTH; |
1103 | } | 1102 | } |
1104 | 1103 | ||
1104 | // local sound | ||
1105 | if ((currentParcelBlock.LandData.Flags & (uint)ParcelFlags.SoundLocal) != 0) | 1105 | if ((currentParcelBlock.LandData.Flags & (uint)ParcelFlags.SoundLocal) != 0) |
1106 | tempByte |= (byte)LandChannel.LAND_TYPE_LOCALSOUND; | 1106 | tempByte |= (byte)LandChannel.LAND_FLAG_LOCALSOUND; |
1107 | 1107 | ||
1108 | // hide avatars | ||
1108 | // if ((currentParcelBlock.LandData.Flags & (uint)ParcelFlags.???hideavatar) != 0) | 1109 | // if ((currentParcelBlock.LandData.Flags & (uint)ParcelFlags.???hideavatar) != 0) |
1109 | // tempByte |= (byte)LandChannel.LAND_TYPE_HIDEAVATARS; | 1110 | // tempByte |= (byte)LandChannel.LAND_FLAG_HIDEAVATARS; |
1110 | 1111 | ||
1111 | 1112 | ||
1112 | byteArray[byteArrayCount] = tempByte; | 1113 | byteArray[byteArrayCount] = tempByte; |