aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authormingchen2008-05-06 18:29:58 +0000
committermingchen2008-05-06 18:29:58 +0000
commitd8e02d9e5c6776099f9b5a1904a678fa2cf34841 (patch)
tree5fe33c13787c89b72153f35d5c9b6b816fc823e5 /OpenSim/Region/Environment/Modules
parentadded nhibernate examples (diff)
downloadopensim-SC_OLD-d8e02d9e5c6776099f9b5a1904a678fa2cf34841.zip
opensim-SC_OLD-d8e02d9e5c6776099f9b5a1904a678fa2cf34841.tar.gz
opensim-SC_OLD-d8e02d9e5c6776099f9b5a1904a678fa2cf34841.tar.bz2
opensim-SC_OLD-d8e02d9e5c6776099f9b5a1904a678fa2cf34841.tar.xz
*LLClientView is now pushed the EstateSettings instead of pulling it from the scene...more to standards
*LandChannel no longer requires libsecondlife.Packets (it should have never needed it in the first place)
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs72
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs9
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs2
3 files changed, 66 insertions, 17 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index ebe0357..098175b 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -44,10 +44,10 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
44 44
45 #region Packet Data Responders 45 #region Packet Data Responders
46 46
47 private static void sendDetailedEstateData(IClientAPI remote_client, LLUUID invoice) 47 private void sendDetailedEstateData(IClientAPI remote_client, LLUUID invoice)
48 { 48 {
49 remote_client.sendDetailedEstateData(invoice); 49 remote_client.sendDetailedEstateData(invoice,m_scene.RegionInfo.EstateSettings.estateName,m_scene.RegionInfo.EstateSettings.estateID);
50 remote_client.sendEstateManagersList(invoice); 50 remote_client.sendEstateManagersList(invoice,m_scene.RegionInfo.EstateSettings.estateManagers,m_scene.RegionInfo.EstateSettings.estateID);
51 } 51 }
52 52
53 private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, 53 private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor,
@@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
208 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.Permissions.BypassPermissions) 208 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.Permissions.BypassPermissions)
209 { 209 {
210 m_scene.RegionInfo.EstateSettings.AddEstateManager(user); 210 m_scene.RegionInfo.EstateSettings.AddEstateManager(user);
211 remote_client.sendEstateManagersList(invoice); 211 remote_client.sendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.estateManagers, m_scene.RegionInfo.EstateSettings.estateID);
212 } 212 }
213 else 213 else
214 { 214 {
@@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
222 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.Permissions.BypassPermissions) 222 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.Permissions.BypassPermissions)
223 { 223 {
224 m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); 224 m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
225 remote_client.sendEstateManagersList(invoice); 225 remote_client.sendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.estateManagers, m_scene.RegionInfo.EstateSettings.estateID);
226 } 226 }
227 else 227 else
228 { 228 {
@@ -283,9 +283,28 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
283 } 283 }
284 } 284 }
285 285
286 private static void HandleRegionInfoRequest(IClientAPI remote_client) 286 private void HandleRegionInfoRequest(IClientAPI remote_client)
287 { 287 {
288 remote_client.sendRegionInfoToEstateMenu(); 288
289 RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs();
290 args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor;
291 args.estateID = m_scene.RegionInfo.EstateSettings.estateID;
292 args.maxAgents = m_scene.RegionInfo.EstateSettings.maxAgents;
293 args.objectBonusFactor = m_scene.RegionInfo.EstateSettings.objectBonusFactor;
294 args.parentEstateID = m_scene.RegionInfo.EstateSettings.parentEstateID;
295 args.pricePerMeter = m_scene.RegionInfo.EstateSettings.pricePerMeter;
296 args.redirectGridX = m_scene.RegionInfo.EstateSettings.redirectGridX;
297 args.redirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY;
298 args.regionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags);
299 args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess;
300 args.sunHour = m_scene.RegionInfo.EstateSettings.sunHour;
301 args.terrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit;
302 args.terrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit;
303 args.useEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun;
304 args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight;
305 args.simName = m_scene.RegionInfo.RegionName;
306
307 remote_client.sendRegionInfoToEstateMenu(args);
289 } 308 }
290 309
291 private static void HandleEstateCovenantRequest(IClientAPI remote_client) 310 private static void HandleEstateCovenantRequest(IClientAPI remote_client)
@@ -303,13 +322,48 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
303 322
304 for (int i = 0; i < avatars.Count; i++) 323 for (int i = 0; i < avatars.Count; i++)
305 { 324 {
306 avatars[i].ControllingClient.sendRegionInfoToEstateMenu(); 325 HandleRegionInfoRequest(avatars[i].ControllingClient); ;
307 } 326 }
308 } 327 }
309 328
310 public void sendRegionHandshake(IClientAPI remoteClient) 329 public void sendRegionHandshake(IClientAPI remoteClient)
311 { 330 {
312 remoteClient.SendRegionHandshake(m_scene.RegionInfo); 331 RegionHandshakeArgs args = new RegionHandshakeArgs();
332 bool estatemanager = false;
333 LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.estateManagers;
334 for (int i = 0; i < EstateManagers.Length; i++)
335 {
336 if (EstateManagers[i] == remoteClient.AgentId)
337 estatemanager = true;
338 }
339
340 args.isEstateManager = estatemanager;
341
342 args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor;
343 args.terrainHeightRange0 = m_scene.RegionInfo.EstateSettings.terrainHeightRange0;
344 args.terrainHeightRange1 = m_scene.RegionInfo.EstateSettings.terrainHeightRange1;
345 args.terrainHeightRange2 = m_scene.RegionInfo.EstateSettings.terrainHeightRange2;
346 args.terrainHeightRange3 = m_scene.RegionInfo.EstateSettings.terrainHeightRange3;
347 args.terrainStartHeight0 = m_scene.RegionInfo.EstateSettings.terrainStartHeight0;
348 args.terrainStartHeight1 = m_scene.RegionInfo.EstateSettings.terrainStartHeight1;
349 args.terrainStartHeight2 = m_scene.RegionInfo.EstateSettings.terrainStartHeight2;
350 args.terrainStartHeight3 = m_scene.RegionInfo.EstateSettings.terrainStartHeight3;
351 args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess;
352 args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight;
353
354 args.regionFlags = (uint)m_scene.RegionInfo.EstateSettings.regionFlags;
355 args.regionName = m_scene.RegionInfo.RegionName;
356 args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
357 args.terrainBase0 = m_scene.RegionInfo.EstateSettings.terrainBase0;
358 args.terrainBase1 = m_scene.RegionInfo.EstateSettings.terrainBase1;
359 args.terrainBase2 = m_scene.RegionInfo.EstateSettings.terrainBase2;
360 args.terrainBase3 = m_scene.RegionInfo.EstateSettings.terrainBase3;
361 args.terrainDetail0 = m_scene.RegionInfo.EstateSettings.terrainDetail0;
362 args.terrainDetail1 = m_scene.RegionInfo.EstateSettings.terrainDetail1;
363 args.terrainDetail2 = m_scene.RegionInfo.EstateSettings.terrainDetail2;
364 args.terrainDetail3 = m_scene.RegionInfo.EstateSettings.terrainDetail3;
365
366 remoteClient.SendRegionHandshake(m_scene.RegionInfo,args);
313 } 367 }
314 368
315 public void sendRegionHandshakeToAll() 369 public void sendRegionHandshakeToAll()
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
index 02558a9..341412a 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
@@ -29,7 +29,6 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Axiom.Math; 30using Axiom.Math;
31using libsecondlife; 31using libsecondlife;
32using libsecondlife.Packets;
33using OpenSim.Framework; 32using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
35using OpenSim.Region.Environment.Scenes; 34using OpenSim.Region.Environment.Scenes;
@@ -521,7 +520,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
521 byte[] byteArray = new byte[LAND_BLOCKS_PER_PACKET]; 520 byte[] byteArray = new byte[LAND_BLOCKS_PER_PACKET];
522 int byteArrayCount = 0; 521 int byteArrayCount = 0;
523 int sequenceID = 0; 522 int sequenceID = 0;
524 ParcelOverlayPacket packet;
525 523
526 int y; 524 int y;
527 for (y = 0; y < 64; y++) 525 for (y = 0; y < 64; y++)
@@ -595,11 +593,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
595 byteArrayCount++; 593 byteArrayCount++;
596 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) 594 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET)
597 { 595 {
598 byteArrayCount = 0; 596 remote_client.sendLandParcelOverlay(byteArray, sequenceID);
599 packet = (ParcelOverlayPacket) PacketPool.Instance.GetPacket(PacketType.ParcelOverlay); 597 byteArrayCount = 0;
600 packet.ParcelData.Data = byteArray;
601 packet.ParcelData.SequenceID = sequenceID;
602 remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
603 sequenceID++; 598 sequenceID++;
604 byteArray = new byte[LAND_BLOCKS_PER_PACKET]; 599 byteArray = new byte[LAND_BLOCKS_PER_PACKET];
605 } 600 }
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index 88bc4e6..2d3359c 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
122 122
123 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) 123 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client)
124 { 124 {
125 remote_client.sendLandProperties(remote_client, sequence_id, snap_selection, request_result, landData, m_scene.RegionInfo.EstateSettings.objectBonusFactor, m_scene.objectCapacity); 125 remote_client.sendLandProperties(remote_client, sequence_id, snap_selection, request_result, landData, m_scene.RegionInfo.EstateSettings.objectBonusFactor, m_scene.objectCapacity,(uint) m_scene.RegionInfo.EstateSettings.regionFlags);
126 } 126 }
127 127
128 public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client) 128 public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client)