diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim.Framework/PrimData.cs | 4 | ||||
-rw-r--r-- | OpenSim.GenericConfig/Xml/XmlConfig.cs | 2 | ||||
-rw-r--r-- | OpenSim.RegionServer/Assets/AssetCache.cs | 3 | ||||
-rw-r--r-- | OpenSim.RegionServer/CAPS/AdminWebFront.cs | 4 | ||||
-rw-r--r-- | OpenSim.RegionServer/OpenSimMain.cs | 30 | ||||
-rw-r--r-- | OpenSim.RegionServer/PacketServer.cs | 13 | ||||
-rw-r--r-- | OpenSim.RegionServer/RegionInfo.cs | 8 | ||||
-rw-r--r-- | OpenSim.RegionServer/world/Primitive.cs | 38 |
8 files changed, 33 insertions, 69 deletions
diff --git a/OpenSim.Framework/PrimData.cs b/OpenSim.Framework/PrimData.cs index ce53c28..ee4188d 100644 --- a/OpenSim.Framework/PrimData.cs +++ b/OpenSim.Framework/PrimData.cs | |||
@@ -151,6 +151,10 @@ namespace OpenSim.Framework.Assets | |||
151 | bytes[i++] = (byte)((this.BaseMask >> 16) % 256); | 151 | bytes[i++] = (byte)((this.BaseMask >> 16) % 256); |
152 | bytes[i++] = (byte)((this.BaseMask >> 24) % 256); | 152 | bytes[i++] = (byte)((this.BaseMask >> 24) % 256); |
153 | Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12; | 153 | Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12; |
154 | if (this.Rotation == new LLQuaternion(0,0,0,0)) | ||
155 | { | ||
156 | this.Rotation = new LLQuaternion(0, 1, 0, 0); | ||
157 | } | ||
154 | Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12; | 158 | Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12; |
155 | bytes[i++] = (byte)(this.LocalID % 256); | 159 | bytes[i++] = (byte)(this.LocalID % 256); |
156 | bytes[i++] = (byte)((this.LocalID >> 8) % 256); | 160 | bytes[i++] = (byte)((this.LocalID >> 8) % 256); |
diff --git a/OpenSim.GenericConfig/Xml/XmlConfig.cs b/OpenSim.GenericConfig/Xml/XmlConfig.cs index c398229..62e3cbf 100644 --- a/OpenSim.GenericConfig/Xml/XmlConfig.cs +++ b/OpenSim.GenericConfig/Xml/XmlConfig.cs | |||
@@ -81,7 +81,7 @@ namespace OpenSim.GenericConfig | |||
81 | { | 81 | { |
82 | if (configNode.Attributes[attributeName] != null) | 82 | if (configNode.Attributes[attributeName] != null) |
83 | { | 83 | { |
84 | configNode.Attributes.GetNamedItem(attributeName).Value = attributeValue; | 84 | ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value = attributeValue; |
85 | } | 85 | } |
86 | else | 86 | else |
87 | { | 87 | { |
diff --git a/OpenSim.RegionServer/Assets/AssetCache.cs b/OpenSim.RegionServer/Assets/AssetCache.cs index 1d5b286..573e5fd 100644 --- a/OpenSim.RegionServer/Assets/AssetCache.cs +++ b/OpenSim.RegionServer/Assets/AssetCache.cs | |||
@@ -51,8 +51,6 @@ namespace OpenSim.Assets | |||
51 | public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); //Assets requested from the asset server | 51 | public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); //Assets requested from the asset server |
52 | public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>(); //Textures requested from the asset server | 52 | public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>(); //Textures requested from the asset server |
53 | 53 | ||
54 | //private Dictionary<libsecondlife.LLUUID, AssetBase> IncomingAssets; | ||
55 | |||
56 | private IAssetServer _assetServer; | 54 | private IAssetServer _assetServer; |
57 | private Thread _assetCacheThread; | 55 | private Thread _assetCacheThread; |
58 | private LLUUID[] textureList = new LLUUID[5]; | 56 | private LLUUID[] textureList = new LLUUID[5]; |
@@ -67,7 +65,6 @@ namespace OpenSim.Assets | |||
67 | _assetServer.SetReceiver(this); | 65 | _assetServer.SetReceiver(this); |
68 | Assets = new Dictionary<libsecondlife.LLUUID, AssetInfo>(); | 66 | Assets = new Dictionary<libsecondlife.LLUUID, AssetInfo>(); |
69 | Textures = new Dictionary<libsecondlife.LLUUID, TextureImage>(); | 67 | Textures = new Dictionary<libsecondlife.LLUUID, TextureImage>(); |
70 | //IncomingAssets = new Dictionary<libsecondlife.LLUUID, AssetBase>(); | ||
71 | this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); | 68 | this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); |
72 | this._assetCacheThread.IsBackground = true; | 69 | this._assetCacheThread.IsBackground = true; |
73 | this._assetCacheThread.Start(); | 70 | this._assetCacheThread.Start(); |
diff --git a/OpenSim.RegionServer/CAPS/AdminWebFront.cs b/OpenSim.RegionServer/CAPS/AdminWebFront.cs index 72fbdaf..7f00225 100644 --- a/OpenSim.RegionServer/CAPS/AdminWebFront.cs +++ b/OpenSim.RegionServer/CAPS/AdminWebFront.cs | |||
@@ -126,7 +126,7 @@ namespace OpenSim.CAPS | |||
126 | { | 126 | { |
127 | TempAv = (OpenSim.world.Avatar)m_world.Entities[UUID]; | 127 | TempAv = (OpenSim.world.Avatar)m_world.Entities[UUID]; |
128 | responseString += "<p> Client: "; | 128 | responseString += "<p> Client: "; |
129 | responseString += TempAv.firstname + " , " + TempAv.lastname + " , <A HREF=\"javascript:loadXMLDoc('ClientInventory/" + UUID.ToString() + "')\">" + UUID + "</A> , " + TempAv.ControllingClient.SessionID + " , " + TempAv.ControllingClient.CircuitCode + " , " + TempAv.ControllingClient.userEP.ToString();//String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString()); | 129 | responseString += TempAv.firstname + " , " + TempAv.lastname + " , <A HREF=\"javascript:loadXMLDoc('ClientInventory/" + UUID.ToString() + "')\">" + UUID + "</A> , " + TempAv.ControllingClient.SessionID + " , " + TempAv.ControllingClient.CircuitCode + " , " + TempAv.ControllingClient.userEP.ToString(); |
130 | responseString += "</p>"; | 130 | responseString += "</p>"; |
131 | } | 131 | } |
132 | } | 132 | } |
@@ -153,7 +153,7 @@ namespace OpenSim.CAPS | |||
153 | foreach (InventoryItem item in inven.InventoryItems.Values) | 153 | foreach (InventoryItem item in inven.InventoryItems.Values) |
154 | { | 154 | { |
155 | responseString += "<p> InventoryItem: "; | 155 | responseString += "<p> InventoryItem: "; |
156 | responseString += item.Name +" , "+ item.ItemID +" , "+ item.Type +" , "+ item.FolderID +" , "+ item.AssetID +" , "+ item.Description ; //String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", item.Name, item.ItemID, item.Type, item.FolderID, item.AssetID, item.Description); | 156 | responseString += item.Name +" , "+ item.ItemID +" , "+ item.Type +" , "+ item.FolderID +" , "+ item.AssetID +" , "+ item.Description ; |
157 | responseString += "</p>"; | 157 | responseString += "</p>"; |
158 | } | 158 | } |
159 | } | 159 | } |
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 8bbdcd5..316bcd9 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs | |||
@@ -108,7 +108,7 @@ namespace OpenSim | |||
108 | { | 108 | { |
109 | Console.WriteLine(e.Message); | 109 | Console.WriteLine(e.Message); |
110 | } | 110 | } |
111 | 111 | m_console.WriteLine("Main.cs:Startup() - Loading configuration"); | |
112 | string configfromgrid = localConfig.GetAttribute("ConfigFromGrid"); | 112 | string configfromgrid = localConfig.GetAttribute("ConfigFromGrid"); |
113 | if (configfromgrid == "true") | 113 | if (configfromgrid == "true") |
114 | { | 114 | { |
@@ -122,6 +122,7 @@ namespace OpenSim | |||
122 | { | 122 | { |
123 | this.regionData.InitConfig(this.m_sandbox, this.localConfig); | 123 | this.regionData.InitConfig(this.m_sandbox, this.localConfig); |
124 | } | 124 | } |
125 | this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change | ||
125 | 126 | ||
126 | GridServers = new Grid(); | 127 | GridServers = new Grid(); |
127 | if (m_sandbox) | 128 | if (m_sandbox) |
@@ -146,11 +147,6 @@ namespace OpenSim | |||
146 | AssetCache = new AssetCache(GridServers.AssetServer); | 147 | AssetCache = new AssetCache(GridServers.AssetServer); |
147 | InventoryCache = new InventoryCache(); | 148 | InventoryCache = new InventoryCache(); |
148 | 149 | ||
149 | // We check our local database first, then the grid for config options | ||
150 | m_console.WriteLine("Main.cs:Startup() - Loading configuration"); | ||
151 | //Cfg = this.LoadConfigDll(this.ConfigDll); | ||
152 | //Cfg.InitConfig(this.m_sandbox); | ||
153 | |||
154 | PacketServer packetServer = new PacketServer(this); | 150 | PacketServer packetServer = new PacketServer(this); |
155 | 151 | ||
156 | m_console.WriteLine("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString()); | 152 | m_console.WriteLine("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString()); |
@@ -207,11 +203,11 @@ namespace OpenSim | |||
207 | 203 | ||
208 | return new XmlRpcResponse(); | 204 | return new XmlRpcResponse(); |
209 | }); | 205 | }); |
210 | _httpServer.AddRestHandler("GET","/simstatus/", | 206 | _httpServer.AddRestHandler("GET", "/simstatus/", |
211 | delegate(string request, string path) | 207 | delegate(string request, string path) |
212 | { | 208 | { |
213 | return "OK"; | 209 | return "OK"; |
214 | }); | 210 | }); |
215 | } | 211 | } |
216 | 212 | ||
217 | LoginServer loginServer = null; | 213 | LoginServer loginServer = null; |
@@ -222,14 +218,14 @@ namespace OpenSim | |||
222 | { | 218 | { |
223 | loginServer = new LoginServer(gridServer, regionData.IPListenAddr, regionData.IPListenPort, this.user_accounts); | 219 | loginServer = new LoginServer(gridServer, regionData.IPListenAddr, regionData.IPListenPort, this.user_accounts); |
224 | loginServer.Startup(); | 220 | loginServer.Startup(); |
225 | 221 | ||
226 | if( user_accounts ) | 222 | if (user_accounts) |
227 | { | 223 | { |
228 | //sandbox mode with loginserver using accounts | 224 | //sandbox mode with loginserver using accounts |
229 | this.GridServers.UserServer = loginServer; | 225 | this.GridServers.UserServer = loginServer; |
230 | adminLoginServer = loginServer; | 226 | adminLoginServer = loginServer; |
231 | 227 | ||
232 | _httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod); | 228 | _httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod); |
233 | } | 229 | } |
234 | else | 230 | else |
235 | { | 231 | { |
@@ -239,8 +235,8 @@ namespace OpenSim | |||
239 | } | 235 | } |
240 | 236 | ||
241 | AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer); | 237 | AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer); |
242 | adminWebFront.LoadMethods( _httpServer ); | 238 | adminWebFront.LoadMethods(_httpServer); |
243 | 239 | ||
244 | m_console.WriteLine("Main.cs:Startup() - Starting HTTP server"); | 240 | m_console.WriteLine("Main.cs:Startup() - Starting HTTP server"); |
245 | _httpServer.Start(); | 241 | _httpServer.Start(); |
246 | 242 | ||
diff --git a/OpenSim.RegionServer/PacketServer.cs b/OpenSim.RegionServer/PacketServer.cs index a02fa36..f0a1f52 100644 --- a/OpenSim.RegionServer/PacketServer.cs +++ b/OpenSim.RegionServer/PacketServer.cs | |||
@@ -51,11 +51,14 @@ namespace OpenSim | |||
51 | 51 | ||
52 | public virtual void RegisterClientPacketHandlers() | 52 | public virtual void RegisterClientPacketHandlers() |
53 | { | 53 | { |
54 | SimClient.AddPacketHandler(PacketType.ModifyLand, _localWorld.ModifyTerrain); | 54 | if (this._localWorld != null) |
55 | SimClient.AddPacketHandler(PacketType.ChatFromViewer, _localWorld.SimChat); | 55 | { |
56 | SimClient.AddPacketHandler(PacketType.RezObject, _localWorld.RezObject); | 56 | SimClient.AddPacketHandler(PacketType.ModifyLand, _localWorld.ModifyTerrain); |
57 | SimClient.AddPacketHandler(PacketType.DeRezObject, _localWorld.DeRezObject); | 57 | SimClient.AddPacketHandler(PacketType.ChatFromViewer, _localWorld.SimChat); |
58 | SimClient.AddPacketHandler(PacketType.UUIDNameRequest, this.RequestUUIDName); | 58 | SimClient.AddPacketHandler(PacketType.RezObject, _localWorld.RezObject); |
59 | SimClient.AddPacketHandler(PacketType.DeRezObject, _localWorld.DeRezObject); | ||
60 | SimClient.AddPacketHandler(PacketType.UUIDNameRequest, this.RequestUUIDName); | ||
61 | } | ||
59 | } | 62 | } |
60 | 63 | ||
61 | #region Client Packet Handlers | 64 | #region Client Packet Handlers |
diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs index 15cc105..806d7cc 100644 --- a/OpenSim.RegionServer/RegionInfo.cs +++ b/OpenSim.RegionServer/RegionInfo.cs | |||
@@ -59,11 +59,11 @@ namespace OpenSim | |||
59 | { | 59 | { |
60 | string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X [997]: ", "997"); | 60 | string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X [997]: ", "997"); |
61 | configData.SetAttribute("SimLocationX", location); | 61 | configData.SetAttribute("SimLocationX", location); |
62 | this.RegionLocX = (uint)Convert.ToInt32(location); | 62 | this.RegionLocX = (uint)Convert.ToUInt32(location); |
63 | } | 63 | } |
64 | else | 64 | else |
65 | { | 65 | { |
66 | this.RegionLocX = (uint)Convert.ToInt32(attri); | 66 | this.RegionLocX = (uint)Convert.ToUInt32(attri); |
67 | } | 67 | } |
68 | // Sim/Grid location Y | 68 | // Sim/Grid location Y |
69 | attri = ""; | 69 | attri = ""; |
@@ -72,11 +72,11 @@ namespace OpenSim | |||
72 | { | 72 | { |
73 | string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y [996]: ", "996"); | 73 | string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y [996]: ", "996"); |
74 | configData.SetAttribute("SimLocationY", location); | 74 | configData.SetAttribute("SimLocationY", location); |
75 | this.RegionLocY = (uint)Convert.ToInt32(location); | 75 | this.RegionLocY = (uint)Convert.ToUInt32(location); |
76 | } | 76 | } |
77 | else | 77 | else |
78 | { | 78 | { |
79 | this.RegionLocY = (uint)Convert.ToInt32(attri); | 79 | this.RegionLocY = (uint)Convert.ToUInt32(attri); |
80 | } | 80 | } |
81 | //Sim Listen Port | 81 | //Sim Listen Port |
82 | attri = ""; | 82 | attri = ""; |
diff --git a/OpenSim.RegionServer/world/Primitive.cs b/OpenSim.RegionServer/world/Primitive.cs index cbffa7e..f60d991 100644 --- a/OpenSim.RegionServer/world/Primitive.cs +++ b/OpenSim.RegionServer/world/Primitive.cs | |||
@@ -158,46 +158,10 @@ namespace OpenSim.world | |||
158 | pos2 = new LLVector3(pPos.X, pPos.Y, pPos.Z); | 158 | pos2 = new LLVector3(pPos.X, pPos.Y, pPos.Z); |
159 | } | 159 | } |
160 | if (this.newPrimFlag) | 160 | if (this.newPrimFlag) |
161 | { | 161 | { |
162 | /* ObjectOwnerPacket objown = new ObjectOwnerPacket(); | ||
163 | objown.HeaderData.GroupID = LLUUID.Zero; | ||
164 | objown.HeaderData.Override = false; | ||
165 | objown.HeaderData.OwnerID = LLUUID.Zero; | ||
166 | objown.ObjectData = new ObjectOwnerPacket.ObjectDataBlock[1]; | ||
167 | objown.ObjectData[0] = new ObjectOwnerPacket.ObjectDataBlock(); | ||
168 | objown.ObjectData[0].ObjectLocalID = this.localid; | ||
169 | ObjectGroupPacket objgroup = new ObjectGroupPacket(); | ||
170 | objgroup.ObjectData = new ObjectGroupPacket.ObjectDataBlock[1]; | ||
171 | objgroup.ObjectData[0] = new ObjectGroupPacket.ObjectDataBlock(); | ||
172 | objgroup.ObjectData[0].ObjectLocalID = this.localid; | ||
173 | ObjectPermissionsPacket objper = new ObjectPermissionsPacket(); | ||
174 | objper.HeaderData.Override = false; | ||
175 | objper.ObjectData = new ObjectPermissionsPacket.ObjectDataBlock[3]; | ||
176 | for (int i = 0; i < 3; i++) | ||
177 | { | ||
178 | objper.ObjectData[i] = new ObjectPermissionsPacket.ObjectDataBlock(); | ||
179 | objper.ObjectData[i].ObjectLocalID = this.localid; | ||
180 | objper.ObjectData[i].Set = 1; | ||
181 | objper.ObjectData[i].Field = 0; | ||
182 | } | ||
183 | objper.ObjectData[0].Mask = 8192; | ||
184 | objper.ObjectData[1].Mask = 16384; | ||
185 | objper.ObjectData[2].Mask = 32768;*/ | ||
186 | |||
187 | foreach (SimClient client in m_clientThreads.Values) | 162 | foreach (SimClient client in m_clientThreads.Values) |
188 | { | 163 | { |
189 | client.OutPacket(OurPacket); | 164 | client.OutPacket(OurPacket); |
190 | /* objown.AgentData.AgentID = client.AgentID; | ||
191 | objown.AgentData.SessionID = client.SessionID; | ||
192 | objown.HeaderData.OwnerID = client.AgentID; | ||
193 | client.OutPacket(objown); | ||
194 | objgroup.AgentData.AgentID = client.AgentID; | ||
195 | objgroup.AgentData.GroupID = LLUUID.Zero; | ||
196 | objgroup.AgentData.SessionID = client.SessionID; | ||
197 | client.OutPacket(objgroup); | ||
198 | objper.AgentData.AgentID = client.AgentID; | ||
199 | objper.AgentData.SessionID = client.SessionID; | ||
200 | client.OutPacket(objper);*/ | ||
201 | } | 165 | } |
202 | this.newPrimFlag = false; | 166 | this.newPrimFlag = false; |
203 | } | 167 | } |