diff options
author | mingchen | 2007-06-08 19:30:27 +0000 |
---|---|---|
committer | mingchen | 2007-06-08 19:30:27 +0000 |
commit | 8157182d378de82ae7443b57a90e07267ce1466e (patch) | |
tree | 3139163f719fdbb24331a2fc4f7afd98c36e4764 /OpenSim/OpenSim.World | |
parent | *Merged EstateManager, EstateSettings, ParcelManager,Parcel, and ParcelData c... (diff) | |
download | opensim-SC-8157182d378de82ae7443b57a90e07267ce1466e.zip opensim-SC-8157182d378de82ae7443b57a90e07267ce1466e.tar.gz opensim-SC-8157182d378de82ae7443b57a90e07267ce1466e.tar.bz2 opensim-SC-8157182d378de82ae7443b57a90e07267ce1466e.tar.xz |
*RegionInfo in Avatar class now protected again (oops, my fault)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/OpenSim.World/Avatar.Update.cs | 2 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/Avatar.cs | 8 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/Estate/EstateManager.cs | 152 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/OpenSim.World.csproj | 8 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/ParcelManager.cs | 9 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/World.cs | 5 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/WorldBase.cs | 2 |
7 files changed, 98 insertions, 88 deletions
diff --git a/OpenSim/OpenSim.World/Avatar.Update.cs b/OpenSim/OpenSim.World/Avatar.Update.cs index 04879a6..7a57ba4 100644 --- a/OpenSim/OpenSim.World/Avatar.Update.cs +++ b/OpenSim/OpenSim.World/Avatar.Update.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.world | |||
43 | public void SendInitialPosition() | 43 | public void SendInitialPosition() |
44 | { | 44 | { |
45 | Console.WriteLine("sending initial Avatar data"); | 45 | Console.WriteLine("sending initial Avatar data"); |
46 | this.ControllingClient.SendAvatarData(this.m_world.m_regInfo, this.firstname, this.lastname, this.uuid, this.localid, new LLVector3(128, 128, 60)); | 46 | this.ControllingClient.SendAvatarData(m_regInfo, this.firstname, this.lastname, this.uuid, this.localid, new LLVector3(128, 128, 60)); |
47 | } | 47 | } |
48 | 48 | ||
49 | /// <summary> | 49 | /// <summary> |
diff --git a/OpenSim/OpenSim.World/Avatar.cs b/OpenSim/OpenSim.World/Avatar.cs index 368bc53..4c3bc34 100644 --- a/OpenSim/OpenSim.World/Avatar.cs +++ b/OpenSim/OpenSim.World/Avatar.cs | |||
@@ -35,6 +35,7 @@ namespace OpenSim.world | |||
35 | private Dictionary<uint, IClientAPI> m_clientThreads; | 35 | private Dictionary<uint, IClientAPI> m_clientThreads; |
36 | private bool childAvatar = false; | 36 | private bool childAvatar = false; |
37 | 37 | ||
38 | private RegionInfo m_regInfo; | ||
38 | /// <summary> | 39 | /// <summary> |
39 | /// | 40 | /// |
40 | /// </summary> | 41 | /// </summary> |
@@ -42,13 +43,14 @@ namespace OpenSim.world | |||
42 | /// <param name="world"></param> | 43 | /// <param name="world"></param> |
43 | /// <param name="clientThreads"></param> | 44 | /// <param name="clientThreads"></param> |
44 | /// <param name="regionDat"></param> | 45 | /// <param name="regionDat"></param> |
45 | public Avatar(IClientAPI theClient, World world, Dictionary<uint, IClientAPI> clientThreads) | 46 | public Avatar(IClientAPI theClient, World world, Dictionary<uint, IClientAPI> clientThreads, RegionInfo reginfo) |
46 | { | 47 | { |
47 | 48 | ||
48 | m_world = world; | 49 | m_world = world; |
49 | m_clientThreads = clientThreads; | 50 | m_clientThreads = clientThreads; |
50 | this.uuid = theClient.AgentId; | 51 | this.uuid = theClient.AgentId; |
51 | 52 | ||
53 | m_regInfo = reginfo; | ||
52 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)"); | 54 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)"); |
53 | ControllingClient = theClient; | 55 | ControllingClient = theClient; |
54 | this.firstname = ControllingClient.FirstName; | 56 | this.firstname = ControllingClient.FirstName; |
@@ -140,7 +142,7 @@ namespace OpenSim.world | |||
140 | /// </summary> | 142 | /// </summary> |
141 | public void CompleteMovement() | 143 | public void CompleteMovement() |
142 | { | 144 | { |
143 | this.ControllingClient.MoveAgentIntoRegion(this.m_world.m_regInfo); | 145 | this.ControllingClient.MoveAgentIntoRegion(m_regInfo); |
144 | } | 146 | } |
145 | 147 | ||
146 | /// <summary> | 148 | /// <summary> |
diff --git a/OpenSim/OpenSim.World/Estate/EstateManager.cs b/OpenSim/OpenSim.World/Estate/EstateManager.cs index 37abc6d..cbcc702 100644 --- a/OpenSim/OpenSim.World/Estate/EstateManager.cs +++ b/OpenSim/OpenSim.World/Estate/EstateManager.cs | |||
@@ -19,10 +19,12 @@ namespace OpenSim.world.Estate | |||
19 | public class EstateManager | 19 | public class EstateManager |
20 | { | 20 | { |
21 | private World m_world; | 21 | private World m_world; |
22 | private RegionInfo m_regInfo; | ||
22 | 23 | ||
23 | public EstateManager(World world) | 24 | public EstateManager(World world,RegionInfo reginfo) |
24 | { | 25 | { |
25 | m_world = world; //Estate settings found at world.m_regInfo.estateSettings | 26 | m_world = world; //Estate settings found at world.m_regInfo.estateSettings |
27 | m_regInfo = reginfo; | ||
26 | } | 28 | } |
27 | 29 | ||
28 | private bool convertParamStringToBool(byte[] field) | 30 | private bool convertParamStringToBool(byte[] field) |
@@ -37,7 +39,7 @@ namespace OpenSim.world.Estate | |||
37 | 39 | ||
38 | public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, IClientAPI remote_client) | 40 | public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, IClientAPI remote_client) |
39 | { | 41 | { |
40 | if (remote_client.AgentId == m_world.m_regInfo.MasterAvatarAssignedUUID) | 42 | if (remote_client.AgentId == m_regInfo.MasterAvatarAssignedUUID) |
41 | { | 43 | { |
42 | switch (Helpers.FieldToUTF8String(packet.MethodData.Method)) | 44 | switch (Helpers.FieldToUTF8String(packet.MethodData.Method)) |
43 | { | 45 | { |
@@ -53,47 +55,47 @@ namespace OpenSim.world.Estate | |||
53 | } | 55 | } |
54 | else | 56 | else |
55 | { | 57 | { |
56 | m_world.m_regInfo.estateSettings.regionFlags = libsecondlife.Simulator.RegionFlags.None; | 58 | m_regInfo.estateSettings.regionFlags = libsecondlife.Simulator.RegionFlags.None; |
57 | 59 | ||
58 | if (convertParamStringToBool(packet.ParamList[0].Parameter)) | 60 | if (convertParamStringToBool(packet.ParamList[0].Parameter)) |
59 | { | 61 | { |
60 | m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockTerraform; | 62 | m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockTerraform; |
61 | } | 63 | } |
62 | 64 | ||
63 | if (convertParamStringToBool(packet.ParamList[1].Parameter)) | 65 | if (convertParamStringToBool(packet.ParamList[1].Parameter)) |
64 | { | 66 | { |
65 | m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.NoFly; | 67 | m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.NoFly; |
66 | } | 68 | } |
67 | 69 | ||
68 | if (convertParamStringToBool(packet.ParamList[2].Parameter)) | 70 | if (convertParamStringToBool(packet.ParamList[2].Parameter)) |
69 | { | 71 | { |
70 | m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowDamage; | 72 | m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowDamage; |
71 | } | 73 | } |
72 | 74 | ||
73 | if (convertParamStringToBool(packet.ParamList[3].Parameter) == false) | 75 | if (convertParamStringToBool(packet.ParamList[3].Parameter) == false) |
74 | { | 76 | { |
75 | m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockLandResell; | 77 | m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockLandResell; |
76 | } | 78 | } |
77 | 79 | ||
78 | 80 | ||
79 | int tempMaxAgents = Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter))); | 81 | int tempMaxAgents = Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter))); |
80 | m_world.m_regInfo.estateSettings.maxAgents = (byte)tempMaxAgents; | 82 | m_regInfo.estateSettings.maxAgents = (byte)tempMaxAgents; |
81 | 83 | ||
82 | float tempObjectBonusFactor = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); | 84 | float tempObjectBonusFactor = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); |
83 | m_world.m_regInfo.estateSettings.objectBonusFactor = tempObjectBonusFactor; | 85 | m_regInfo.estateSettings.objectBonusFactor = tempObjectBonusFactor; |
84 | 86 | ||
85 | int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter)); | 87 | int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter)); |
86 | m_world.m_regInfo.estateSettings.simAccess = (libsecondlife.Simulator.SimAccess)tempMatureLevel; | 88 | m_regInfo.estateSettings.simAccess = (libsecondlife.Simulator.SimAccess)tempMatureLevel; |
87 | 89 | ||
88 | 90 | ||
89 | if (convertParamStringToBool(packet.ParamList[7].Parameter)) | 91 | if (convertParamStringToBool(packet.ParamList[7].Parameter)) |
90 | { | 92 | { |
91 | m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.RestrictPushObject; | 93 | m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.RestrictPushObject; |
92 | } | 94 | } |
93 | 95 | ||
94 | if (convertParamStringToBool(packet.ParamList[8].Parameter)) | 96 | if (convertParamStringToBool(packet.ParamList[8].Parameter)) |
95 | { | 97 | { |
96 | m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowParcelChanges; | 98 | m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowParcelChanges; |
97 | } | 99 | } |
98 | 100 | ||
99 | sendRegionInfoPacketToAll(); | 101 | sendRegionInfoPacketToAll(); |
@@ -111,16 +113,16 @@ namespace OpenSim.world.Estate | |||
111 | switch (Convert.ToInt16(splitField[0])) | 113 | switch (Convert.ToInt16(splitField[0])) |
112 | { | 114 | { |
113 | case 0: | 115 | case 0: |
114 | m_world.m_regInfo.estateSettings.terrainBase0 = tempUUID; | 116 | m_regInfo.estateSettings.terrainBase0 = tempUUID; |
115 | break; | 117 | break; |
116 | case 1: | 118 | case 1: |
117 | m_world.m_regInfo.estateSettings.terrainBase1 = tempUUID; | 119 | m_regInfo.estateSettings.terrainBase1 = tempUUID; |
118 | break; | 120 | break; |
119 | case 2: | 121 | case 2: |
120 | m_world.m_regInfo.estateSettings.terrainBase2 = tempUUID; | 122 | m_regInfo.estateSettings.terrainBase2 = tempUUID; |
121 | break; | 123 | break; |
122 | case 3: | 124 | case 3: |
123 | m_world.m_regInfo.estateSettings.terrainBase3 = tempUUID; | 125 | m_regInfo.estateSettings.terrainBase3 = tempUUID; |
124 | break; | 126 | break; |
125 | } | 127 | } |
126 | } | 128 | } |
@@ -138,16 +140,16 @@ namespace OpenSim.world.Estate | |||
138 | switch (Convert.ToInt16(splitField[0])) | 140 | switch (Convert.ToInt16(splitField[0])) |
139 | { | 141 | { |
140 | case 0: | 142 | case 0: |
141 | m_world.m_regInfo.estateSettings.terrainDetail0 = tempUUID; | 143 | m_regInfo.estateSettings.terrainDetail0 = tempUUID; |
142 | break; | 144 | break; |
143 | case 1: | 145 | case 1: |
144 | m_world.m_regInfo.estateSettings.terrainDetail1 = tempUUID; | 146 | m_regInfo.estateSettings.terrainDetail1 = tempUUID; |
145 | break; | 147 | break; |
146 | case 2: | 148 | case 2: |
147 | m_world.m_regInfo.estateSettings.terrainDetail2 = tempUUID; | 149 | m_regInfo.estateSettings.terrainDetail2 = tempUUID; |
148 | break; | 150 | break; |
149 | case 3: | 151 | case 3: |
150 | m_world.m_regInfo.estateSettings.terrainDetail3 = tempUUID; | 152 | m_regInfo.estateSettings.terrainDetail3 = tempUUID; |
151 | break; | 153 | break; |
152 | } | 154 | } |
153 | } | 155 | } |
@@ -168,20 +170,20 @@ namespace OpenSim.world.Estate | |||
168 | switch (Convert.ToInt16(splitField[0])) | 170 | switch (Convert.ToInt16(splitField[0])) |
169 | { | 171 | { |
170 | case 0: | 172 | case 0: |
171 | m_world.m_regInfo.estateSettings.terrainStartHeight0 = tempHeightLow; | 173 | m_regInfo.estateSettings.terrainStartHeight0 = tempHeightLow; |
172 | m_world.m_regInfo.estateSettings.terrainHeightRange0 = tempHeightHigh; | 174 | m_regInfo.estateSettings.terrainHeightRange0 = tempHeightHigh; |
173 | break; | 175 | break; |
174 | case 1: | 176 | case 1: |
175 | m_world.m_regInfo.estateSettings.terrainStartHeight1 = tempHeightLow; | 177 | m_regInfo.estateSettings.terrainStartHeight1 = tempHeightLow; |
176 | m_world.m_regInfo.estateSettings.terrainHeightRange1 = tempHeightHigh; | 178 | m_regInfo.estateSettings.terrainHeightRange1 = tempHeightHigh; |
177 | break; | 179 | break; |
178 | case 2: | 180 | case 2: |
179 | m_world.m_regInfo.estateSettings.terrainStartHeight2 = tempHeightLow; | 181 | m_regInfo.estateSettings.terrainStartHeight2 = tempHeightLow; |
180 | m_world.m_regInfo.estateSettings.terrainHeightRange2 = tempHeightHigh; | 182 | m_regInfo.estateSettings.terrainHeightRange2 = tempHeightHigh; |
181 | break; | 183 | break; |
182 | case 3: | 184 | case 3: |
183 | m_world.m_regInfo.estateSettings.terrainStartHeight3 = tempHeightLow; | 185 | m_regInfo.estateSettings.terrainStartHeight3 = tempHeightLow; |
184 | m_world.m_regInfo.estateSettings.terrainHeightRange3 = tempHeightHigh; | 186 | m_regInfo.estateSettings.terrainHeightRange3 = tempHeightHigh; |
185 | break; | 187 | break; |
186 | } | 188 | } |
187 | } | 189 | } |
@@ -197,11 +199,11 @@ namespace OpenSim.world.Estate | |||
197 | } | 199 | } |
198 | else | 200 | else |
199 | { | 201 | { |
200 | m_world.m_regInfo.estateSettings.waterHeight = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[0].Parameter)); | 202 | m_regInfo.estateSettings.waterHeight = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[0].Parameter)); |
201 | m_world.m_regInfo.estateSettings.terrainRaiseLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter)); | 203 | m_regInfo.estateSettings.terrainRaiseLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter)); |
202 | m_world.m_regInfo.estateSettings.terrainLowerLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter)); | 204 | m_regInfo.estateSettings.terrainLowerLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter)); |
203 | m_world.m_regInfo.estateSettings.useFixedSun = this.convertParamStringToBool(packet.ParamList[4].Parameter); | 205 | m_regInfo.estateSettings.useFixedSun = this.convertParamStringToBool(packet.ParamList[4].Parameter); |
204 | m_world.m_regInfo.estateSettings.sunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); | 206 | m_regInfo.estateSettings.sunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); |
205 | 207 | ||
206 | sendRegionInfoPacketToAll(); | 208 | sendRegionInfoPacketToAll(); |
207 | } | 209 | } |
@@ -237,22 +239,22 @@ namespace OpenSim.world.Estate | |||
237 | RegionInfoPacket regionInfoPacket = new RegionInfoPacket(); | 239 | RegionInfoPacket regionInfoPacket = new RegionInfoPacket(); |
238 | regionInfoPacket.AgentData.AgentID = circuitData.AgentID; | 240 | regionInfoPacket.AgentData.AgentID = circuitData.AgentID; |
239 | regionInfoPacket.AgentData.SessionID = circuitData.SessionID; | 241 | regionInfoPacket.AgentData.SessionID = circuitData.SessionID; |
240 | regionInfoPacket.RegionInfo.BillableFactor = m_world.m_regInfo.estateSettings.billableFactor; | 242 | regionInfoPacket.RegionInfo.BillableFactor = m_regInfo.estateSettings.billableFactor; |
241 | regionInfoPacket.RegionInfo.EstateID = m_world.m_regInfo.estateSettings.estateID; | 243 | regionInfoPacket.RegionInfo.EstateID = m_regInfo.estateSettings.estateID; |
242 | regionInfoPacket.RegionInfo.MaxAgents = m_world.m_regInfo.estateSettings.maxAgents; | 244 | regionInfoPacket.RegionInfo.MaxAgents = m_regInfo.estateSettings.maxAgents; |
243 | regionInfoPacket.RegionInfo.ObjectBonusFactor = m_world.m_regInfo.estateSettings.objectBonusFactor; | 245 | regionInfoPacket.RegionInfo.ObjectBonusFactor = m_regInfo.estateSettings.objectBonusFactor; |
244 | regionInfoPacket.RegionInfo.ParentEstateID = m_world.m_regInfo.estateSettings.parentEstateID; | 246 | regionInfoPacket.RegionInfo.ParentEstateID = m_regInfo.estateSettings.parentEstateID; |
245 | regionInfoPacket.RegionInfo.PricePerMeter = m_world.m_regInfo.estateSettings.pricePerMeter; | 247 | regionInfoPacket.RegionInfo.PricePerMeter = m_regInfo.estateSettings.pricePerMeter; |
246 | regionInfoPacket.RegionInfo.RedirectGridX = m_world.m_regInfo.estateSettings.redirectGridX; | 248 | regionInfoPacket.RegionInfo.RedirectGridX = m_regInfo.estateSettings.redirectGridX; |
247 | regionInfoPacket.RegionInfo.RedirectGridY = m_world.m_regInfo.estateSettings.redirectGridY; | 249 | regionInfoPacket.RegionInfo.RedirectGridY = m_regInfo.estateSettings.redirectGridY; |
248 | regionInfoPacket.RegionInfo.RegionFlags = (uint)m_world.m_regInfo.estateSettings.regionFlags; | 250 | regionInfoPacket.RegionInfo.RegionFlags = (uint)m_regInfo.estateSettings.regionFlags; |
249 | regionInfoPacket.RegionInfo.SimAccess = (byte)m_world.m_regInfo.estateSettings.simAccess; | 251 | regionInfoPacket.RegionInfo.SimAccess = (byte)m_regInfo.estateSettings.simAccess; |
250 | regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_world.m_regInfo.RegionName); | 252 | regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_regInfo.RegionName); |
251 | regionInfoPacket.RegionInfo.SunHour = m_world.m_regInfo.estateSettings.sunHour; | 253 | regionInfoPacket.RegionInfo.SunHour = m_regInfo.estateSettings.sunHour; |
252 | regionInfoPacket.RegionInfo.TerrainLowerLimit = m_world.m_regInfo.estateSettings.terrainLowerLimit; | 254 | regionInfoPacket.RegionInfo.TerrainLowerLimit = m_regInfo.estateSettings.terrainLowerLimit; |
253 | regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_world.m_regInfo.estateSettings.terrainRaiseLimit; | 255 | regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_regInfo.estateSettings.terrainRaiseLimit; |
254 | regionInfoPacket.RegionInfo.UseEstateSun = !m_world.m_regInfo.estateSettings.useFixedSun; | 256 | regionInfoPacket.RegionInfo.UseEstateSun = !m_regInfo.estateSettings.useFixedSun; |
255 | regionInfoPacket.RegionInfo.WaterHeight = m_world.m_regInfo.estateSettings.waterHeight; | 257 | regionInfoPacket.RegionInfo.WaterHeight = m_regInfo.estateSettings.waterHeight; |
256 | 258 | ||
257 | remote_client.OutPacket(regionInfoPacket); | 259 | remote_client.OutPacket(regionInfoPacket); |
258 | } | 260 | } |
@@ -262,32 +264,32 @@ namespace OpenSim.world.Estate | |||
262 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; | 264 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; |
263 | RegionHandshakePacket handshake = new RegionHandshakePacket(); | 265 | RegionHandshakePacket handshake = new RegionHandshakePacket(); |
264 | 266 | ||
265 | handshake.RegionInfo.BillableFactor = m_world.m_regInfo.estateSettings.billableFactor; | 267 | handshake.RegionInfo.BillableFactor = m_regInfo.estateSettings.billableFactor; |
266 | handshake.RegionInfo.IsEstateManager = false; | 268 | handshake.RegionInfo.IsEstateManager = false; |
267 | handshake.RegionInfo.TerrainHeightRange00 = m_world.m_regInfo.estateSettings.terrainHeightRange0; | 269 | handshake.RegionInfo.TerrainHeightRange00 = m_regInfo.estateSettings.terrainHeightRange0; |
268 | handshake.RegionInfo.TerrainHeightRange01 = m_world.m_regInfo.estateSettings.terrainHeightRange1; | 270 | handshake.RegionInfo.TerrainHeightRange01 = m_regInfo.estateSettings.terrainHeightRange1; |
269 | handshake.RegionInfo.TerrainHeightRange10 = m_world.m_regInfo.estateSettings.terrainHeightRange2; | 271 | handshake.RegionInfo.TerrainHeightRange10 = m_regInfo.estateSettings.terrainHeightRange2; |
270 | handshake.RegionInfo.TerrainHeightRange11 = m_world.m_regInfo.estateSettings.terrainHeightRange3; | 272 | handshake.RegionInfo.TerrainHeightRange11 = m_regInfo.estateSettings.terrainHeightRange3; |
271 | handshake.RegionInfo.TerrainStartHeight00 = m_world.m_regInfo.estateSettings.terrainStartHeight0; | 273 | handshake.RegionInfo.TerrainStartHeight00 = m_regInfo.estateSettings.terrainStartHeight0; |
272 | handshake.RegionInfo.TerrainStartHeight01 = m_world.m_regInfo.estateSettings.terrainStartHeight1; | 274 | handshake.RegionInfo.TerrainStartHeight01 = m_regInfo.estateSettings.terrainStartHeight1; |
273 | handshake.RegionInfo.TerrainStartHeight10 = m_world.m_regInfo.estateSettings.terrainStartHeight2; | 275 | handshake.RegionInfo.TerrainStartHeight10 = m_regInfo.estateSettings.terrainStartHeight2; |
274 | handshake.RegionInfo.TerrainStartHeight11 = m_world.m_regInfo.estateSettings.terrainStartHeight3; | 276 | handshake.RegionInfo.TerrainStartHeight11 = m_regInfo.estateSettings.terrainStartHeight3; |
275 | handshake.RegionInfo.SimAccess = (byte)m_world.m_regInfo.estateSettings.simAccess; | 277 | handshake.RegionInfo.SimAccess = (byte)m_regInfo.estateSettings.simAccess; |
276 | handshake.RegionInfo.WaterHeight = m_world.m_regInfo.estateSettings.waterHeight; | 278 | handshake.RegionInfo.WaterHeight = m_regInfo.estateSettings.waterHeight; |
277 | 279 | ||
278 | 280 | ||
279 | handshake.RegionInfo.RegionFlags = (uint)m_world.m_regInfo.estateSettings.regionFlags; | 281 | handshake.RegionInfo.RegionFlags = (uint)m_regInfo.estateSettings.regionFlags; |
280 | 282 | ||
281 | handshake.RegionInfo.SimName = _enc.GetBytes(m_world.m_regInfo.estateSettings.waterHeight + "\0"); | 283 | handshake.RegionInfo.SimName = _enc.GetBytes(m_regInfo.estateSettings.waterHeight + "\0"); |
282 | handshake.RegionInfo.SimOwner = m_world.m_regInfo.MasterAvatarAssignedUUID; | 284 | handshake.RegionInfo.SimOwner = m_regInfo.MasterAvatarAssignedUUID; |
283 | handshake.RegionInfo.TerrainBase0 = m_world.m_regInfo.estateSettings.terrainBase0; | 285 | handshake.RegionInfo.TerrainBase0 = m_regInfo.estateSettings.terrainBase0; |
284 | handshake.RegionInfo.TerrainBase1 = m_world.m_regInfo.estateSettings.terrainBase1; | 286 | handshake.RegionInfo.TerrainBase1 = m_regInfo.estateSettings.terrainBase1; |
285 | handshake.RegionInfo.TerrainBase2 = m_world.m_regInfo.estateSettings.terrainBase2; | 287 | handshake.RegionInfo.TerrainBase2 = m_regInfo.estateSettings.terrainBase2; |
286 | handshake.RegionInfo.TerrainBase3 = m_world.m_regInfo.estateSettings.terrainBase3; | 288 | handshake.RegionInfo.TerrainBase3 = m_regInfo.estateSettings.terrainBase3; |
287 | handshake.RegionInfo.TerrainDetail0 = m_world.m_regInfo.estateSettings.terrainDetail0; | 289 | handshake.RegionInfo.TerrainDetail0 = m_regInfo.estateSettings.terrainDetail0; |
288 | handshake.RegionInfo.TerrainDetail1 = m_world.m_regInfo.estateSettings.terrainDetail1; | 290 | handshake.RegionInfo.TerrainDetail1 = m_regInfo.estateSettings.terrainDetail1; |
289 | handshake.RegionInfo.TerrainDetail2 = m_world.m_regInfo.estateSettings.terrainDetail2; | 291 | handshake.RegionInfo.TerrainDetail2 = m_regInfo.estateSettings.terrainDetail2; |
290 | handshake.RegionInfo.TerrainDetail3 = m_world.m_regInfo.estateSettings.terrainDetail3; | 292 | handshake.RegionInfo.TerrainDetail3 = m_regInfo.estateSettings.terrainDetail3; |
291 | handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting? | 293 | handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting? |
292 | 294 | ||
293 | remote_client.OutPacket(handshake); | 295 | remote_client.OutPacket(handshake); |
diff --git a/OpenSim/OpenSim.World/OpenSim.World.csproj b/OpenSim/OpenSim.World/OpenSim.World.csproj index f3c7b1f..90e455a 100644 --- a/OpenSim/OpenSim.World/OpenSim.World.csproj +++ b/OpenSim/OpenSim.World/OpenSim.World.csproj | |||
@@ -154,16 +154,16 @@ | |||
154 | <Compile Include="WorldBase.cs"> | 154 | <Compile Include="WorldBase.cs"> |
155 | <SubType>Code</SubType> | 155 | <SubType>Code</SubType> |
156 | </Compile> | 156 | </Compile> |
157 | <Compile Include="ParcelManager.cs"> | 157 | <Compile Include="Avatar.Update.cs"> |
158 | <SubType>Code</SubType> | 158 | <SubType>Code</SubType> |
159 | </Compile> | 159 | </Compile> |
160 | <Compile Include="Avatar.Update.cs"> | 160 | <Compile Include="Avatar.cs"> |
161 | <SubType>Code</SubType> | 161 | <SubType>Code</SubType> |
162 | </Compile> | 162 | </Compile> |
163 | <Compile Include="World.cs"> | 163 | <Compile Include="ParcelManager.cs"> |
164 | <SubType>Code</SubType> | 164 | <SubType>Code</SubType> |
165 | </Compile> | 165 | </Compile> |
166 | <Compile Include="Avatar.cs"> | 166 | <Compile Include="World.cs"> |
167 | <SubType>Code</SubType> | 167 | <SubType>Code</SubType> |
168 | </Compile> | 168 | </Compile> |
169 | <Compile Include="scripting\IScriptHandler.cs"> | 169 | <Compile Include="scripting\IScriptHandler.cs"> |
diff --git a/OpenSim/OpenSim.World/ParcelManager.cs b/OpenSim/OpenSim.World/ParcelManager.cs index d571150..9fbacd6 100644 --- a/OpenSim/OpenSim.World/ParcelManager.cs +++ b/OpenSim/OpenSim.World/ParcelManager.cs | |||
@@ -74,14 +74,17 @@ namespace OpenSim.world | |||
74 | private int lastParcelLocalID = START_PARCEL_LOCAL_ID - 1; | 74 | private int lastParcelLocalID = START_PARCEL_LOCAL_ID - 1; |
75 | private int[,] parcelIDList = new int[64, 64]; | 75 | private int[,] parcelIDList = new int[64, 64]; |
76 | 76 | ||
77 | private static World m_world; | 77 | private World m_world; |
78 | private RegionInfo m_regInfo; | ||
79 | |||
78 | #endregion | 80 | #endregion |
79 | 81 | ||
80 | #region Constructors | 82 | #region Constructors |
81 | public ParcelManager(World world) | 83 | public ParcelManager(World world, RegionInfo reginfo) |
82 | { | 84 | { |
83 | 85 | ||
84 | m_world = world; | 86 | m_world = world; |
87 | m_regInfo = reginfo; | ||
85 | parcelIDList.Initialize(); | 88 | parcelIDList.Initialize(); |
86 | 89 | ||
87 | } | 90 | } |
@@ -421,7 +424,7 @@ namespace OpenSim.world | |||
421 | fullSimParcel.parcelData.parcelName = "Your Sim Parcel"; | 424 | fullSimParcel.parcelData.parcelName = "Your Sim Parcel"; |
422 | fullSimParcel.parcelData.parcelDesc = ""; | 425 | fullSimParcel.parcelData.parcelDesc = ""; |
423 | 426 | ||
424 | fullSimParcel.parcelData.ownerID = m_world.m_regInfo.MasterAvatarAssignedUUID; | 427 | fullSimParcel.parcelData.ownerID = m_regInfo.MasterAvatarAssignedUUID; |
425 | fullSimParcel.parcelData.salePrice = 1; | 428 | fullSimParcel.parcelData.salePrice = 1; |
426 | fullSimParcel.parcelData.parcelFlags = libsecondlife.Parcel.ParcelFlags.ForSale; | 429 | fullSimParcel.parcelData.parcelFlags = libsecondlife.Parcel.ParcelFlags.ForSale; |
427 | fullSimParcel.parcelData.parcelStatus = libsecondlife.Parcel.ParcelStatus.Leased; | 430 | fullSimParcel.parcelData.parcelStatus = libsecondlife.Parcel.ParcelStatus.Leased; |
diff --git a/OpenSim/OpenSim.World/World.cs b/OpenSim/OpenSim.World/World.cs index 1f97820..e51c983 100644 --- a/OpenSim/OpenSim.World/World.cs +++ b/OpenSim/OpenSim.World/World.cs | |||
@@ -83,6 +83,9 @@ namespace OpenSim.world | |||
83 | this.m_datastore = m_regInfo.DataStore; | 83 | this.m_datastore = m_regInfo.DataStore; |
84 | this.RegisterRegionWithComms(); | 84 | this.RegisterRegionWithComms(); |
85 | 85 | ||
86 | parcelManager = new ParcelManager(this,this.m_regInfo); | ||
87 | estateManager = new EstateManager(this,this.m_regInfo); | ||
88 | |||
86 | m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); | 89 | m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); |
87 | m_scripts = new Dictionary<string, ScriptFactory>(); | 90 | m_scripts = new Dictionary<string, ScriptFactory>(); |
88 | 91 | ||
@@ -463,7 +466,7 @@ namespace OpenSim.world | |||
463 | try | 466 | try |
464 | { | 467 | { |
465 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); | 468 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); |
466 | newAvatar = new Avatar(remoteClient, this, m_clientThreads); | 469 | newAvatar = new Avatar(remoteClient, this, m_clientThreads,this.m_regInfo); |
467 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); | 470 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); |
468 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); | 471 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); |
469 | newAvatar.SendRegionHandshake(); | 472 | newAvatar.SendRegionHandshake(); |
diff --git a/OpenSim/OpenSim.World/WorldBase.cs b/OpenSim/OpenSim.World/WorldBase.cs index 4d806e3..19a8fb5 100644 --- a/OpenSim/OpenSim.World/WorldBase.cs +++ b/OpenSim/OpenSim.World/WorldBase.cs | |||
@@ -23,7 +23,7 @@ namespace OpenSim.world | |||
23 | protected string m_regionName; | 23 | protected string m_regionName; |
24 | // protected InventoryCache _inventoryCache; | 24 | // protected InventoryCache _inventoryCache; |
25 | // protected AssetCache _assetCache; | 25 | // protected AssetCache _assetCache; |
26 | public RegionInfo m_regInfo; | 26 | protected RegionInfo m_regInfo; |
27 | 27 | ||
28 | public TerrainEngine Terrain; //TODO: Replace TerrainManager with this. | 28 | public TerrainEngine Terrain; //TODO: Replace TerrainManager with this. |
29 | protected libsecondlife.TerrainManager TerrainManager; // To be referenced via TerrainEngine | 29 | protected libsecondlife.TerrainManager TerrainManager; // To be referenced via TerrainEngine |