aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Common
diff options
context:
space:
mode:
authorMW2007-05-27 18:52:42 +0000
committerMW2007-05-27 18:52:42 +0000
commitc746a2f9f4f0b1e7eea564effdae63472f79ab22 (patch)
tree54d23af3d168958bfec995cf2987cf5af79ac149 /Common
parentGoodbye World (diff)
downloadopensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.zip
opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.gz
opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.bz2
opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.xz
Should allow multiple worlds (and UDP servers) to be ran in one instance, just missing backend comms and working Avatar/primitives classes.
Diffstat (limited to 'Common')
-rw-r--r--Common/OpenSim.Framework/AgentInventory.cs10
-rw-r--r--Common/OpenSim.Framework/HeightMapGenHills.cs149
-rw-r--r--Common/OpenSim.Framework/Interfaces/Config/IGenericConfig.cs (renamed from Common/OpenSim.Framework/Interfaces/IGenericConfig.cs)0
-rw-r--r--Common/OpenSim.Framework/Interfaces/Config/IGridConfig.cs (renamed from Common/OpenSim.Framework/Interfaces/IGridConfig.cs)0
-rw-r--r--Common/OpenSim.Framework/Interfaces/Config/IUserConfig.cs (renamed from Common/OpenSim.Framework/Interfaces/IUserConfig.cs)0
-rw-r--r--Common/OpenSim.Framework/Interfaces/IClientAPI.cs8
-rw-r--r--Common/OpenSim.Framework/Interfaces/IConfig.cs76
-rw-r--r--Common/OpenSim.Framework/Interfaces/IWorld.cs15
-rw-r--r--Common/OpenSim.Framework/Interfaces/Remoting/IGridServerHost.cs12
-rw-r--r--Common/OpenSim.Framework/Interfaces/Remoting/IProxyServerClient.cs10
-rw-r--r--Common/OpenSim.Framework/Interfaces/Remoting/IProxyServerHost.cs10
-rw-r--r--Common/OpenSim.Framework/Interfaces/Remoting/IRegionGridClient.cs11
-rw-r--r--Common/OpenSim.Framework/Interfaces/Remoting/IRegionSimHost.cs12
-rw-r--r--Common/OpenSim.Framework/Interfaces/Remoting/RegionGridClientBase.cs11
-rw-r--r--Common/OpenSim.Framework/Interfaces/Scripting/IScriptAPI.cs (renamed from Common/OpenSim.Framework/Interfaces/IScriptAPI.cs)0
-rw-r--r--Common/OpenSim.Framework/Interfaces/Scripting/IScriptEngine.cs (renamed from Common/OpenSim.Framework/Interfaces/IScriptEngine.cs)0
-rw-r--r--Common/OpenSim.Framework/OpenSim.Framework.csproj95
-rw-r--r--Common/OpenSim.Framework/SimProfile.cs4
-rw-r--r--Common/OpenSim.Framework/Types/NeighbourInfo.cs4
-rw-r--r--Common/OpenSim.Framework/Types/NetworkServersInfo.cs91
-rw-r--r--Common/OpenSim.Framework/Types/RegionInfo.cs198
-rw-r--r--Common/OpenSim.Framework/UserProfileManager.cs8
-rw-r--r--Common/OpenSim.Framework/UserProfileManagerBase.cs10
23 files changed, 458 insertions, 276 deletions
diff --git a/Common/OpenSim.Framework/AgentInventory.cs b/Common/OpenSim.Framework/AgentInventory.cs
index b28645e..6fdd6c5 100644
--- a/Common/OpenSim.Framework/AgentInventory.cs
+++ b/Common/OpenSim.Framework/AgentInventory.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Framework.Inventory
79 { 79 {
80 if (!this.InventoryFolders.ContainsKey(folderID)) 80 if (!this.InventoryFolders.ContainsKey(folderID))
81 { 81 {
82 Console.WriteLine("creating new folder called " + folderName + " in agents inventory"); 82 System.Console.WriteLine("creating new folder called " + folderName + " in agents inventory");
83 InventoryFolder Folder = new InventoryFolder(); 83 InventoryFolder Folder = new InventoryFolder();
84 Folder.FolderID = folderID; 84 Folder.FolderID = folderID;
85 Folder.OwnerID = this.AgentID; 85 Folder.OwnerID = this.AgentID;
@@ -120,7 +120,7 @@ namespace OpenSim.Framework.Inventory
120 { 120 {
121 InventoryItem Item = this.InventoryItems[itemID]; 121 InventoryItem Item = this.InventoryItems[itemID];
122 Item.AssetID = asset.FullID; 122 Item.AssetID = asset.FullID;
123 Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + " so it now is set to asset " + asset.FullID.ToStringHyphenated()); 123 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + " so it now is set to asset " + asset.FullID.ToStringHyphenated());
124 //TODO need to update the rest of the info 124 //TODO need to update the rest of the info
125 } 125 }
126 return true; 126 return true;
@@ -128,13 +128,13 @@ namespace OpenSim.Framework.Inventory
128 128
129 public bool UpdateItemDetails(LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet) 129 public bool UpdateItemDetails(LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet)
130 { 130 {
131 Console.WriteLine("updating inventory item details"); 131 System.Console.WriteLine("updating inventory item details");
132 if (this.InventoryItems.ContainsKey(itemID)) 132 if (this.InventoryItems.ContainsKey(itemID))
133 { 133 {
134 Console.WriteLine("changing name to "+ Util.FieldToString(packet.Name)); 134 System.Console.WriteLine("changing name to "+ Util.FieldToString(packet.Name));
135 InventoryItem Item = this.InventoryItems[itemID]; 135 InventoryItem Item = this.InventoryItems[itemID];
136 Item.Name = Util.FieldToString(packet.Name); 136 Item.Name = Util.FieldToString(packet.Name);
137 Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated()); 137 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated());
138 //TODO need to update the rest of the info 138 //TODO need to update the rest of the info
139 } 139 }
140 return true; 140 return true;
diff --git a/Common/OpenSim.Framework/HeightMapGenHills.cs b/Common/OpenSim.Framework/HeightMapGenHills.cs
deleted file mode 100644
index 6a729da..0000000
--- a/Common/OpenSim.Framework/HeightMapGenHills.cs
+++ /dev/null
@@ -1,149 +0,0 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
27
28using System;
29
30namespace OpenSim.Framework.Terrain
31{
32 public class HeightmapGenHills
33 {
34 private Random Rand = new Random();
35 private int NumHills;
36 private float HillMin;
37 private float HillMax;
38 private bool Island;
39 private float[] heightmap;
40
41 public float[] GenerateHeightmap(int numHills, float hillMin, float hillMax, bool island)
42 {
43 NumHills = numHills;
44 HillMin = hillMin;
45 HillMax = hillMax;
46 Island = island;
47
48 heightmap = new float[256 * 256];
49
50 for (int i = 0; i < numHills; i++)
51 {
52 AddHill();
53 }
54
55 Normalize();
56
57 return heightmap;
58 }
59
60 private void AddHill()
61 {
62 float x, y;
63 float radius = RandomRange(HillMin, HillMax);
64
65 if (Island)
66 {
67 // Which direction from the center of the map the hill is placed
68 float theta = RandomRange(0, 6.28f);
69
70 // How far from the center of the map to place the hill. The radius
71 // is subtracted from the range to prevent any part of the hill from
72 // reaching the edge of the map
73 float distance = RandomRange(radius / 2.0f, 128.0f - radius);
74
75 x = 128.0f + (float)Math.Cos(theta) * distance;
76 y = 128.0f + (float)Math.Sin(theta) * distance;
77 }
78 else
79 {
80 x = RandomRange(-radius, 256.0f + radius);
81 y = RandomRange(-radius, 256.0f + radius);
82 }
83
84 float radiusSq = radius * radius;
85 float distSq;
86 float height;
87
88 int xMin = (int)(x - radius) - 1;
89 int xMax = (int)(x + radius) + 1;
90 if (xMin < 0) xMin = 0;
91 if (xMax > 255) xMax = 255;
92
93 int yMin = (int)(y - radius) - 1;
94 int yMax = (int)(y + radius) + 1;
95 if (yMin < 0) yMin = 0;
96 if (yMax > 255) yMax = 255;
97
98 // Loop through each affected cell and determine the height at that point
99 for (int v = yMin; v <= yMax; ++v)
100 {
101 float fv = (float)v;
102
103 for (int h = xMin; h <= xMax; ++h)
104 {
105 float fh = (float)h;
106
107 // Determine how far from the center of this hill this point is
108 distSq = (x - fh) * (x - fh) + (y - fv) * (y - fv);
109 height = radiusSq - distSq;
110
111 // Don't add negative hill values
112 if (height > 0.0f) heightmap[h + v * 256] += height;
113 }
114 }
115 }
116
117 private void Normalize()
118 {
119 float min = heightmap[0];
120 float max = heightmap[0];
121
122 for (int x = 0; x < 256; x++)
123 {
124 for (int y = 0; y < 256; y++)
125 {
126 if (heightmap[x + y * 256] < min) min = heightmap[x + y * 256];
127 if (heightmap[x + y * 256] > max) max = heightmap[x + y * 256];
128 }
129 }
130
131 // Avoid a rare divide by zero
132 if (min != max)
133 {
134 for (int x = 0; x < 256; x++)
135 {
136 for (int y = 0; y < 256; y++)
137 {
138 heightmap[x + y * 256] = ((heightmap[x + y * 256] - min) / (max - min)) * (HillMax - HillMin);
139 }
140 }
141 }
142 }
143
144 private float RandomRange(float min, float max)
145 {
146 return (float)Rand.NextDouble() * (max - min) + min;
147 }
148 }
149}
diff --git a/Common/OpenSim.Framework/Interfaces/IGenericConfig.cs b/Common/OpenSim.Framework/Interfaces/Config/IGenericConfig.cs
index a853fe4..a853fe4 100644
--- a/Common/OpenSim.Framework/Interfaces/IGenericConfig.cs
+++ b/Common/OpenSim.Framework/Interfaces/Config/IGenericConfig.cs
diff --git a/Common/OpenSim.Framework/Interfaces/IGridConfig.cs b/Common/OpenSim.Framework/Interfaces/Config/IGridConfig.cs
index b2f26da..b2f26da 100644
--- a/Common/OpenSim.Framework/Interfaces/IGridConfig.cs
+++ b/Common/OpenSim.Framework/Interfaces/Config/IGridConfig.cs
diff --git a/Common/OpenSim.Framework/Interfaces/IUserConfig.cs b/Common/OpenSim.Framework/Interfaces/Config/IUserConfig.cs
index e15867d..e15867d 100644
--- a/Common/OpenSim.Framework/Interfaces/IUserConfig.cs
+++ b/Common/OpenSim.Framework/Interfaces/Config/IUserConfig.cs
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
index b6ae232..add6c00 100644
--- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
+++ b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
@@ -35,7 +35,6 @@ namespace OpenSim.Framework.Interfaces
35 event StartAnim OnStartAnim; 35 event StartAnim OnStartAnim;
36 event LinkObjects OnLinkObjects; 36 event LinkObjects OnLinkObjects;
37 event GenericCall4 OnDeRezObject; 37 event GenericCall4 OnDeRezObject;
38 event ModifyTerrain OnModifyTerrain;
39 event GenericCall OnRegionHandShakeReply; 38 event GenericCall OnRegionHandShakeReply;
40 event GenericCall OnRequestWearables; 39 event GenericCall OnRequestWearables;
41 event GenericCall2 OnCompleteMovementToRegion; 40 event GenericCall2 OnCompleteMovementToRegion;
@@ -57,6 +56,13 @@ namespace OpenSim.Framework.Interfaces
57 get; 56 get;
58 set; 57 set;
59 } 58 }
59
60 LLUUID AgentId
61 {
62 get;
63 }
64
65 void OutPacket(Packet newPack);
60 void SendAppearance(AvatarWearable[] wearables); 66 void SendAppearance(AvatarWearable[] wearables);
61 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 67 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
62 } 68 }
diff --git a/Common/OpenSim.Framework/Interfaces/IConfig.cs b/Common/OpenSim.Framework/Interfaces/IConfig.cs
deleted file mode 100644
index 7b4c040..0000000
--- a/Common/OpenSim.Framework/Interfaces/IConfig.cs
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3
4* Copyright (c) <year>, <copyright holder>
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30using System;
31using System.Collections.Generic;
32using System.IO;
33using libsecondlife;
34//using OpenSim.world;
35
36namespace OpenSim.Framework.Interfaces
37{
38 /// <summary>
39 /// This class handles connection to the underlying database used for configuration of the region.
40 /// Region content is also stored by this class. The main entry point is InitConfig() which attempts to locate
41 /// opensim.yap in the current working directory. If opensim.yap can not be found, default settings are loaded from
42 /// what is hardcoded here and then saved into opensim.yap for future startups.
43 /// </summary>
44
45
46 public abstract class SimConfig
47 {
48 public string RegionName;
49
50 public uint RegionLocX;
51 public uint RegionLocY;
52 public ulong RegionHandle;
53
54 public int IPListenPort;
55 public string IPListenAddr;
56
57 public string AssetURL;
58 public string AssetSendKey;
59
60 public string GridURL;
61 public string GridSendKey;
62 public string GridRecvKey;
63 public string UserURL;
64 public string UserSendKey;
65 public string UserRecvKey;
66
67 public abstract void InitConfig(bool sandboxMode);
68 public abstract void LoadFromGrid();
69
70 }
71
72 public interface ISimConfig
73 {
74 SimConfig GetConfigObject();
75 }
76}
diff --git a/Common/OpenSim.Framework/Interfaces/IWorld.cs b/Common/OpenSim.Framework/Interfaces/IWorld.cs
new file mode 100644
index 0000000..433e540
--- /dev/null
+++ b/Common/OpenSim.Framework/Interfaces/IWorld.cs
@@ -0,0 +1,15 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Types;
6
7namespace OpenSim.Framework.Interfaces
8{
9 public interface IWorld
10 {
11 bool AddNewAvatar(IClientAPI remoteClient, bool childAgent);
12 bool RemoveAvatar(LLUUID agentID);
13 RegionInfo GetRegionInfo();
14 }
15}
diff --git a/Common/OpenSim.Framework/Interfaces/Remoting/IGridServerHost.cs b/Common/OpenSim.Framework/Interfaces/Remoting/IGridServerHost.cs
new file mode 100644
index 0000000..1569cb2
--- /dev/null
+++ b/Common/OpenSim.Framework/Interfaces/Remoting/IGridServerHost.cs
@@ -0,0 +1,12 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public interface IGridServerHost
8 {
9 void ConnectSim(string name);
10 string RequestSimURL(uint regionHandle);
11 }
12}
diff --git a/Common/OpenSim.Framework/Interfaces/Remoting/IProxyServerClient.cs b/Common/OpenSim.Framework/Interfaces/Remoting/IProxyServerClient.cs
new file mode 100644
index 0000000..b58bcba
--- /dev/null
+++ b/Common/OpenSim.Framework/Interfaces/Remoting/IProxyServerClient.cs
@@ -0,0 +1,10 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public interface IProxyServerClient
8 {
9 }
10}
diff --git a/Common/OpenSim.Framework/Interfaces/Remoting/IProxyServerHost.cs b/Common/OpenSim.Framework/Interfaces/Remoting/IProxyServerHost.cs
new file mode 100644
index 0000000..381d53b
--- /dev/null
+++ b/Common/OpenSim.Framework/Interfaces/Remoting/IProxyServerHost.cs
@@ -0,0 +1,10 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public interface IProxyServerHost
8 {
9 }
10}
diff --git a/Common/OpenSim.Framework/Interfaces/Remoting/IRegionGridClient.cs b/Common/OpenSim.Framework/Interfaces/Remoting/IRegionGridClient.cs
new file mode 100644
index 0000000..7f8ecaf
--- /dev/null
+++ b/Common/OpenSim.Framework/Interfaces/Remoting/IRegionGridClient.cs
@@ -0,0 +1,11 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public interface IRegionGridClient
8 {
9 bool ExpectUser(string toRegionID, string name);
10 }
11}
diff --git a/Common/OpenSim.Framework/Interfaces/Remoting/IRegionSimHost.cs b/Common/OpenSim.Framework/Interfaces/Remoting/IRegionSimHost.cs
new file mode 100644
index 0000000..c22fe29
--- /dev/null
+++ b/Common/OpenSim.Framework/Interfaces/Remoting/IRegionSimHost.cs
@@ -0,0 +1,12 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public interface IRegionSimHost
8 {
9 bool ExpectUser(string name);
10 bool AgentCrossing(string name);
11 }
12}
diff --git a/Common/OpenSim.Framework/Interfaces/Remoting/RegionGridClientBase.cs b/Common/OpenSim.Framework/Interfaces/Remoting/RegionGridClientBase.cs
new file mode 100644
index 0000000..28b3128
--- /dev/null
+++ b/Common/OpenSim.Framework/Interfaces/Remoting/RegionGridClientBase.cs
@@ -0,0 +1,11 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public abstract class RegionGridClientBase :IRegionGridClient
8 {
9 public abstract bool ExpectUser(string toRegionID, string name);
10 }
11}
diff --git a/Common/OpenSim.Framework/Interfaces/IScriptAPI.cs b/Common/OpenSim.Framework/Interfaces/Scripting/IScriptAPI.cs
index 3ad0f06..3ad0f06 100644
--- a/Common/OpenSim.Framework/Interfaces/IScriptAPI.cs
+++ b/Common/OpenSim.Framework/Interfaces/Scripting/IScriptAPI.cs
diff --git a/Common/OpenSim.Framework/Interfaces/IScriptEngine.cs b/Common/OpenSim.Framework/Interfaces/Scripting/IScriptEngine.cs
index ed8974c..ed8974c 100644
--- a/Common/OpenSim.Framework/Interfaces/IScriptEngine.cs
+++ b/Common/OpenSim.Framework/Interfaces/Scripting/IScriptEngine.cs
diff --git a/Common/OpenSim.Framework/OpenSim.Framework.csproj b/Common/OpenSim.Framework/OpenSim.Framework.csproj
index f58a2d7..519d5a8 100644
--- a/Common/OpenSim.Framework/OpenSim.Framework.csproj
+++ b/Common/OpenSim.Framework/OpenSim.Framework.csproj
@@ -1,4 +1,4 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup> 2 <PropertyGroup>
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
@@ -6,7 +6,8 @@
6 <ProjectGuid>{8ACA2445-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{8ACA2445-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon>
10 </ApplicationIcon>
10 <AssemblyKeyContainerName> 11 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 12 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Framework</AssemblyName> 13 <AssemblyName>OpenSim.Framework</AssemblyName>
@@ -15,9 +16,11 @@
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 17 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 18 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 19 <AppDesignerFolder>
20 </AppDesignerFolder>
19 <RootNamespace>OpenSim.Framework</RootNamespace> 21 <RootNamespace>OpenSim.Framework</RootNamespace>
20 <StartupObject></StartupObject> 22 <StartupObject>
23 </StartupObject>
21 <FileUpgradeFlags> 24 <FileUpgradeFlags>
22 </FileUpgradeFlags> 25 </FileUpgradeFlags>
23 </PropertyGroup> 26 </PropertyGroup>
@@ -28,7 +31,8 @@
28 <ConfigurationOverrideFile> 31 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile> 32 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants> 33 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile> 34 <DocumentationFile>
35 </DocumentationFile>
32 <DebugSymbols>True</DebugSymbols> 36 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 37 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 38 <Optimize>False</Optimize>
@@ -37,7 +41,8 @@
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 41 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 42 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel> 43 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn> 44 <NoWarn>
45 </NoWarn>
41 </PropertyGroup> 46 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 47 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks> 48 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -46,7 +51,8 @@
46 <ConfigurationOverrideFile> 51 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile> 52 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants> 53 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile> 54 <DocumentationFile>
55 </DocumentationFile>
50 <DebugSymbols>False</DebugSymbols> 56 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 57 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 58 <Optimize>True</Optimize>
@@ -55,32 +61,38 @@
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 61 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 62 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel> 63 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn> 64 <NoWarn>
65 </NoWarn>
59 </PropertyGroup> 66 </PropertyGroup>
60 <ItemGroup> 67 <ItemGroup>
61 <Reference Include="System" > 68 <Reference Include="System">
62 <HintPath>System.dll</HintPath> 69 <HintPath>System.dll</HintPath>
63 <Private>False</Private> 70 <Private>False</Private>
64 </Reference> 71 </Reference>
65 <Reference Include="System.Xml" > 72 <Reference Include="System.Data" />
73 <Reference Include="System.Xml">
66 <HintPath>System.Xml.dll</HintPath> 74 <HintPath>System.Xml.dll</HintPath>
67 <Private>False</Private> 75 <Private>False</Private>
68 </Reference> 76 </Reference>
69 <Reference Include="libsecondlife.dll" > 77 <Reference Include="libsecondlife.dll">
70 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 78 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
71 <Private>False</Private> 79 <Private>False</Private>
72 </Reference> 80 </Reference>
73 <Reference Include="Db4objects.Db4o.dll" > 81 <Reference Include="Db4objects.Db4o.dll">
74 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> 82 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
75 <Private>False</Private> 83 <Private>False</Private>
76 </Reference> 84 </Reference>
77 </ItemGroup> 85 </ItemGroup>
78 <ItemGroup> 86 <ItemGroup>
87 <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
88 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
89 <Name>OpenSim.Framework.Console</Name>
90 </ProjectReference>
79 <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj"> 91 <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
80 <Name>XMLRPC</Name> 92 <Name>XMLRPC</Name>
81 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> 93 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 94 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private> 95 <Private>False</Private>
84 </ProjectReference> 96 </ProjectReference>
85 </ItemGroup> 97 </ItemGroup>
86 <ItemGroup> 98 <ItemGroup>
@@ -90,21 +102,15 @@
90 <Compile Include="BlockingQueue.cs"> 102 <Compile Include="BlockingQueue.cs">
91 <SubType>Code</SubType> 103 <SubType>Code</SubType>
92 </Compile> 104 </Compile>
93 <Compile Include="HeightMapGenHills.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="LoginService.cs"> 105 <Compile Include="LoginService.cs">
97 <SubType>Code</SubType> 106 <SubType>Code</SubType>
98 </Compile> 107 </Compile>
99 <Compile Include="Remoting.cs"> 108 <Compile Include="Remoting.cs">
100 <SubType>Code</SubType> 109 <SubType>Code</SubType>
101 </Compile> 110 </Compile>
102 <Compile Include="SimProfile.cs"> 111 <Compile Include="SimProfile.cs" />
103 <SubType>Code</SubType> 112 <Compile Include="SimProfileBase.cs" />
104 </Compile> 113 <Compile Include="Types\NetworkServersInfo.cs" />
105 <Compile Include="SimProfileBase.cs">
106 <SubType>Code</SubType>
107 </Compile>
108 <Compile Include="UserProfile.cs"> 114 <Compile Include="UserProfile.cs">
109 <SubType>Code</SubType> 115 <SubType>Code</SubType>
110 </Compile> 116 </Compile>
@@ -123,37 +129,55 @@
123 <Compile Include="Interfaces\IClientAPI.cs"> 129 <Compile Include="Interfaces\IClientAPI.cs">
124 <SubType>Code</SubType> 130 <SubType>Code</SubType>
125 </Compile> 131 </Compile>
126 <Compile Include="Interfaces\IConfig.cs"> 132 <Compile Include="Interfaces\IGridServer.cs">
127 <SubType>Code</SubType> 133 <SubType>Code</SubType>
128 </Compile> 134 </Compile>
129 <Compile Include="Interfaces\IGenericConfig.cs"> 135 <Compile Include="Interfaces\ILocalStorage.cs">
130 <SubType>Code</SubType> 136 <SubType>Code</SubType>
131 </Compile> 137 </Compile>
132 <Compile Include="Interfaces\IGridConfig.cs"> 138 <Compile Include="Interfaces\IUserServer.cs">
133 <SubType>Code</SubType> 139 <SubType>Code</SubType>
134 </Compile> 140 </Compile>
135 <Compile Include="Interfaces\IGridServer.cs"> 141 <Compile Include="Interfaces\IWorld.cs">
136 <SubType>Code</SubType> 142 <SubType>Code</SubType>
137 </Compile> 143 </Compile>
138 <Compile Include="Interfaces\ILocalStorage.cs"> 144 <Compile Include="Interfaces\LocalGridBase.cs">
139 <SubType>Code</SubType> 145 <SubType>Code</SubType>
140 </Compile> 146 </Compile>
141 <Compile Include="Interfaces\IScriptAPI.cs"> 147 <Compile Include="Interfaces\RemoteGridBase.cs">
142 <SubType>Code</SubType> 148 <SubType>Code</SubType>
143 </Compile> 149 </Compile>
144 <Compile Include="Interfaces\IScriptEngine.cs"> 150 <Compile Include="Interfaces\Config\IGenericConfig.cs">
145 <SubType>Code</SubType> 151 <SubType>Code</SubType>
146 </Compile> 152 </Compile>
147 <Compile Include="Interfaces\IUserConfig.cs"> 153 <Compile Include="Interfaces\Config\IGridConfig.cs">
148 <SubType>Code</SubType> 154 <SubType>Code</SubType>
149 </Compile> 155 </Compile>
150 <Compile Include="Interfaces\IUserServer.cs"> 156 <Compile Include="Interfaces\Config\IUserConfig.cs">
151 <SubType>Code</SubType> 157 <SubType>Code</SubType>
152 </Compile> 158 </Compile>
153 <Compile Include="Interfaces\LocalGridBase.cs"> 159 <Compile Include="Interfaces\Remoting\IGridServerHost.cs">
154 <SubType>Code</SubType> 160 <SubType>Code</SubType>
155 </Compile> 161 </Compile>
156 <Compile Include="Interfaces\RemoteGridBase.cs"> 162 <Compile Include="Interfaces\Remoting\IProxyServerClient.cs">
163 <SubType>Code</SubType>
164 </Compile>
165 <Compile Include="Interfaces\Remoting\IProxyServerHost.cs">
166 <SubType>Code</SubType>
167 </Compile>
168 <Compile Include="Interfaces\Remoting\IRegionGridClient.cs">
169 <SubType>Code</SubType>
170 </Compile>
171 <Compile Include="Interfaces\Remoting\IRegionSimHost.cs">
172 <SubType>Code</SubType>
173 </Compile>
174 <Compile Include="Interfaces\Remoting\RegionGridClientBase.cs">
175 <SubType>Code</SubType>
176 </Compile>
177 <Compile Include="Interfaces\Scripting\IScriptAPI.cs">
178 <SubType>Code</SubType>
179 </Compile>
180 <Compile Include="Interfaces\Scripting\IScriptEngine.cs">
157 <SubType>Code</SubType> 181 <SubType>Code</SubType>
158 </Compile> 182 </Compile>
159 <Compile Include="Properties\AssemblyInfo.cs"> 183 <Compile Include="Properties\AssemblyInfo.cs">
@@ -183,6 +207,9 @@
183 <Compile Include="Types\PrimData.cs"> 207 <Compile Include="Types\PrimData.cs">
184 <SubType>Code</SubType> 208 <SubType>Code</SubType>
185 </Compile> 209 </Compile>
210 <Compile Include="Types\RegionInfo.cs">
211 <SubType>Code</SubType>
212 </Compile>
186 </ItemGroup> 213 </ItemGroup>
187 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> 214 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
188 <PropertyGroup> 215 <PropertyGroup>
@@ -191,4 +218,4 @@
191 <PostBuildEvent> 218 <PostBuildEvent>
192 </PostBuildEvent> 219 </PostBuildEvent>
193 </PropertyGroup> 220 </PropertyGroup>
194</Project> 221</Project> \ No newline at end of file
diff --git a/Common/OpenSim.Framework/SimProfile.cs b/Common/OpenSim.Framework/SimProfile.cs
index 8acb20b..6b3742a 100644
--- a/Common/OpenSim.Framework/SimProfile.cs
+++ b/Common/OpenSim.Framework/SimProfile.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework.Sims
37 } 37 }
38 catch (Exception e) 38 catch (Exception e)
39 { 39 {
40 Console.WriteLine(e.ToString()); 40 System.Console.WriteLine(e.ToString());
41 } 41 }
42 return this; 42 return this;
43 } 43 }
@@ -69,7 +69,7 @@ namespace OpenSim.Framework.Sims
69 } 69 }
70 catch (Exception e) 70 catch (Exception e)
71 { 71 {
72 Console.WriteLine(e.ToString()); 72 System.Console.WriteLine(e.ToString());
73 } 73 }
74 return this; 74 return this;
75 } 75 }
diff --git a/Common/OpenSim.Framework/Types/NeighbourInfo.cs b/Common/OpenSim.Framework/Types/NeighbourInfo.cs
index 58b6cb1..ed252fb 100644
--- a/Common/OpenSim.Framework/Types/NeighbourInfo.cs
+++ b/Common/OpenSim.Framework/Types/NeighbourInfo.cs
@@ -1,6 +1,10 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Interfaces;
5using OpenSim.Framework.Utilities;
6using OpenSim.Framework.Console;
7using libsecondlife;
4 8
5namespace OpenSim.Framework.Types 9namespace OpenSim.Framework.Types
6{ 10{
diff --git a/Common/OpenSim.Framework/Types/NetworkServersInfo.cs b/Common/OpenSim.Framework/Types/NetworkServersInfo.cs
new file mode 100644
index 0000000..84943aa
--- /dev/null
+++ b/Common/OpenSim.Framework/Types/NetworkServersInfo.cs
@@ -0,0 +1,91 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Interfaces;
5
6namespace OpenSim.Framework.Types
7{
8 public class NetworkServersInfo
9 {
10 public string AssetURL = "http://127.0.0.1:8003/";
11 public string AssetSendKey = "";
12
13 public string GridURL = "";
14 public string GridSendKey = "";
15 public string GridRecvKey = "";
16 public string UserURL = "";
17 public string UserSendKey = "";
18 public string UserRecvKey = "";
19 public bool isSandbox;
20
21 public void InitConfig(bool sandboxMode, IGenericConfig configData)
22 {
23 this.isSandbox = sandboxMode;
24
25 try
26 {
27 if (!isSandbox)
28 {
29 string attri = "";
30 //Grid Server URL
31 attri = "";
32 attri = configData.GetAttribute("GridServerURL");
33 if (attri == "")
34 {
35 this.GridURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/");
36 configData.SetAttribute("GridServerURL", this.GridURL);
37 }
38 else
39 {
40 this.GridURL = attri;
41 }
42
43 //Grid Send Key
44 attri = "";
45 attri = configData.GetAttribute("GridSendKey");
46 if (attri == "")
47 {
48 this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server", "null");
49 configData.SetAttribute("GridSendKey", this.GridSendKey);
50 }
51 else
52 {
53 this.GridSendKey = attri;
54 }
55
56 //Grid Receive Key
57 attri = "";
58 attri = configData.GetAttribute("GridRecvKey");
59 if (attri == "")
60 {
61 this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server", "null");
62 configData.SetAttribute("GridRecvKey", this.GridRecvKey);
63 }
64 else
65 {
66 this.GridRecvKey = attri;
67 }
68
69 attri = "";
70 attri = configData.GetAttribute("AssetServerURL");
71 if (attri == "")
72 {
73 this.AssetURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/");
74 configData.SetAttribute("AssetServerURL", this.GridURL);
75 }
76 else
77 {
78 this.AssetURL = attri;
79 }
80
81 }
82 configData.Commit();
83 }
84 catch (Exception e)
85 {
86 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "Config.cs:InitConfig() - Exception occured");
87 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, e.ToString());
88 }
89 }
90 }
91}
diff --git a/Common/OpenSim.Framework/Types/RegionInfo.cs b/Common/OpenSim.Framework/Types/RegionInfo.cs
new file mode 100644
index 0000000..fd3b24f
--- /dev/null
+++ b/Common/OpenSim.Framework/Types/RegionInfo.cs
@@ -0,0 +1,198 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Interfaces;
5using OpenSim.Framework.Utilities;
6using OpenSim.Framework.Console;
7using libsecondlife;
8
9namespace OpenSim.Framework.Types
10{
11 public class RegionInfo
12 {
13 public LLUUID SimUUID;
14 public string RegionName;
15 public uint RegionLocX;
16 public uint RegionLocY;
17 public ulong RegionHandle;
18 public ushort RegionWaterHeight = 20;
19 public bool RegionTerraform = true;
20
21 public int IPListenPort;
22 public string IPListenAddr;
23
24 private bool isSandbox;
25 public string DataStore;
26
27 // Region Information
28 // Low resolution 'base' textures. No longer used.
29 public LLUUID TerrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); // Default
30 public LLUUID TerrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); // Default
31 public LLUUID TerrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); // Default
32 public LLUUID TerrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); // Default
33 // Higher resolution terrain textures
34 public LLUUID TerrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000");
35 public LLUUID TerrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000");
36 public LLUUID TerrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000");
37 public LLUUID TerrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000");
38 // First quad - each point is bilinearly interpolated at each meter of terrain
39 public float TerrainStartHeight00 = 10.0f; // NW Corner ( I think )
40 public float TerrainStartHeight01 = 10.0f; // NE Corner ( I think )
41 public float TerrainStartHeight10 = 10.0f; // SW Corner ( I think )
42 public float TerrainStartHeight11 = 10.0f; // SE Corner ( I think )
43 // Second quad - also bilinearly interpolated.
44 // Terrain texturing is done that:
45 // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y]
46 public float TerrainHeightRange00 = 60.0f;
47 public float TerrainHeightRange01 = 60.0f;
48 public float TerrainHeightRange10 = 60.0f;
49 public float TerrainHeightRange11 = 60.0f;
50
51 // Terrain Default (Must be in F32 Format!)
52 public string TerrainFile = "default.r32";
53 public double TerrainMultiplier = 60.0;
54
55 public RegionInfo()
56 {
57
58 }
59
60
61 public void InitConfig(bool sandboxMode, IGenericConfig configData)
62 {
63 this.isSandbox = sandboxMode;
64 try
65 {
66 // Sim UUID
67 string attri = "";
68 attri = configData.GetAttribute("SimUUID");
69 if (attri == "")
70 {
71 this.SimUUID = LLUUID.Random();
72 configData.SetAttribute("SimUUID", this.SimUUID.ToString());
73 }
74 else
75 {
76 this.SimUUID = new LLUUID(attri);
77 }
78
79 // Sim name
80 attri = "";
81 attri = configData.GetAttribute("SimName");
82 if (attri == "")
83 {
84 this.RegionName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Name", "OpenSim test");
85 configData.SetAttribute("SimName", this.RegionName);
86 }
87 else
88 {
89 this.RegionName = attri;
90 }
91 // Sim/Grid location X
92 attri = "";
93 attri = configData.GetAttribute("SimLocationX");
94 if (attri == "")
95 {
96 string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X", "997");
97 configData.SetAttribute("SimLocationX", location);
98 this.RegionLocX = (uint)Convert.ToUInt32(location);
99 }
100 else
101 {
102 this.RegionLocX = (uint)Convert.ToUInt32(attri);
103 }
104 // Sim/Grid location Y
105 attri = "";
106 attri = configData.GetAttribute("SimLocationY");
107 if (attri == "")
108 {
109 string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y", "996");
110 configData.SetAttribute("SimLocationY", location);
111 this.RegionLocY = (uint)Convert.ToUInt32(location);
112 }
113 else
114 {
115 this.RegionLocY = (uint)Convert.ToUInt32(attri);
116 }
117
118 // Local storage datastore
119 attri = "";
120 attri = configData.GetAttribute("Datastore");
121 if (attri == "")
122 {
123 string datastore = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Filename for local storage", "localworld.yap");
124 configData.SetAttribute("Datastore", datastore);
125 this.DataStore = datastore;
126 }
127 else
128 {
129 this.DataStore = attri;
130 }
131
132 //Sim Listen Port
133 attri = "";
134 attri = configData.GetAttribute("SimListenPort");
135 if (attri == "")
136 {
137 string port = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("UDP port for client connections", "9000");
138 configData.SetAttribute("SimListenPort", port);
139 this.IPListenPort = Convert.ToInt32(port);
140 }
141 else
142 {
143 this.IPListenPort = Convert.ToInt32(attri);
144 }
145
146 //Sim Listen Address
147 attri = "";
148 attri = configData.GetAttribute("SimListenAddress");
149 if (attri == "")
150 {
151 this.IPListenAddr = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("IP Address to listen on for client connections", "127.0.0.1");
152 configData.SetAttribute("SimListenAddress", this.IPListenAddr);
153 }
154 else
155 {
156 // Probably belongs elsewhere, but oh well.
157 if (attri.Trim().StartsWith("SYSTEMIP"))
158 {
159 string localhostname = System.Net.Dns.GetHostName();
160 System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname);
161 try
162 {
163 this.IPListenAddr = ips[0].ToString();
164 }
165 catch (Exception e)
166 {
167 e.ToString();
168 this.IPListenAddr = "127.0.0.1"; // Use the default if we fail
169 }
170 }
171 else
172 {
173 this.IPListenAddr = attri;
174 }
175 }
176
177
178 this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
179
180 configData.Commit();
181 }
182 catch (Exception e)
183 {
184 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Config.cs:InitConfig() - Exception occured");
185 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
186 }
187
188 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Sim settings loaded:");
189 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "UUID: " + this.SimUUID.ToStringHyphenated());
190 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Name: " + this.RegionName);
191 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]");
192 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Handle: " + this.RegionHandle.ToString());
193 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort);
194 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Sandbox Mode? " + isSandbox.ToString());
195
196 }
197 }
198}
diff --git a/Common/OpenSim.Framework/UserProfileManager.cs b/Common/OpenSim.Framework/UserProfileManager.cs
index 18b3513..739c54c 100644
--- a/Common/OpenSim.Framework/UserProfileManager.cs
+++ b/Common/OpenSim.Framework/UserProfileManager.cs
@@ -139,12 +139,12 @@ namespace OpenSim.Framework.User
139 ClassifiedCategories.Add(ClassifiedCategoriesHash); 139 ClassifiedCategories.Add(ClassifiedCategoriesHash);
140 140
141 ArrayList AgentInventory = new ArrayList(); 141 ArrayList AgentInventory = new ArrayList();
142 Console.WriteLine("adding inventory to response"); 142 System.Console.WriteLine("adding inventory to response");
143 Hashtable TempHash; 143 Hashtable TempHash;
144 foreach (InventoryFolder InvFolder in TheUser.Inventory.InventoryFolders.Values) 144 foreach (InventoryFolder InvFolder in TheUser.Inventory.InventoryFolders.Values)
145 { 145 {
146 TempHash = new Hashtable(); 146 TempHash = new Hashtable();
147 Console.WriteLine("adding folder " + InvFolder.FolderName + ", ID: " + InvFolder.FolderID.ToStringHyphenated() + " with parent: " + InvFolder.ParentID.ToStringHyphenated()); 147 System.Console.WriteLine("adding folder " + InvFolder.FolderName + ", ID: " + InvFolder.FolderID.ToStringHyphenated() + " with parent: " + InvFolder.ParentID.ToStringHyphenated());
148 TempHash["name"] = InvFolder.FolderName; 148 TempHash["name"] = InvFolder.FolderName;
149 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); 149 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
150 TempHash["version"] = (Int32)InvFolder.Version; 150 TempHash["version"] = (Int32)InvFolder.Version;
@@ -206,7 +206,7 @@ namespace OpenSim.Framework.User
206 } 206 }
207 catch (Exception E) 207 catch (Exception E)
208 { 208 {
209 Console.WriteLine(E.ToString()); 209 System.Console.WriteLine(E.ToString());
210 } 210 }
211 //} 211 //}
212 } 212 }
@@ -251,7 +251,7 @@ namespace OpenSim.Framework.User
251 response["region_x"] = (Int32)SimInfo.RegionLocX * 256; 251 response["region_x"] = (Int32)SimInfo.RegionLocX * 256;
252 252
253 //default is ogs user server, so let the sim know about the user via a XmlRpcRequest 253 //default is ogs user server, so let the sim know about the user via a XmlRpcRequest
254 Console.WriteLine(SimInfo.caps_url); 254 System.Console.WriteLine(SimInfo.caps_url);
255 Hashtable SimParams = new Hashtable(); 255 Hashtable SimParams = new Hashtable();
256 SimParams["session_id"] = theUser.CurrentSessionID.ToString(); 256 SimParams["session_id"] = theUser.CurrentSessionID.ToString();
257 SimParams["secure_session_id"] = theUser.CurrentSecureSessionID.ToString(); 257 SimParams["secure_session_id"] = theUser.CurrentSecureSessionID.ToString();
diff --git a/Common/OpenSim.Framework/UserProfileManagerBase.cs b/Common/OpenSim.Framework/UserProfileManagerBase.cs
index d1307a5..477de1b 100644
--- a/Common/OpenSim.Framework/UserProfileManagerBase.cs
+++ b/Common/OpenSim.Framework/UserProfileManagerBase.cs
@@ -26,7 +26,7 @@ namespace OpenSim.Framework.User
26 { 26 {
27 UserProfiles.Add(userprof.UUID, userprof); 27 UserProfiles.Add(userprof.UUID, userprof);
28 } 28 }
29 Console.WriteLine("UserProfiles.Cs:InitUserProfiles() - Successfully loaded " + result.Count.ToString() + " from database"); 29 System.Console.WriteLine("UserProfiles.Cs:InitUserProfiles() - Successfully loaded " + result.Count.ToString() + " from database");
30 db.Close(); 30 db.Close();
31 } 31 }
32 32
@@ -73,18 +73,18 @@ namespace OpenSim.Framework.User
73 { 73 {
74 if (TheUser.MD5passwd == passwd) 74 if (TheUser.MD5passwd == passwd)
75 { 75 {
76 Console.WriteLine("UserProfile - authorised " + firstname + " " + lastname); 76 System.Console.WriteLine("UserProfile - authorised " + firstname + " " + lastname);
77 return true; 77 return true;
78 } 78 }
79 else 79 else
80 { 80 {
81 Console.WriteLine("UserProfile - not authorised, password not match " + TheUser.MD5passwd + " and " + passwd); 81 System.Console.WriteLine("UserProfile - not authorised, password not match " + TheUser.MD5passwd + " and " + passwd);
82 return false; 82 return false;
83 } 83 }
84 } 84 }
85 else 85 else
86 { 86 {
87 Console.WriteLine("UserProfile - not authorised , unkown: " + firstname + " , " + lastname); 87 System.Console.WriteLine("UserProfile - not authorised , unkown: " + firstname + " , " + lastname);
88 return false; 88 return false;
89 } 89 }
90 90
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.User
97 97
98 public virtual UserProfile CreateNewProfile(string firstname, string lastname, string MD5passwd) 98 public virtual UserProfile CreateNewProfile(string firstname, string lastname, string MD5passwd)
99 { 99 {
100 Console.WriteLine("creating new profile for : " + firstname + " , " + lastname); 100 System.Console.WriteLine("creating new profile for : " + firstname + " , " + lastname);
101 UserProfile newprofile = new UserProfile(); 101 UserProfile newprofile = new UserProfile();
102 newprofile.homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256)); 102 newprofile.homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256));
103 newprofile.firstname = firstname; 103 newprofile.firstname = firstname;