aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Common/OpenSim.Framework/Types/EstateSettings.cs23
-rw-r--r--OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs6
-rw-r--r--OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs48
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/World.cs2
-rw-r--r--OpenSim/OpenSim/OpenSimMain.cs5
5 files changed, 82 insertions, 2 deletions
diff --git a/Common/OpenSim.Framework/Types/EstateSettings.cs b/Common/OpenSim.Framework/Types/EstateSettings.cs
index 1bd18d0..b34a1ac 100644
--- a/Common/OpenSim.Framework/Types/EstateSettings.cs
+++ b/Common/OpenSim.Framework/Types/EstateSettings.cs
@@ -37,6 +37,26 @@ namespace OpenSim.Framework.Types
37 public class EstateSettings 37 public class EstateSettings
38 { 38 {
39 //Settings to this island 39 //Settings to this island
40 public float billableFactor = (float)0.0;
41 public uint estateID = 0;
42 public uint parentEstateID = 0;
43
44 public byte maxAgents = 40;
45 public float objectBonusFactor = (float)1.0;
46
47 public int redirectGridX = 0; //??
48 public int redirectGridY = 0; //??
49 public uint regionFlags = 0; //??
50
51 public byte simAccess = 0; //??
52 public float sunHour = 0;
53
54 public float terrainRaiseLimit = 0;
55 public float terrainLowerLimit = 0;
56
57 public bool useEstateSun = false;
58 public int pricePerMeter = 1;
59
40 public ushort regionWaterHeight = 20; 60 public ushort regionWaterHeight = 20;
41 public bool regionAllowTerraform = true; 61 public bool regionAllowTerraform = true;
42 62
@@ -70,5 +90,8 @@ namespace OpenSim.Framework.Types
70 // Terrain Default (Must be in F32 Format!) 90 // Terrain Default (Must be in F32 Format!)
71 public string terrainFile = "default.r32"; 91 public string terrainFile = "default.r32";
72 public double terrainMultiplier = 60.0; 92 public double terrainMultiplier = 60.0;
93 public float waterHeight = (float)20.0;
94
95
73 } 96 }
74} 97}
diff --git a/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs
index b07749e..306bf63 100644
--- a/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs
+++ b/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs
@@ -91,7 +91,6 @@ namespace OpenSim.RegionServer.Client
91 protected override void ProcessInPacket(Packet Pack) 91 protected override void ProcessInPacket(Packet Pack)
92 { 92 {
93 ack_pack(Pack); 93 ack_pack(Pack);
94 debug = true;
95 if (debug) 94 if (debug)
96 { 95 {
97 if (Pack.Type != PacketType.AgentUpdate) 96 if (Pack.Type != PacketType.AgentUpdate)
@@ -490,6 +489,11 @@ namespace OpenSim.RegionServer.Client
490 break; 489 break;
491 #endregion 490 #endregion
492 491
492 #region Estate Packets
493 case PacketType.EstateOwnerMessage:
494 this.m_world.estateManager.handleEstateOwnerMessage((EstateOwnerMessagePacket)Pack, this);
495 break;
496 #endregion
493 #region unimplemented handlers 497 #region unimplemented handlers
494 case PacketType.AgentIsNowWearing: 498 case PacketType.AgentIsNowWearing:
495 // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; 499 // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack;
diff --git a/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs b/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs
index 5dab080..33996d0 100644
--- a/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs
+++ b/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs
@@ -3,14 +3,62 @@ using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5using OpenSim.Framework.Types; 5using OpenSim.Framework.Types;
6using OpenSim.RegionServer.Simulator;
7using OpenSim.RegionServer.Client;
8
9using libsecondlife;
10using libsecondlife.Packets;
6 11
7namespace OpenSim.RegionServer.Estate 12namespace OpenSim.RegionServer.Estate
8{ 13{
14
9 /// <summary> 15 /// <summary>
10 /// Processes requests regarding estates. Refer to EstateSettings.cs in OpenSim.Framework. Types for all of the core settings 16 /// Processes requests regarding estates. Refer to EstateSettings.cs in OpenSim.Framework. Types for all of the core settings
11 /// </summary> 17 /// </summary>
12 public class EstateManager 18 public class EstateManager
13 { 19 {
20 private World m_world;
21
22 public EstateManager(World world)
23 {
24 m_world = world; //Estate settings found at world.m_regInfo.estateSettings
25 }
26
27 public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, ClientView remote_client)
28 {
29 if (remote_client.AgentID == m_world.m_regInfo.MasterAvatarAssignedUUID)
30 {
31 switch (Helpers.FieldToUTF8String(packet.MethodData.Method))
32 {
33 case "getinfo":
34 Console.WriteLine("GETINFO Requested");
35 RegionInfoPacket regionInfoPacket = new RegionInfoPacket();
36 regionInfoPacket.AgentData.AgentID = remote_client.AgentID;
37 regionInfoPacket.AgentData.SessionID = remote_client.SessionID;
38 regionInfoPacket.RegionInfo.BillableFactor = m_world.m_regInfo.estateSettings.billableFactor;
39 regionInfoPacket.RegionInfo.EstateID = m_world.m_regInfo.estateSettings.estateID;
40 regionInfoPacket.RegionInfo.MaxAgents = m_world.m_regInfo.estateSettings.maxAgents;
41 regionInfoPacket.RegionInfo.ObjectBonusFactor = m_world.m_regInfo.estateSettings.objectBonusFactor;
42 regionInfoPacket.RegionInfo.ParentEstateID = m_world.m_regInfo.estateSettings.parentEstateID;
43 regionInfoPacket.RegionInfo.PricePerMeter = m_world.m_regInfo.estateSettings.pricePerMeter;
44 regionInfoPacket.RegionInfo.RedirectGridX = m_world.m_regInfo.estateSettings.redirectGridX;
45 regionInfoPacket.RegionInfo.RedirectGridY = m_world.m_regInfo.estateSettings.redirectGridY;
46 regionInfoPacket.RegionInfo.RegionFlags = m_world.m_regInfo.estateSettings.regionFlags;
47 regionInfoPacket.RegionInfo.SimAccess = m_world.m_regInfo.estateSettings.simAccess;
48 regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_world.m_regInfo.RegionName);
49 regionInfoPacket.RegionInfo.SunHour = m_world.m_regInfo.estateSettings.sunHour;
50 regionInfoPacket.RegionInfo.TerrainLowerLimit = m_world.m_regInfo.estateSettings.terrainLowerLimit;
51 regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_world.m_regInfo.estateSettings.terrainRaiseLimit;
52 regionInfoPacket.RegionInfo.UseEstateSun = m_world.m_regInfo.estateSettings.useEstateSun;
53 regionInfoPacket.RegionInfo.WaterHeight = m_world.m_regInfo.estateSettings.waterHeight;
14 54
55 remote_client.OutPacket(regionInfoPacket);
56 break;
57 default:
58 OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
59 break;
60 }
61 }
62 }
15 } 63 }
16} 64}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/World.cs b/OpenSim/OpenSim.RegionServer/Simulator/World.cs
index b4e4f49..dda8ac4 100644
--- a/OpenSim/OpenSim.RegionServer/Simulator/World.cs
+++ b/OpenSim/OpenSim.RegionServer/Simulator/World.cs
@@ -66,6 +66,7 @@ namespace OpenSim.RegionServer.Simulator
66 private Mutex updateLock; 66 private Mutex updateLock;
67 public string m_datastore; 67 public string m_datastore;
68 public OpenSim.RegionServer.Simulator.ParcelManager parcelManager; 68 public OpenSim.RegionServer.Simulator.ParcelManager parcelManager;
69 public OpenSim.RegionServer.Estate.EstateManager estateManager;
69 70
70 #region Properties 71 #region Properties
71 public PhysicsScene PhysScene 72 public PhysicsScene PhysScene
@@ -621,6 +622,7 @@ namespace OpenSim.RegionServer.Simulator
621 agentClient.OnParcelDivideRequest += new OpenSim.RegionServer.Simulator.ParcelDivideRequest(ParcelDivideRequest); 622 agentClient.OnParcelDivideRequest += new OpenSim.RegionServer.Simulator.ParcelDivideRequest(ParcelDivideRequest);
622 agentClient.OnParcelJoinRequest+=new OpenSim.RegionServer.Simulator.ParcelJoinRequest(ParcelJoinRequest); 623 agentClient.OnParcelJoinRequest+=new OpenSim.RegionServer.Simulator.ParcelJoinRequest(ParcelJoinRequest);
623 agentClient.OnParcelPropertiesUpdateRequest += new OpenSim.RegionServer.Simulator.ParcelPropertiesUpdateRequest(ParcelPropertiesUpdateRequest); 624 agentClient.OnParcelPropertiesUpdateRequest += new OpenSim.RegionServer.Simulator.ParcelPropertiesUpdateRequest(ParcelPropertiesUpdateRequest);
625
624 Avatar newAvatar = null; 626 Avatar newAvatar = null;
625 try 627 try
626 { 628 {
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs
index a310ded..c6ee7e9 100644
--- a/OpenSim/OpenSim/OpenSimMain.cs
+++ b/OpenSim/OpenSim/OpenSimMain.cs
@@ -210,7 +210,10 @@ namespace OpenSim
210 m_console.Warn("Main.cs:Startup() - Grid Mode; Do not know how to get the user's master key yet!"); 210 m_console.Warn("Main.cs:Startup() - Grid Mode; Do not know how to get the user's master key yet!");
211 } 211 }
212 212
213 m_console.Notice("Creating ParcelManager"); 213 m_console.Notice("Creating Estate Manager");
214 LocalWorld.estateManager = new OpenSim.RegionServer.Estate.EstateManager(this.LocalWorld);
215
216 m_console.Notice("Creating Parcel Manager");
214 LocalWorld.parcelManager = new OpenSim.RegionServer.Simulator.ParcelManager(this.LocalWorld); 217 LocalWorld.parcelManager = new OpenSim.RegionServer.Simulator.ParcelManager(this.LocalWorld);
215 218
216 m_console.Notice("Loading Parcels from DB..."); 219 m_console.Notice("Loading Parcels from DB...");