diff options
author | Jeff Ames | 2008-03-18 15:30:38 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-18 15:30:38 +0000 |
commit | e5b91442822df211f9f8277aaf0c40e1339810f3 (patch) | |
tree | 116ac977981e7bea0b7dd4c8f9cbad87e02c5b65 | |
parent | * Applying Mantis Patch #518.2 - State not persisted in MySQL DataStore (diff) | |
download | opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.zip opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.tar.gz opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.tar.bz2 opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.tar.xz |
Formatting cleanup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Data/RegionProfileData.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/IScene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/PacketPool.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 97 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/UDPServer.cs | 94 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 42 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/ChatModule.cs | 49 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/VectorRenderModule.cs | 73 | ||||
-rw-r--r-- | OpenSim/Region/Environment/PermissionManager.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 130 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 120 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs | 6 |
13 files changed, 334 insertions, 325 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 0a08fb9..cfd3885 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -306,7 +306,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
306 | uint regX = Convert.ToUInt32((Int32) requestData["start_region_x"]); | 306 | uint regX = Convert.ToUInt32((Int32) requestData["start_region_x"]); |
307 | uint regY = Convert.ToUInt32((Int32) requestData["start_region_y"]); | 307 | uint regY = Convert.ToUInt32((Int32) requestData["start_region_y"]); |
308 | 308 | ||
309 | LLUUID tempuserID = m_app.CreateUser(tempfirstname, templastname, tempPasswd, regX, regY); | 309 | LLUUID tempuserID = m_app.CreateUser(tempfirstname, templastname, tempPasswd, regX, regY); |
310 | 310 | ||
311 | if (tempuserID == LLUUID.Zero) | 311 | if (tempuserID == LLUUID.Zero) |
312 | { | 312 | { |
diff --git a/OpenSim/Framework/Data/RegionProfileData.cs b/OpenSim/Framework/Data/RegionProfileData.cs index 84713b4..96351e0 100644 --- a/OpenSim/Framework/Data/RegionProfileData.cs +++ b/OpenSim/Framework/Data/RegionProfileData.cs | |||
@@ -162,7 +162,7 @@ namespace OpenSim.Framework.Data | |||
162 | simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); | 162 | simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); |
163 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); | 163 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); |
164 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 164 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
165 | simData.serverURI = (string)responseData["server_uri"]; | 165 | simData.serverURI = (string)responseData["server_uri"]; |
166 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | 166 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; |
167 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); | 167 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); |
168 | simData.regionName = (string) responseData["region_name"]; | 168 | simData.regionName = (string) responseData["region_name"]; |
@@ -205,7 +205,7 @@ namespace OpenSim.Framework.Data | |||
205 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); | 205 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); |
206 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 206 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
207 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | 207 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; |
208 | simData.serverURI = (string)responseData["server_uri"]; | 208 | simData.serverURI = (string)responseData["server_uri"]; |
209 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); | 209 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); |
210 | simData.regionName = (string) responseData["region_name"]; | 210 | simData.regionName = (string) responseData["region_name"]; |
211 | 211 | ||
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index cf2c129..869ca60 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Framework | |||
39 | Up = 1, | 39 | Up = 1, |
40 | Crashed = 2, | 40 | Crashed = 2, |
41 | Starting = 3, | 41 | Starting = 3, |
42 | SlaveScene = 4 | 42 | SlaveScene = 4 |
43 | }; | 43 | }; |
44 | 44 | ||
45 | public interface IScene | 45 | public interface IScene |
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs index 3f8697a..7b67f0b 100644 --- a/OpenSim/Framework/PacketPool.cs +++ b/OpenSim/Framework/PacketPool.cs | |||
@@ -34,12 +34,12 @@ namespace OpenSim.Framework | |||
34 | { | 34 | { |
35 | public sealed class PacketPool | 35 | public sealed class PacketPool |
36 | { | 36 | { |
37 | static public void EncodeProxyMessage(byte[] bytes, ref int numBytes, EndPoint trueEP) | 37 | static public void EncodeProxyMessage(byte[] bytes, ref int numBytes, EndPoint trueEP) |
38 | { | 38 | { |
39 | if( numBytes > 4090 ) // max UPD size = 4096 | 39 | if( numBytes > 4090 ) // max UPD size = 4096 |
40 | { | 40 | { |
41 | throw new Exception("ERROR: No space to encode the proxy EP"); | 41 | throw new Exception("ERROR: No space to encode the proxy EP"); |
42 | } | 42 | } |
43 | 43 | ||
44 | ushort port = (ushort) ((IPEndPoint) trueEP).Port; | 44 | ushort port = (ushort) ((IPEndPoint) trueEP).Port; |
45 | bytes[numBytes++] = (byte)(port % 256); | 45 | bytes[numBytes++] = (byte)(port % 256); |
@@ -55,10 +55,10 @@ namespace OpenSim.Framework | |||
55 | DecodeProxyMessage(bytes, ref numBytes); | 55 | DecodeProxyMessage(bytes, ref numBytes); |
56 | 56 | ||
57 | numBytes = x; | 57 | numBytes = x; |
58 | } | 58 | } |
59 | 59 | ||
60 | static public EndPoint DecodeProxyMessage(byte[] bytes, ref int numBytes) | 60 | static public EndPoint DecodeProxyMessage(byte[] bytes, ref int numBytes) |
61 | { | 61 | { |
62 | // IPv4 Only | 62 | // IPv4 Only |
63 | byte[] addr = new byte[4]; | 63 | byte[] addr = new byte[4]; |
64 | 64 | ||
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index e8490dc..e50187e 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -455,7 +455,7 @@ namespace OpenSim | |||
455 | 455 | ||
456 | // set initial ServerURI | 456 | // set initial ServerURI |
457 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName | 457 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName |
458 | + ":" + regionInfo.InternalEndPoint.Port.ToString(); | 458 | + ":" + regionInfo.InternalEndPoint.Port.ToString(); |
459 | 459 | ||
460 | if ((proxyUrl.Length > 0) && (portadd_flag)) | 460 | if ((proxyUrl.Length > 0) && (portadd_flag)) |
461 | { | 461 | { |
@@ -616,7 +616,7 @@ namespace OpenSim | |||
616 | public virtual void Shutdown() | 616 | public virtual void Shutdown() |
617 | { | 617 | { |
618 | ProxyCommand(proxyUrl, "Stop"); | 618 | ProxyCommand(proxyUrl, "Stop"); |
619 | 619 | ||
620 | if (m_startupCommandsFile != String.Empty) | 620 | if (m_startupCommandsFile != String.Empty) |
621 | { | 621 | { |
622 | RunCommandScript(m_shutdownCommandsFile); | 622 | RunCommandScript(m_shutdownCommandsFile); |
@@ -632,7 +632,7 @@ namespace OpenSim | |||
632 | 632 | ||
633 | m_console.Close(); | 633 | m_console.Close(); |
634 | Environment.Exit(0); | 634 | Environment.Exit(0); |
635 | } | 635 | } |
636 | 636 | ||
637 | private void RunAutoTimerScript(object sender, EventArgs e) | 637 | private void RunAutoTimerScript(object sender, EventArgs e) |
638 | { | 638 | { |
@@ -722,17 +722,23 @@ namespace OpenSim | |||
722 | } | 722 | } |
723 | break; | 723 | break; |
724 | 724 | ||
725 | case "scene-debug": | 725 | case "scene-debug": |
726 | if (cmdparams.Length == 3) { | 726 | if (cmdparams.Length == 3) |
727 | if (m_sceneManager.CurrentScene == null) { | 727 | { |
728 | m_console.Error("CONSOLE", "Please use 'change-region <regioname>' first"); | 728 | if (m_sceneManager.CurrentScene == null) |
729 | } else { | 729 | { |
730 | m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2])); | 730 | m_console.Error("CONSOLE", "Please use 'change-region <regioname>' first"); |
731 | } | 731 | } |
732 | } else { | 732 | else |
733 | m_console.Error("scene-debug <scripting> <collisions> <physics> (where inside <> is true/false)"); | 733 | { |
734 | } | 734 | m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2])); |
735 | break; | 735 | } |
736 | } | ||
737 | else | ||
738 | { | ||
739 | m_console.Error("scene-debug <scripting> <collisions> <physics> (where inside <> is true/false)"); | ||
740 | } | ||
741 | break; | ||
736 | 742 | ||
737 | case "help": | 743 | case "help": |
738 | m_console.Notice("alert - send alert to a designated user or all users."); | 744 | m_console.Notice("alert - send alert to a designated user or all users."); |
@@ -772,15 +778,15 @@ namespace OpenSim | |||
772 | break; | 778 | break; |
773 | 779 | ||
774 | case "threads": | 780 | case "threads": |
775 | //m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); | 781 | // m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); |
776 | //int _tc = 0; | 782 | // int _tc = 0; |
777 | 783 | ||
778 | //foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) | 784 | // foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) |
779 | //{ | 785 | // { |
780 | // _tc++; | 786 | // _tc++; |
781 | // m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); | 787 | // m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); |
782 | 788 | // } | |
783 | //} | 789 | |
784 | List<Thread> threads = OpenSim.Framework.ThreadTracker.GetThreads(); | 790 | List<Thread> threads = OpenSim.Framework.ThreadTracker.GetThreads(); |
785 | if (threads == null) | 791 | if (threads == null) |
786 | { | 792 | { |
@@ -797,7 +803,6 @@ namespace OpenSim | |||
797 | } | 803 | } |
798 | } | 804 | } |
799 | 805 | ||
800 | |||
801 | break; | 806 | break; |
802 | case "save-xml": | 807 | case "save-xml": |
803 | if (cmdparams.Length > 0) | 808 | if (cmdparams.Length > 0) |
@@ -833,7 +838,7 @@ namespace OpenSim | |||
833 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); | 838 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); |
834 | } | 839 | } |
835 | m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + | 840 | m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + |
836 | loadOffset.Z + ">"); | 841 | loadOffset.Z + ">"); |
837 | } | 842 | } |
838 | } | 843 | } |
839 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); | 844 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); |
@@ -1158,11 +1163,11 @@ namespace OpenSim | |||
1158 | case "regions": | 1163 | case "regions": |
1159 | m_sceneManager.ForEachScene( | 1164 | m_sceneManager.ForEachScene( |
1160 | delegate(Scene scene) | 1165 | delegate(Scene scene) |
1161 | { | 1166 | { |
1162 | m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + | 1167 | m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + |
1163 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + | 1168 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + |
1164 | scene.RegionInfo.RegionLocY); | 1169 | scene.RegionInfo.RegionLocY); |
1165 | }); | 1170 | }); |
1166 | break; | 1171 | break; |
1167 | 1172 | ||
1168 | case "stats": | 1173 | case "stats": |
@@ -1191,7 +1196,8 @@ namespace OpenSim | |||
1191 | } | 1196 | } |
1192 | 1197 | ||
1193 | #endregion | 1198 | #endregion |
1194 | // TODO: remove me!! (almost same as XmlRpcCommand) | 1199 | |
1200 | // TODO: remove me!! (almost same as XmlRpcCommand) | ||
1195 | public object ProxyCommand(string url, string methodName, params object[] args) | 1201 | public object ProxyCommand(string url, string methodName, params object[] args) |
1196 | { | 1202 | { |
1197 | if(proxyUrl.Length==0) return null; | 1203 | if(proxyUrl.Length==0) return null; |
@@ -1230,34 +1236,33 @@ namespace OpenSim | |||
1230 | /// <param name="starttime">The first out parameter describing when the Region server started</param> | 1236 | /// <param name="starttime">The first out parameter describing when the Region server started</param> |
1231 | /// <param name="uptime">The second out parameter describing how long the Region server has run</param> | 1237 | /// <param name="uptime">The second out parameter describing how long the Region server has run</param> |
1232 | public void GetRunTime(out string starttime, out string uptime) | 1238 | public void GetRunTime(out string starttime, out string uptime) |
1233 | { | 1239 | { |
1234 | starttime = m_startuptime.ToString(); | 1240 | starttime = m_startuptime.ToString(); |
1235 | uptime = (DateTime.Now - m_startuptime).ToString(); | 1241 | uptime = (DateTime.Now - m_startuptime).ToString(); |
1236 | } | 1242 | } |
1237 | 1243 | ||
1238 | /// <summary> | 1244 | /// <summary> |
1239 | /// Get the number of the avatars in the Region server | 1245 | /// Get the number of the avatars in the Region server |
1240 | /// </summary> | 1246 | /// </summary> |
1241 | /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> | 1247 | /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> |
1242 | public void GetAvatarNumber(out int usernum) | 1248 | public void GetAvatarNumber(out int usernum) |
1243 | { | 1249 | { |
1244 | usernum = m_sceneManager.GetCurrentSceneAvatars().Count; | 1250 | usernum = m_sceneManager.GetCurrentSceneAvatars().Count; |
1245 | } | 1251 | } |
1246 | 1252 | ||
1247 | /// <summary> | 1253 | /// <summary> |
1248 | /// Get the number of the avatars in the Region server | 1254 | /// Get the number of the avatars in the Region server |
1249 | /// </summary> | 1255 | /// </summary> |
1250 | /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> | 1256 | /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> |
1251 | public void GetRegionNumber(out int regionnum) | 1257 | public void GetRegionNumber(out int regionnum) |
1252 | { | 1258 | { |
1253 | int accounter = 0; | 1259 | int accounter = 0; |
1254 | //List<string> regionNameList = new List<string>(); | 1260 | //List<string> regionNameList = new List<string>(); |
1255 | |||
1256 | m_sceneManager.ForEachScene(delegate(Scene scene) { | ||
1257 | accounter++; | ||
1258 | }); | ||
1259 | regionnum = accounter; | ||
1260 | 1261 | ||
1261 | } | 1262 | m_sceneManager.ForEachScene(delegate(Scene scene) { |
1263 | accounter++; | ||
1264 | }); | ||
1265 | regionnum = accounter; | ||
1266 | } | ||
1262 | } | 1267 | } |
1263 | } | 1268 | } |
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 69dd48f..59083c7 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -226,7 +226,7 @@ namespace OpenSim.Region.ClientStack | |||
226 | 226 | ||
227 | try | 227 | try |
228 | { | 228 | { |
229 | packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer); | 229 | packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer); |
230 | } | 230 | } |
231 | catch (Exception e) | 231 | catch (Exception e) |
232 | { | 232 | { |
@@ -308,7 +308,7 @@ namespace OpenSim.Region.ClientStack | |||
308 | { | 308 | { |
309 | m_log.Error("[UDPSERVER]: Adding New Client threw exception " + e3.ToString()); | 309 | m_log.Error("[UDPSERVER]: Adding New Client threw exception " + e3.ToString()); |
310 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, | 310 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, |
311 | ReceivedData, null); | 311 | ReceivedData, null); |
312 | } | 312 | } |
313 | } | 313 | } |
314 | } | 314 | } |
@@ -332,31 +332,31 @@ namespace OpenSim.Region.ClientStack | |||
332 | //Slave regions don't accept new clients | 332 | //Slave regions don't accept new clients |
333 | if(m_localScene.Region_Status != RegionStatus.SlaveScene) | 333 | if(m_localScene.Region_Status != RegionStatus.SlaveScene) |
334 | { | 334 | { |
335 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; | 335 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; |
336 | lock (clientCircuits) | 336 | lock (clientCircuits) |
337 | { | 337 | { |
338 | if (!clientCircuits.ContainsKey(epSender)) | 338 | if (!clientCircuits.ContainsKey(epSender)) |
339 | clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); | 339 | clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); |
340 | else | 340 | else |
341 | m_log.Error("[UDPSERVER]: clientCircuits already contans entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); | 341 | m_log.Error("[UDPSERVER]: clientCircuits already contans entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); |
342 | } | 342 | } |
343 | lock (clientCircuits_reverse) | 343 | lock (clientCircuits_reverse) |
344 | { | 344 | { |
345 | if (!clientCircuits_reverse.ContainsKey(useCircuit.CircuitCode.Code)) | 345 | if (!clientCircuits_reverse.ContainsKey(useCircuit.CircuitCode.Code)) |
346 | clientCircuits_reverse.Add(useCircuit.CircuitCode.Code, epSender); | 346 | clientCircuits_reverse.Add(useCircuit.CircuitCode.Code, epSender); |
347 | else | 347 | else |
348 | m_log.Error("[UDPSERVER]: clientCurcuits_reverse already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); | 348 | m_log.Error("[UDPSERVER]: clientCurcuits_reverse already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); |
349 | } | 349 | } |
350 | 350 | ||
351 | lock (proxyCircuits) | 351 | lock (proxyCircuits) |
352 | { | 352 | { |
353 | if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code)) | 353 | if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code)) |
354 | proxyCircuits.Add(useCircuit.CircuitCode.Code, epProxy); | 354 | proxyCircuits.Add(useCircuit.CircuitCode.Code, epProxy); |
355 | else | 355 | else |
356 | m_log.Error("[UDPSERVER]: proxyCircuits already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); | 356 | m_log.Error("[UDPSERVER]: proxyCircuits already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); |
357 | } | 357 | } |
358 | 358 | ||
359 | PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_authenticateSessionsClass, epProxy); | 359 | PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_authenticateSessionsClass, epProxy); |
360 | } | 360 | } |
361 | PacketPool.Instance.ReturnPacket(packet); | 361 | PacketPool.Instance.ReturnPacket(packet); |
362 | } | 362 | } |
@@ -394,20 +394,20 @@ namespace OpenSim.Region.ClientStack | |||
394 | lock (clientCircuits_reverse) | 394 | lock (clientCircuits_reverse) |
395 | { | 395 | { |
396 | if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto)) | 396 | if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto)) |
397 | { | 397 | { |
398 | //we found the endpoint so send the packet to it | 398 | //we found the endpoint so send the packet to it |
399 | if (proxyPortOffset != 0) | 399 | if (proxyPortOffset != 0) |
400 | { | 400 | { |
401 | //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo proxy " + proxyCircuits[circuitcode].ToString() + ": client " + sendto.ToString()); | 401 | //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo proxy " + proxyCircuits[circuitcode].ToString() + ": client " + sendto.ToString()); |
402 | PacketPool.EncodeProxyMessage(buffer, ref size, sendto); | 402 | PacketPool.EncodeProxyMessage(buffer, ref size, sendto); |
403 | Server.SendTo(buffer, size, flags, proxyCircuits[circuitcode]); | 403 | Server.SendTo(buffer, size, flags, proxyCircuits[circuitcode]); |
404 | } | 404 | } |
405 | else | 405 | else |
406 | { | 406 | { |
407 | //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo : client " + sendto.ToString()); | 407 | //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo : client " + sendto.ToString()); |
408 | Server.SendTo(buffer, size, flags, sendto); | 408 | Server.SendTo(buffer, size, flags, sendto); |
409 | } | 409 | } |
410 | } | 410 | } |
411 | } | 411 | } |
412 | } | 412 | } |
413 | 413 | ||
@@ -421,7 +421,7 @@ namespace OpenSim.Region.ClientStack | |||
421 | clientCircuits.Remove(sendto); | 421 | clientCircuits.Remove(sendto); |
422 | 422 | ||
423 | clientCircuits_reverse.Remove(circuitcode); | 423 | clientCircuits_reverse.Remove(circuitcode); |
424 | proxyCircuits.Remove(circuitcode); | 424 | proxyCircuits.Remove(circuitcode); |
425 | } | 425 | } |
426 | } | 426 | } |
427 | } | 427 | } |
@@ -435,7 +435,7 @@ namespace OpenSim.Region.ClientStack | |||
435 | useCircuit.CircuitCode.ID = circuit.AgentID; | 435 | useCircuit.CircuitCode.ID = circuit.AgentID; |
436 | useCircuit.CircuitCode.SessionID = circuit.SessionID; | 436 | useCircuit.CircuitCode.SessionID = circuit.SessionID; |
437 | 437 | ||
438 | lock (clientCircuits) | 438 | lock (clientCircuits) |
439 | { | 439 | { |
440 | if (!clientCircuits.ContainsKey(userEP)) | 440 | if (!clientCircuits.ContainsKey(userEP)) |
441 | clientCircuits.Add(userEP, useCircuit.CircuitCode.Code); | 441 | clientCircuits.Add(userEP, useCircuit.CircuitCode.Code); |
@@ -453,15 +453,15 @@ namespace OpenSim.Region.ClientStack | |||
453 | lock (proxyCircuits) | 453 | lock (proxyCircuits) |
454 | { | 454 | { |
455 | if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code)) | 455 | if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code)) |
456 | { | 456 | { |
457 | proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP); | 457 | proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP); |
458 | } | 458 | } |
459 | else | 459 | else |
460 | { | 460 | { |
461 | // re-set proxy endpoint | 461 | // re-set proxy endpoint |
462 | proxyCircuits.Remove(useCircuit.CircuitCode.Code); | 462 | proxyCircuits.Remove(useCircuit.CircuitCode.Code); |
463 | proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP); | 463 | proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP); |
464 | } | 464 | } |
465 | } | 465 | } |
466 | 466 | ||
467 | PacketServer.AddNewClient(userEP, useCircuit, m_assetCache, m_authenticateSessionsClass, proxyEP); | 467 | PacketServer.AddNewClient(userEP, useCircuit, m_assetCache, m_authenticateSessionsClass, proxyEP); |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index f324886..432c3c2 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -111,7 +111,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
111 | GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString(); | 111 | GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString(); |
112 | GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString(); | 112 | GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString(); |
113 | GridParams["originUUID"] = regionInfo.originRegionID.ToString(); | 113 | GridParams["originUUID"] = regionInfo.originRegionID.ToString(); |
114 | GridParams["server_uri"] = regionInfo.ServerURI; | 114 | GridParams["server_uri"] = regionInfo.ServerURI; |
115 | 115 | ||
116 | // part of an initial brutish effort to provide accurate information (as per the xml region spec) | 116 | // part of an initial brutish effort to provide accurate information (as per the xml region spec) |
117 | // wrt the ownership of a given region | 117 | // wrt the ownership of a given region |
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
190 | return false; | 190 | return false; |
191 | } | 191 | } |
192 | 192 | ||
193 | // What does DeregisterRegion() do? | 193 | // What does DeregisterRegion() do? |
194 | return m_localBackend.DeregisterRegion(regionInfo); | 194 | return m_localBackend.DeregisterRegion(regionInfo); |
195 | } | 195 | } |
196 | 196 | ||
@@ -633,10 +633,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
633 | m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); | 633 | m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); |
634 | } | 634 | } |
635 | remObject = null; | 635 | remObject = null; |
636 | //m_log.Info("[INTER]: " + | 636 | // m_log.Info("[INTER]: " + |
637 | //gdebugRegionName + | 637 | // gdebugRegionName + |
638 | //": OGS1 tried to Update Child Agent data on outside region and got " + | 638 | // ": OGS1 tried to Update Child Agent data on outside region and got " + |
639 | //retValue.ToString()); | 639 | // retValue.ToString()); |
640 | 640 | ||
641 | return retValue; | 641 | return retValue; |
642 | } | 642 | } |
@@ -693,7 +693,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
693 | NoteDeadRegion(regionHandle); | 693 | NoteDeadRegion(regionHandle); |
694 | 694 | ||
695 | m_log.WarnFormat("[OGS1 GRID SERVICES]: Unable to connect to adjacent region: {0} {1},{2}", | 695 | m_log.WarnFormat("[OGS1 GRID SERVICES]: Unable to connect to adjacent region: {0} {1},{2}", |
696 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 696 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
697 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 697 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
698 | 698 | ||
699 | return false; | 699 | return false; |
@@ -1194,7 +1194,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1194 | { | 1194 | { |
1195 | NoteDeadRegion(regionHandle); | 1195 | NoteDeadRegion(regionHandle); |
1196 | m_log.Warn("[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName + | 1196 | m_log.Warn("[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName + |
1197 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1197 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1198 | //m_log.Debug(e.ToString()); | 1198 | //m_log.Debug(e.ToString()); |
1199 | return false; | 1199 | return false; |
1200 | } | 1200 | } |
@@ -1202,10 +1202,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1202 | { | 1202 | { |
1203 | NoteDeadRegion(regionHandle); | 1203 | NoteDeadRegion(regionHandle); |
1204 | m_log.Warn("[OGS1 GRID SERVICES]: Socket Error: Unable to connect to adjacent region using tcp://" + | 1204 | m_log.Warn("[OGS1 GRID SERVICES]: Socket Error: Unable to connect to adjacent region using tcp://" + |
1205 | regInfo.RemotingAddress + | 1205 | regInfo.RemotingAddress + |
1206 | ":" + regInfo.RemotingPort + | 1206 | ":" + regInfo.RemotingPort + |
1207 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + | 1207 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + |
1208 | " - Is this neighbor up?"); | 1208 | " - Is this neighbor up?"); |
1209 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 1209 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
1210 | return false; | 1210 | return false; |
1211 | } | 1211 | } |
@@ -1213,9 +1213,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1213 | { | 1213 | { |
1214 | NoteDeadRegion(regionHandle); | 1214 | NoteDeadRegion(regionHandle); |
1215 | m_log.Warn("[OGS1 GRID SERVICES]: Invalid Credentials: Unable to connect to adjacent region using tcp://" + | 1215 | m_log.Warn("[OGS1 GRID SERVICES]: Invalid Credentials: Unable to connect to adjacent region using tcp://" + |
1216 | regInfo.RemotingAddress + | 1216 | regInfo.RemotingAddress + |
1217 | ":" + regInfo.RemotingPort + | 1217 | ":" + regInfo.RemotingPort + |
1218 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1218 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1219 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 1219 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
1220 | return false; | 1220 | return false; |
1221 | } | 1221 | } |
@@ -1223,9 +1223,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1223 | { | 1223 | { |
1224 | NoteDeadRegion(regionHandle); | 1224 | NoteDeadRegion(regionHandle); |
1225 | m_log.Warn("[OGS1 GRID SERVICES]: Authentication exception: Unable to connect to adjacent region using tcp://" + | 1225 | m_log.Warn("[OGS1 GRID SERVICES]: Authentication exception: Unable to connect to adjacent region using tcp://" + |
1226 | regInfo.RemotingAddress + | 1226 | regInfo.RemotingAddress + |
1227 | ":" + regInfo.RemotingPort + | 1227 | ":" + regInfo.RemotingPort + |
1228 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1228 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1229 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 1229 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
1230 | return false; | 1230 | return false; |
1231 | } | 1231 | } |
@@ -1233,9 +1233,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1233 | { | 1233 | { |
1234 | NoteDeadRegion(regionHandle); | 1234 | NoteDeadRegion(regionHandle); |
1235 | m_log.Warn("[OGS1 GRID SERVICES]: WebException exception: Unable to connect to adjacent region using tcp://" + | 1235 | m_log.Warn("[OGS1 GRID SERVICES]: WebException exception: Unable to connect to adjacent region using tcp://" + |
1236 | regInfo.RemotingAddress + | 1236 | regInfo.RemotingAddress + |
1237 | ":" + regInfo.RemotingPort + | 1237 | ":" + regInfo.RemotingPort + |
1238 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1238 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1239 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 1239 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
1240 | return false; | 1240 | return false; |
1241 | } | 1241 | } |
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 6638e95..ab6b791 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -91,7 +91,8 @@ namespace OpenSim.Region.Environment.Modules | |||
91 | 91 | ||
92 | // setup IRC Relay | 92 | // setup IRC Relay |
93 | if (m_irc == null) { m_irc = new IRCChatModule(config); } | 93 | if (m_irc == null) { m_irc = new IRCChatModule(config); } |
94 | if (m_irc_connector == null) { | 94 | if (m_irc_connector == null) |
95 | { | ||
95 | m_irc_connector = new Thread(IRCConnectRun); | 96 | m_irc_connector = new Thread(IRCConnectRun); |
96 | m_irc_connector.Name = "IRCConnectorThread"; | 97 | m_irc_connector.Name = "IRCConnectorThread"; |
97 | m_irc_connector.IsBackground = true; | 98 | m_irc_connector.IsBackground = true; |
@@ -106,12 +107,14 @@ namespace OpenSim.Region.Environment.Modules | |||
106 | try | 107 | try |
107 | { | 108 | { |
108 | //m_irc.Connect(m_scenes); | 109 | //m_irc.Connect(m_scenes); |
109 | if (m_irc_connector == null) { | 110 | if (m_irc_connector == null) |
111 | { | ||
110 | m_irc_connector = new Thread(IRCConnectRun); | 112 | m_irc_connector = new Thread(IRCConnectRun); |
111 | m_irc_connector.Name = "IRCConnectorThread"; | 113 | m_irc_connector.Name = "IRCConnectorThread"; |
112 | m_irc_connector.IsBackground = true; | 114 | m_irc_connector.IsBackground = true; |
113 | } | 115 | } |
114 | if (!m_irc_connector.IsAlive) { | 116 | if (!m_irc_connector.IsAlive) |
117 | { | ||
115 | m_irc_connector.Start(); | 118 | m_irc_connector.Start(); |
116 | OpenSim.Framework.ThreadTracker.Add(m_irc_connector); | 119 | OpenSim.Framework.ThreadTracker.Add(m_irc_connector); |
117 | } | 120 | } |
@@ -255,11 +258,14 @@ namespace OpenSim.Region.Environment.Modules | |||
255 | // In a non-blocking way. Eventually the connector will get it started | 258 | // In a non-blocking way. Eventually the connector will get it started |
256 | try | 259 | try |
257 | { | 260 | { |
258 | if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun); | 261 | if (m_irc_connector == null) |
259 | m_irc_connector.Name = "IRCConnectorThread"; | 262 | { |
260 | m_irc_connector.IsBackground = true; | 263 | m_irc_connector = new Thread(IRCConnectRun); |
264 | m_irc_connector.Name = "IRCConnectorThread"; | ||
265 | m_irc_connector.IsBackground = true; | ||
261 | } | 266 | } |
262 | if (!m_irc_connector.IsAlive) { | 267 | if (!m_irc_connector.IsAlive) |
268 | { | ||
263 | m_irc_connector.Start(); | 269 | m_irc_connector.Start(); |
264 | OpenSim.Framework.ThreadTracker.Add(m_irc_connector); | 270 | OpenSim.Framework.ThreadTracker.Add(m_irc_connector); |
265 | } | 271 | } |
@@ -298,7 +304,6 @@ namespace OpenSim.Region.Environment.Modules | |||
298 | if ((m_irc.Enabled)&&(!m_irc.Connected)) | 304 | if ((m_irc.Enabled)&&(!m_irc.Connected)) |
299 | { | 305 | { |
300 | m_irc.Connect(m_scenes); | 306 | m_irc.Connect(m_scenes); |
301 | |||
302 | } | 307 | } |
303 | Thread.Sleep(15000); | 308 | Thread.Sleep(15000); |
304 | } | 309 | } |
@@ -625,15 +630,15 @@ namespace OpenSim.Region.Environment.Modules | |||
625 | foreach (Scene m_scene in m_scenes) | 630 | foreach (Scene m_scene in m_scenes) |
626 | { | 631 | { |
627 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) | 632 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) |
628 | { | 633 | { |
629 | if (!avatar.IsChildAgent) | 634 | if (!avatar.IsChildAgent) |
630 | { | 635 | { |
631 | avatar.ControllingClient.SendChatMessage( | 636 | avatar.ControllingClient.SendChatMessage( |
632 | Helpers.StringToField(message), 255, | 637 | Helpers.StringToField(message), 255, |
633 | pos, sender, | 638 | pos, sender, |
634 | LLUUID.Zero); | 639 | LLUUID.Zero); |
635 | } | 640 | } |
636 | }); | 641 | }); |
637 | } | 642 | } |
638 | } | 643 | } |
639 | catch (Exception ex) // IRC gate should not crash Sim | 644 | catch (Exception ex) // IRC gate should not crash Sim |
@@ -644,15 +649,15 @@ namespace OpenSim.Region.Environment.Modules | |||
644 | 649 | ||
645 | public enum ErrorReplies | 650 | public enum ErrorReplies |
646 | { | 651 | { |
647 | NotRegistered = 451, // ":You have not registered" | 652 | NotRegistered = 451, // ":You have not registered" |
648 | NicknameInUse = 433 // "<nick> :Nickname is already in use" | 653 | NicknameInUse = 433 // "<nick> :Nickname is already in use" |
649 | } | 654 | } |
650 | 655 | ||
651 | public enum Replies | 656 | public enum Replies |
652 | { | 657 | { |
653 | MotdStart = 375, // ":- <server> Message of the day - " | 658 | MotdStart = 375, // ":- <server> Message of the day - " |
654 | Motd = 372, // ":- <text>" | 659 | Motd = 372, // ":- <text>" |
655 | EndOfMotd = 376 // ":End of /MOTD command" | 660 | EndOfMotd = 376 // ":End of /MOTD command" |
656 | } | 661 | } |
657 | 662 | ||
658 | public void ProcessIRCCommand(string command) | 663 | public void ProcessIRCCommand(string command) |
diff --git a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs index 8bb903f..c0a00c9 100644 --- a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs +++ b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs | |||
@@ -126,41 +126,43 @@ namespace OpenSim.Region.Environment.Modules | |||
126 | 126 | ||
127 | } | 127 | } |
128 | 128 | ||
129 | /* private void CairoDraw(string data, System.Drawing.Graphics graph) | 129 | /* |
130 | { | 130 | private void CairoDraw(string data, System.Drawing.Graphics graph) |
131 | using (Win32Surface draw = new Win32Surface(graph.GetHdc())) | 131 | { |
132 | { | 132 | using (Win32Surface draw = new Win32Surface(graph.GetHdc())) |
133 | Context contex = new Context(draw); | 133 | { |
134 | 134 | Context contex = new Context(draw); | |
135 | contex.Antialias = Antialias.None; //fastest method but low quality | 135 | |
136 | contex.LineWidth = 7; | 136 | contex.Antialias = Antialias.None; //fastest method but low quality |
137 | char[] lineDelimiter = { ';' }; | 137 | contex.LineWidth = 7; |
138 | char[] partsDelimiter = { ',' }; | 138 | char[] lineDelimiter = { ';' }; |
139 | string[] lines = data.Split(lineDelimiter); | 139 | char[] partsDelimiter = { ',' }; |
140 | 140 | string[] lines = data.Split(lineDelimiter); | |
141 | foreach (string line in lines) | 141 | |
142 | { | 142 | foreach (string line in lines) |
143 | string nextLine = line.Trim(); | 143 | { |
144 | 144 | string nextLine = line.Trim(); | |
145 | if (nextLine.StartsWith("MoveTO")) | 145 | |
146 | { | 146 | if (nextLine.StartsWith("MoveTO")) |
147 | float x = 0; | 147 | { |
148 | float y = 0; | 148 | float x = 0; |
149 | GetParams(partsDelimiter, ref nextLine, ref x, ref y); | 149 | float y = 0; |
150 | contex.MoveTo(x, y); | 150 | GetParams(partsDelimiter, ref nextLine, ref x, ref y); |
151 | } | 151 | contex.MoveTo(x, y); |
152 | else if (nextLine.StartsWith("LineTo")) | 152 | } |
153 | { | 153 | else if (nextLine.StartsWith("LineTo")) |
154 | float x = 0; | 154 | { |
155 | float y = 0; | 155 | float x = 0; |
156 | GetParams(partsDelimiter, ref nextLine, ref x, ref y); | 156 | float y = 0; |
157 | contex.LineTo(x, y); | 157 | GetParams(partsDelimiter, ref nextLine, ref x, ref y); |
158 | contex.Stroke(); | 158 | contex.LineTo(x, y); |
159 | } | 159 | contex.Stroke(); |
160 | } | 160 | } |
161 | } | 161 | } |
162 | graph.ReleaseHdc(); | 162 | } |
163 | }*/ | 163 | graph.ReleaseHdc(); |
164 | } | ||
165 | */ | ||
164 | 166 | ||
165 | private void GDIDraw(string data, System.Drawing.Graphics graph) | 167 | private void GDIDraw(string data, System.Drawing.Graphics graph) |
166 | { | 168 | { |
@@ -172,7 +174,6 @@ namespace OpenSim.Region.Environment.Modules | |||
172 | char[] lineDelimiter = { ';' }; | 174 | char[] lineDelimiter = { ';' }; |
173 | char[] partsDelimiter = { ',' }; | 175 | char[] partsDelimiter = { ',' }; |
174 | string[] lines = data.Split(lineDelimiter); | 176 | string[] lines = data.Split(lineDelimiter); |
175 | |||
176 | 177 | ||
177 | foreach (string line in lines) | 178 | foreach (string line in lines) |
178 | { | 179 | { |
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs index 8e2ea15..a23f119 100644 --- a/OpenSim/Region/Environment/PermissionManager.cs +++ b/OpenSim/Region/Environment/PermissionManager.cs | |||
@@ -201,12 +201,12 @@ namespace OpenSim.Region.Environment | |||
201 | 201 | ||
202 | objflags &= (uint) | 202 | objflags &= (uint) |
203 | ~(LLObject.ObjectFlags.ObjectCopy | // Tells client you can copy the object | 203 | ~(LLObject.ObjectFlags.ObjectCopy | // Tells client you can copy the object |
204 | LLObject.ObjectFlags.ObjectModify | // tells client you can modify the object | 204 | LLObject.ObjectFlags.ObjectModify | // tells client you can modify the object |
205 | LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod) | 205 | LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod) |
206 | LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it | 206 | LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it |
207 | LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object | 207 | LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object |
208 | LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set | 208 | LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set |
209 | ); | 209 | ); |
210 | 210 | ||
211 | // Creating the three ObjectFlags options for this method to choose from. | 211 | // Creating the three ObjectFlags options for this method to choose from. |
212 | // Customize the OwnerMask | 212 | // Customize the OwnerMask |
@@ -495,10 +495,10 @@ namespace OpenSim.Region.Environment | |||
495 | return IsAdministrator(user); | 495 | return IsAdministrator(user); |
496 | } | 496 | } |
497 | 497 | ||
498 | public virtual bool CanRunConsoleCommand(LLUUID user) | 498 | public virtual bool CanRunConsoleCommand(LLUUID user) |
499 | { | 499 | { |
500 | return IsAdministrator(user); | 500 | return IsAdministrator(user); |
501 | } | 501 | } |
502 | 502 | ||
503 | public virtual bool CanTerraform(LLUUID user, LLVector3 position) | 503 | public virtual bool CanTerraform(LLUUID user, LLVector3 position) |
504 | { | 504 | { |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1204020..6984d8f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -227,6 +227,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
227 | get { return m_innerScene.RestorePresences; } | 227 | get { return m_innerScene.RestorePresences; } |
228 | set { m_innerScene.RestorePresences = value; } | 228 | set { m_innerScene.RestorePresences = value; } |
229 | } | 229 | } |
230 | |||
230 | #endregion | 231 | #endregion |
231 | 232 | ||
232 | #region Constructors | 233 | #region Constructors |
@@ -395,15 +396,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
395 | try | 396 | try |
396 | { | 397 | { |
397 | ForEachScenePresence(delegate(ScenePresence agent) | 398 | ForEachScenePresence(delegate(ScenePresence agent) |
399 | { | ||
400 | // If agent is a root agent. | ||
401 | if (!agent.IsChildAgent) | ||
398 | { | 402 | { |
399 | // If agent is a root agent. | 403 | //agent.ControllingClient.new |
400 | if (!agent.IsChildAgent) | 404 | //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); |
401 | { | 405 | InformClientOfNeighbor(agent, otherRegion); |
402 | //agent.ControllingClient.new | ||
403 | //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); | ||
404 | InformClientOfNeighbor(agent, otherRegion); | ||
405 | } | ||
406 | } | 406 | } |
407 | } | ||
407 | ); | 408 | ); |
408 | } | 409 | } |
409 | catch (NullReferenceException) | 410 | catch (NullReferenceException) |
@@ -463,7 +464,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
463 | { | 464 | { |
464 | if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) | 465 | if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) |
465 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " + | 466 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " + |
466 | ((8 - m_RestartTimerCounter) * 15) + " seconds"); | 467 | ((8 - m_RestartTimerCounter) * 15) + " seconds"); |
467 | 468 | ||
468 | // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + | 469 | // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + |
469 | //" seconds"); | 470 | //" seconds"); |
@@ -505,15 +506,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
505 | try | 506 | try |
506 | { | 507 | { |
507 | ForEachScenePresence(delegate(ScenePresence agent) | 508 | ForEachScenePresence(delegate(ScenePresence agent) |
509 | { | ||
510 | // If agent is a root agent. | ||
511 | if (!agent.IsChildAgent) | ||
508 | { | 512 | { |
509 | // If agent is a root agent. | 513 | //agent.ControllingClient.new |
510 | if (!agent.IsChildAgent) | 514 | //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); |
511 | { | 515 | InformClientOfNeighbor(agent, region); |
512 | //agent.ControllingClient.new | ||
513 | //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); | ||
514 | InformClientOfNeighbor(agent, region); | ||
515 | } | ||
516 | } | 516 | } |
517 | } | ||
517 | ); | 518 | ); |
518 | } | 519 | } |
519 | catch (NullReferenceException) | 520 | catch (NullReferenceException) |
@@ -580,16 +581,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
580 | m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName); | 581 | m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName); |
581 | // Kick all ROOT agents with the message, 'The simulator is going down' | 582 | // Kick all ROOT agents with the message, 'The simulator is going down' |
582 | ForEachScenePresence(delegate(ScenePresence avatar) | 583 | ForEachScenePresence(delegate(ScenePresence avatar) |
583 | { | 584 | { |
584 | if (avatar.KnownChildRegions.Contains(RegionInfo.RegionHandle)) | 585 | if (avatar.KnownChildRegions.Contains(RegionInfo.RegionHandle)) |
585 | avatar.KnownChildRegions.Remove(RegionInfo.RegionHandle); | 586 | avatar.KnownChildRegions.Remove(RegionInfo.RegionHandle); |
586 | 587 | ||
587 | if (!avatar.IsChildAgent) | 588 | if (!avatar.IsChildAgent) |
588 | avatar.ControllingClient.Kick("The simulator is going down."); | 589 | avatar.ControllingClient.Kick("The simulator is going down."); |
589 | 590 | ||
590 | avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator), | 591 | avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator), |
591 | ThrottleOutPacketType.Task); | 592 | ThrottleOutPacketType.Task); |
592 | }); | 593 | }); |
593 | 594 | ||
594 | // Wait here, or the kick messages won't actually get to the agents before the scene terminates. | 595 | // Wait here, or the kick messages won't actually get to the agents before the scene terminates. |
595 | Thread.Sleep(500); | 596 | Thread.Sleep(500); |
@@ -793,7 +794,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
793 | { | 794 | { |
794 | tmpval = tmpval - (tmpval - 1.0f); | 795 | tmpval = tmpval - (tmpval - 1.0f); |
795 | } | 796 | } |
796 | m_timedilation = tmpval; | 797 | m_timedilation = tmpval; |
797 | 798 | ||
798 | m_lastupdate = DateTime.Now; | 799 | m_lastupdate = DateTime.Now; |
799 | } | 800 | } |
@@ -884,9 +885,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
884 | { | 885 | { |
885 | List<MapBlockData> mapBlocks = | 886 | List<MapBlockData> mapBlocks = |
886 | m_sceneGridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9), | 887 | m_sceneGridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9), |
887 | (int)(RegionInfo.RegionLocY - 9), | 888 | (int)(RegionInfo.RegionLocY - 9), |
888 | (int)(RegionInfo.RegionLocX + 9), | 889 | (int)(RegionInfo.RegionLocX + 9), |
889 | (int)(RegionInfo.RegionLocY + 9)); | 890 | (int)(RegionInfo.RegionLocY + 9)); |
890 | List<AssetBase> textures = new List<AssetBase>(); | 891 | List<AssetBase> textures = new List<AssetBase>(); |
891 | List<Image> bitImages = new List<Image>(); | 892 | List<Image> bitImages = new List<Image>(); |
892 | 893 | ||
@@ -1048,7 +1049,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1048 | m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); | 1049 | m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); |
1049 | } | 1050 | } |
1050 | 1051 | ||
1051 | |||
1052 | /// <summary> | 1052 | /// <summary> |
1053 | /// Returns a new unallocated primitive ID | 1053 | /// Returns a new unallocated primitive ID |
1054 | /// </summary> | 1054 | /// </summary> |
@@ -1134,7 +1134,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, | 1136 | public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, |
1137 | Tree treeType, bool newTree) | 1137 | Tree treeType, bool newTree) |
1138 | { | 1138 | { |
1139 | LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID; | 1139 | LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID; |
1140 | PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); | 1140 | PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); |
@@ -1228,7 +1228,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1228 | { | 1228 | { |
1229 | pos.Y = ((pos.Y - Constants.RegionSize)); | 1229 | pos.Y = ((pos.Y - Constants.RegionSize)); |
1230 | newRegionHandle = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy + 1) * Constants.RegionSize)); | 1230 | newRegionHandle = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy + 1) * Constants.RegionSize)); |
1231 | // y + 1 | 1231 | // y + 1 |
1232 | } | 1232 | } |
1233 | else if (position.Y < -1f) | 1233 | else if (position.Y < -1f) |
1234 | { | 1234 | { |
@@ -1269,12 +1269,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1269 | } | 1269 | } |
1270 | } | 1270 | } |
1271 | } | 1271 | } |
1272 | |||
1272 | public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData) | 1273 | public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData) |
1273 | { | 1274 | { |
1274 | m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); | 1275 | m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); |
1275 | m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData); | 1276 | m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData); |
1276 | 1277 | ||
1277 | } | 1278 | } |
1279 | |||
1278 | #endregion | 1280 | #endregion |
1279 | 1281 | ||
1280 | #region Add/Remove Avatar Methods | 1282 | #region Add/Remove Avatar Methods |
@@ -1301,11 +1303,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1301 | 1303 | ||
1302 | m_innerScene.AddScenePresence(presence); | 1304 | m_innerScene.AddScenePresence(presence); |
1303 | 1305 | ||
1304 | lock (m_restorePresences) | 1306 | lock (m_restorePresences) |
1305 | { | 1307 | { |
1306 | Monitor.PulseAll(m_restorePresences); | 1308 | Monitor.PulseAll(m_restorePresences); |
1307 | } | 1309 | } |
1308 | } | 1310 | } |
1309 | else | 1311 | else |
1310 | { | 1312 | { |
1311 | m_log.Info("[REGION]: Add New Scene Presence"); | 1313 | m_log.Info("[REGION]: Add New Scene Presence"); |
@@ -1382,8 +1384,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1382 | client.OnMoveInventoryItem += MoveInventoryItem; | 1384 | client.OnMoveInventoryItem += MoveInventoryItem; |
1383 | client.OnRemoveInventoryItem += RemoveInventoryItem; | 1385 | client.OnRemoveInventoryItem += RemoveInventoryItem; |
1384 | client.OnRemoveInventoryFolder += RemoveInventoryFolder; | 1386 | client.OnRemoveInventoryFolder += RemoveInventoryFolder; |
1385 | // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest; | 1387 | // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest; |
1386 | // client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer; | 1388 | // client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer; |
1387 | client.OnRezScript += RezScript; | 1389 | client.OnRezScript += RezScript; |
1388 | 1390 | ||
1389 | client.OnRequestTaskInventory += RequestTaskInventory; | 1391 | client.OnRequestTaskInventory += RequestTaskInventory; |
@@ -1452,8 +1454,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1452 | { | 1454 | { |
1453 | m_innerScene.removeUserCount(true); | 1455 | m_innerScene.removeUserCount(true); |
1454 | m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle, | 1456 | m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle, |
1455 | avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, | 1457 | avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, |
1456 | avatar.AbsolutePosition.Z); | 1458 | avatar.AbsolutePosition.Z); |
1457 | List<ulong> childknownRegions = new List<ulong>(); | 1459 | List<ulong> childknownRegions = new List<ulong>(); |
1458 | List<ulong> ckn = avatar.GetKnownRegionList(); | 1460 | List<ulong> ckn = avatar.GetKnownRegionList(); |
1459 | for (int i = 0; i < ckn.Count; i++) | 1461 | for (int i = 0; i < ckn.Count; i++) |
@@ -1477,16 +1479,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
1477 | } | 1479 | } |
1478 | m_eventManager.TriggerOnRemovePresence(agentID); | 1480 | m_eventManager.TriggerOnRemovePresence(agentID); |
1479 | Broadcast(delegate(IClientAPI client) | 1481 | Broadcast(delegate(IClientAPI client) |
1482 | { | ||
1483 | try | ||
1484 | { | ||
1485 | client.SendKillObject(avatar.RegionHandle, avatar.LocalId); | ||
1486 | } | ||
1487 | catch (System.NullReferenceException) | ||
1480 | { | 1488 | { |
1481 | try | 1489 | //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway. |
1482 | { | 1490 | } |
1483 | client.SendKillObject(avatar.RegionHandle, avatar.LocalId); | 1491 | }); |
1484 | } | ||
1485 | catch (System.NullReferenceException) | ||
1486 | { | ||
1487 | //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway. | ||
1488 | } | ||
1489 | }); | ||
1490 | 1492 | ||
1491 | ForEachScenePresence( | 1493 | ForEachScenePresence( |
1492 | delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); | 1494 | delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); |
@@ -1903,8 +1905,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1903 | } | 1905 | } |
1904 | } | 1906 | } |
1905 | 1907 | ||
1906 | |||
1907 | |||
1908 | #endregion | 1908 | #endregion |
1909 | 1909 | ||
1910 | #region Other Methods | 1910 | #region Other Methods |
@@ -2152,10 +2152,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2152 | { | 2152 | { |
2153 | 2153 | ||
2154 | ClientManager.ForEachClient(delegate(IClientAPI controller) | 2154 | ClientManager.ForEachClient(delegate(IClientAPI controller) |
2155 | { | 2155 | { |
2156 | controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message); | 2156 | controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message); |
2157 | } | 2157 | } |
2158 | ); | 2158 | ); |
2159 | } | 2159 | } |
2160 | 2160 | ||
2161 | /// <summary> | 2161 | /// <summary> |
@@ -2180,27 +2180,27 @@ namespace OpenSim.Region.Environment.Scenes | |||
2180 | if (agentID == kickUserID) | 2180 | if (agentID == kickUserID) |
2181 | { | 2181 | { |
2182 | ClientManager.ForEachClient(delegate(IClientAPI controller) | 2182 | ClientManager.ForEachClient(delegate(IClientAPI controller) |
2183 | { | 2183 | { |
2184 | if (controller.AgentId != godID) | 2184 | if (controller.AgentId != godID) |
2185 | controller.Kick(Helpers.FieldToUTF8String(reason)); | 2185 | controller.Kick(Helpers.FieldToUTF8String(reason)); |
2186 | 2186 | ||
2187 | 2187 | ||
2188 | 2188 | ||
2189 | } | 2189 | } |
2190 | ); | 2190 | ); |
2191 | // This is a bit crude. It seems the client will be null before it actually stops the thread | 2191 | // This is a bit crude. It seems the client will be null before it actually stops the thread |
2192 | // The thread will kill itself eventually :/ | 2192 | // The thread will kill itself eventually :/ |
2193 | // Is there another way to make sure *all* clients get this 'inter region' message? | 2193 | // Is there another way to make sure *all* clients get this 'inter region' message? |
2194 | ClientManager.ForEachClient(delegate(IClientAPI controller) | 2194 | ClientManager.ForEachClient(delegate(IClientAPI controller) |
2195 | { | 2195 | { |
2196 | ScenePresence p = GetScenePresence(controller.AgentId); | 2196 | ScenePresence p = GetScenePresence(controller.AgentId); |
2197 | bool childagent = !p.Equals(null) && p.IsChildAgent; | 2197 | bool childagent = !p.Equals(null) && p.IsChildAgent; |
2198 | if (controller.AgentId != godID && !childagent) | 2198 | if (controller.AgentId != godID && !childagent) |
2199 | // Do we really want to kick the initiator of this madness? | 2199 | // Do we really want to kick the initiator of this madness? |
2200 | { | 2200 | { |
2201 | controller.Close(true); | 2201 | controller.Close(true); |
2202 | } | ||
2203 | } | 2202 | } |
2203 | } | ||
2204 | ); | 2204 | ); |
2205 | } | 2205 | } |
2206 | else | 2206 | else |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index b00b678..050bf95 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -115,12 +115,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
115 | 115 | ||
116 | protected AvatarAppearance m_appearance; | 116 | protected AvatarAppearance m_appearance; |
117 | 117 | ||
118 | //neighbouring regions we have enabled a child agent in | ||
118 | private readonly List<ulong> m_knownChildRegions = new List<ulong>(); | 119 | private readonly List<ulong> m_knownChildRegions = new List<ulong>(); |
119 | //neighbouring regions we have enabled a child agent in | ||
120 | 120 | ||
121 | private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement; | 121 | private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement; |
122 | 122 | ||
123 | |||
124 | /// <summary> | 123 | /// <summary> |
125 | /// Implemented Control Flags | 124 | /// Implemented Control Flags |
126 | /// </summary> | 125 | /// </summary> |
@@ -1447,12 +1446,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1447 | m_perfMonMS=System.Environment.TickCount; | 1446 | m_perfMonMS=System.Environment.TickCount; |
1448 | 1447 | ||
1449 | m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) | 1448 | m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) |
1449 | { | ||
1450 | if (scenePresence.UUID != UUID) | ||
1450 | { | 1451 | { |
1451 | if (scenePresence.UUID != UUID) | 1452 | m_appearance.SendAppearanceToOtherAgent(scenePresence); |
1452 | { | 1453 | } |
1453 | m_appearance.SendAppearanceToOtherAgent(scenePresence); | 1454 | }); |
1454 | } | ||
1455 | }); | ||
1456 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); | 1455 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); |
1457 | } | 1456 | } |
1458 | 1457 | ||
@@ -1780,9 +1779,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1780 | } | 1779 | } |
1781 | 1780 | ||
1782 | [SecurityPermission(SecurityAction.LinkDemand, | 1781 | [SecurityPermission(SecurityAction.LinkDemand, |
1783 | Flags = SecurityPermissionFlag.SerializationFormatter)] | 1782 | Flags = SecurityPermissionFlag.SerializationFormatter)] |
1784 | public virtual void GetObjectData( | 1783 | public virtual void GetObjectData( |
1785 | SerializationInfo info, StreamingContext context) | 1784 | SerializationInfo info, StreamingContext context) |
1786 | { | 1785 | { |
1787 | if (info == null) | 1786 | if (info == null) |
1788 | { | 1787 | { |
@@ -1792,7 +1791,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1792 | info.AddValue("FullID", FullID.UUID); | 1791 | info.AddValue("FullID", FullID.UUID); |
1793 | info.AddValue("LastFullUpdateTime", LastFullUpdateTime); | 1792 | info.AddValue("LastFullUpdateTime", LastFullUpdateTime); |
1794 | info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime); | 1793 | info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime); |
1795 | |||
1796 | } | 1794 | } |
1797 | } | 1795 | } |
1798 | 1796 | ||
@@ -1929,9 +1927,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1929 | 1927 | ||
1930 | m_requestedSitOffset | 1928 | m_requestedSitOffset |
1931 | = new LLVector3( | 1929 | = new LLVector3( |
1932 | (float)info.GetValue("m_requestedSitOffset.X", typeof(float)), | 1930 | (float)info.GetValue("m_requestedSitOffset.X", typeof(float)), |
1933 | (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)), | 1931 | (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)), |
1934 | (float)info.GetValue("m_requestedSitOffset.Z", typeof(float))); | 1932 | (float)info.GetValue("m_requestedSitOffset.Z", typeof(float))); |
1935 | 1933 | ||
1936 | m_sitAvatarHeight = (float)info.GetValue("m_sitAvatarHeight", typeof(float)); | 1934 | m_sitAvatarHeight = (float)info.GetValue("m_sitAvatarHeight", typeof(float)); |
1937 | m_godlevel = (float)info.GetValue("m_godlevel", typeof(float)); | 1935 | m_godlevel = (float)info.GetValue("m_godlevel", typeof(float)); |
@@ -1939,10 +1937,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1939 | 1937 | ||
1940 | m_bodyRot | 1938 | m_bodyRot |
1941 | = new Quaternion( | 1939 | = new Quaternion( |
1942 | (float)info.GetValue("m_bodyRot.w", typeof(float)), | 1940 | (float)info.GetValue("m_bodyRot.w", typeof(float)), |
1943 | (float)info.GetValue("m_bodyRot.x", typeof(float)), | 1941 | (float)info.GetValue("m_bodyRot.x", typeof(float)), |
1944 | (float)info.GetValue("m_bodyRot.y", typeof(float)), | 1942 | (float)info.GetValue("m_bodyRot.y", typeof(float)), |
1945 | (float)info.GetValue("m_bodyRot.z", typeof(float))); | 1943 | (float)info.GetValue("m_bodyRot.z", typeof(float))); |
1946 | 1944 | ||
1947 | IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool)); | 1945 | IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool)); |
1948 | m_newForce = (bool)info.GetValue("m_newForce", typeof(bool)); | 1946 | m_newForce = (bool)info.GetValue("m_newForce", typeof(bool)); |
@@ -1964,33 +1962,33 @@ namespace OpenSim.Region.Environment.Scenes | |||
1964 | 1962 | ||
1965 | lastPhysPos | 1963 | lastPhysPos |
1966 | = new LLVector3( | 1964 | = new LLVector3( |
1967 | (float)info.GetValue("lastPhysPos.X", typeof(float)), | 1965 | (float)info.GetValue("lastPhysPos.X", typeof(float)), |
1968 | (float)info.GetValue("lastPhysPos.Y", typeof(float)), | 1966 | (float)info.GetValue("lastPhysPos.Y", typeof(float)), |
1969 | (float)info.GetValue("lastPhysPos.Z", typeof(float))); | 1967 | (float)info.GetValue("lastPhysPos.Z", typeof(float))); |
1970 | 1968 | ||
1971 | m_CameraCenter | 1969 | m_CameraCenter |
1972 | = new Vector3( | 1970 | = new Vector3( |
1973 | (float)info.GetValue("m_CameraCenter.X", typeof(float)), | 1971 | (float)info.GetValue("m_CameraCenter.X", typeof(float)), |
1974 | (float)info.GetValue("m_CameraCenter.Y", typeof(float)), | 1972 | (float)info.GetValue("m_CameraCenter.Y", typeof(float)), |
1975 | (float)info.GetValue("m_CameraCenter.Z", typeof(float))); | 1973 | (float)info.GetValue("m_CameraCenter.Z", typeof(float))); |
1976 | 1974 | ||
1977 | m_CameraAtAxis | 1975 | m_CameraAtAxis |
1978 | = new Vector3( | 1976 | = new Vector3( |
1979 | (float)info.GetValue("m_CameraAtAxis.X", typeof(float)), | 1977 | (float)info.GetValue("m_CameraAtAxis.X", typeof(float)), |
1980 | (float)info.GetValue("m_CameraAtAxis.Y", typeof(float)), | 1978 | (float)info.GetValue("m_CameraAtAxis.Y", typeof(float)), |
1981 | (float)info.GetValue("m_CameraAtAxis.Z", typeof(float))); | 1979 | (float)info.GetValue("m_CameraAtAxis.Z", typeof(float))); |
1982 | 1980 | ||
1983 | m_CameraLeftAxis | 1981 | m_CameraLeftAxis |
1984 | = new Vector3( | 1982 | = new Vector3( |
1985 | (float)info.GetValue("m_CameraLeftAxis.X", typeof(float)), | 1983 | (float)info.GetValue("m_CameraLeftAxis.X", typeof(float)), |
1986 | (float)info.GetValue("m_CameraLeftAxis.Y", typeof(float)), | 1984 | (float)info.GetValue("m_CameraLeftAxis.Y", typeof(float)), |
1987 | (float)info.GetValue("m_CameraLeftAxis.Z", typeof(float))); | 1985 | (float)info.GetValue("m_CameraLeftAxis.Z", typeof(float))); |
1988 | 1986 | ||
1989 | m_CameraUpAxis | 1987 | m_CameraUpAxis |
1990 | = new Vector3( | 1988 | = new Vector3( |
1991 | (float)info.GetValue("m_CameraUpAxis.X", typeof(float)), | 1989 | (float)info.GetValue("m_CameraUpAxis.X", typeof(float)), |
1992 | (float)info.GetValue("m_CameraUpAxis.Y", typeof(float)), | 1990 | (float)info.GetValue("m_CameraUpAxis.Y", typeof(float)), |
1993 | (float)info.GetValue("m_CameraUpAxis.Z", typeof(float))); | 1991 | (float)info.GetValue("m_CameraUpAxis.Z", typeof(float))); |
1994 | 1992 | ||
1995 | m_DrawDistance = (float)info.GetValue("m_DrawDistance", typeof(float)); | 1993 | m_DrawDistance = (float)info.GetValue("m_DrawDistance", typeof(float)); |
1996 | m_appearance = (AvatarAppearance)info.GetValue("m_appearance", typeof(AvatarAppearance)); | 1994 | m_appearance = (AvatarAppearance)info.GetValue("m_appearance", typeof(AvatarAppearance)); |
@@ -1998,9 +1996,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1998 | 1996 | ||
1999 | posLastSignificantMove | 1997 | posLastSignificantMove |
2000 | = new LLVector3( | 1998 | = new LLVector3( |
2001 | (float)info.GetValue("posLastSignificantMove.X", typeof(float)), | 1999 | (float)info.GetValue("posLastSignificantMove.X", typeof(float)), |
2002 | (float)info.GetValue("posLastSignificantMove.Y", typeof(float)), | 2000 | (float)info.GetValue("posLastSignificantMove.Y", typeof(float)), |
2003 | (float)info.GetValue("posLastSignificantMove.Z", typeof(float))); | 2001 | (float)info.GetValue("posLastSignificantMove.Z", typeof(float))); |
2004 | 2002 | ||
2005 | // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue)); | 2003 | // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue)); |
2006 | 2004 | ||
@@ -2018,41 +2016,41 @@ namespace OpenSim.Region.Environment.Scenes | |||
2018 | m_lastname = (string)info.GetValue("m_lastname", typeof(string)); | 2016 | m_lastname = (string)info.GetValue("m_lastname", typeof(string)); |
2019 | m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool)); | 2017 | m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool)); |
2020 | m_parentPosition = new LLVector3((float)info.GetValue("m_parentPosition.X", typeof(float)), | 2018 | m_parentPosition = new LLVector3((float)info.GetValue("m_parentPosition.X", typeof(float)), |
2021 | (float)info.GetValue("m_parentPosition.Y", typeof(float)), | 2019 | (float)info.GetValue("m_parentPosition.Y", typeof(float)), |
2022 | (float)info.GetValue("m_parentPosition.Z", typeof(float))); | 2020 | (float)info.GetValue("m_parentPosition.Z", typeof(float))); |
2023 | 2021 | ||
2024 | m_isChildAgent = (bool)info.GetValue("m_isChildAgent", typeof(bool)); | 2022 | m_isChildAgent = (bool)info.GetValue("m_isChildAgent", typeof(bool)); |
2025 | m_parentID = (uint)info.GetValue("m_parentID", typeof(uint)); | 2023 | m_parentID = (uint)info.GetValue("m_parentID", typeof(uint)); |
2026 | 2024 | ||
2027 | // for OpenSim_v0.5 | 2025 | // for OpenSim_v0.5 |
2028 | currentParcelUUID = new LLUUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid))); | 2026 | currentParcelUUID = new LLUUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid))); |
2029 | 2027 | ||
2030 | lastKnownAllowedPosition | 2028 | lastKnownAllowedPosition |
2031 | = new Vector3( | 2029 | = new Vector3( |
2032 | (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)), | 2030 | (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)), |
2033 | (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)), | 2031 | (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)), |
2034 | (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float))); | 2032 | (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float))); |
2035 | 2033 | ||
2036 | sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); | 2034 | sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); |
2037 | 2035 | ||
2038 | m_LastChildAgentUpdatePosition | 2036 | m_LastChildAgentUpdatePosition |
2039 | = new LLVector3( | 2037 | = new LLVector3( |
2040 | (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), | 2038 | (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), |
2041 | (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), | 2039 | (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), |
2042 | (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); | 2040 | (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); |
2043 | 2041 | ||
2044 | m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int)); | 2042 | m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int)); |
2045 | m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); | 2043 | m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); |
2046 | 2044 | ||
2047 | m_headrotation | 2045 | m_headrotation |
2048 | = new LLQuaternion( | 2046 | = new LLQuaternion( |
2049 | (float)info.GetValue("m_headrotation.W", typeof(float)), | 2047 | (float)info.GetValue("m_headrotation.W", typeof(float)), |
2050 | (float)info.GetValue("m_headrotation.X", typeof(float)), | 2048 | (float)info.GetValue("m_headrotation.X", typeof(float)), |
2051 | (float)info.GetValue("m_headrotation.Y", typeof(float)), | 2049 | (float)info.GetValue("m_headrotation.Y", typeof(float)), |
2052 | (float)info.GetValue("m_headrotation.Z", typeof(float))); | 2050 | (float)info.GetValue("m_headrotation.Z", typeof(float))); |
2053 | 2051 | ||
2054 | m_state = (byte)info.GetValue("m_state", typeof(byte)); | 2052 | m_state = (byte)info.GetValue("m_state", typeof(byte)); |
2055 | 2053 | ||
2056 | List<Guid> knownPrimUUID_work = (List<Guid>)info.GetValue("m_knownPrimUUID", typeof(List<Guid>)); | 2054 | List<Guid> knownPrimUUID_work = (List<Guid>)info.GetValue("m_knownPrimUUID", typeof(List<Guid>)); |
2057 | 2055 | ||
2058 | foreach (Guid id in knownPrimUUID_work) | 2056 | foreach (Guid id in knownPrimUUID_work) |
@@ -2064,9 +2062,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
2064 | } | 2062 | } |
2065 | 2063 | ||
2066 | [SecurityPermission(SecurityAction.LinkDemand, | 2064 | [SecurityPermission(SecurityAction.LinkDemand, |
2067 | Flags = SecurityPermissionFlag.SerializationFormatter)] | 2065 | Flags = SecurityPermissionFlag.SerializationFormatter)] |
2068 | public override void GetObjectData( | 2066 | public override void GetObjectData( |
2069 | SerializationInfo info, StreamingContext context) | 2067 | SerializationInfo info, StreamingContext context) |
2070 | { | 2068 | { |
2071 | if (info == null) | 2069 | if (info == null) |
2072 | { | 2070 | { |
@@ -2196,17 +2194,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
2196 | info.AddValue("m_LastChildAgentUpdatePosition.X", m_LastChildAgentUpdatePosition.X); | 2194 | info.AddValue("m_LastChildAgentUpdatePosition.X", m_LastChildAgentUpdatePosition.X); |
2197 | info.AddValue("m_LastChildAgentUpdatePosition.Y", m_LastChildAgentUpdatePosition.Y); | 2195 | info.AddValue("m_LastChildAgentUpdatePosition.Y", m_LastChildAgentUpdatePosition.Y); |
2198 | info.AddValue("m_LastChildAgentUpdatePosition.Z", m_LastChildAgentUpdatePosition.Z); | 2196 | info.AddValue("m_LastChildAgentUpdatePosition.Z", m_LastChildAgentUpdatePosition.Z); |
2199 | 2197 | ||
2200 | info.AddValue("m_perfMonMS", m_perfMonMS); | 2198 | info.AddValue("m_perfMonMS", m_perfMonMS); |
2201 | info.AddValue("m_AgentControlFlags", m_AgentControlFlags); | 2199 | info.AddValue("m_AgentControlFlags", m_AgentControlFlags); |
2202 | 2200 | ||
2203 | info.AddValue("m_headrotation.W", m_headrotation.W); | 2201 | info.AddValue("m_headrotation.W", m_headrotation.W); |
2204 | info.AddValue("m_headrotation.X", m_headrotation.X); | 2202 | info.AddValue("m_headrotation.X", m_headrotation.X); |
2205 | info.AddValue("m_headrotation.Y", m_headrotation.Y); | 2203 | info.AddValue("m_headrotation.Y", m_headrotation.Y); |
2206 | info.AddValue("m_headrotation.Z", m_headrotation.Z); | 2204 | info.AddValue("m_headrotation.Z", m_headrotation.Z); |
2207 | 2205 | ||
2208 | info.AddValue("m_state", m_state); | 2206 | info.AddValue("m_state", m_state); |
2209 | 2207 | ||
2210 | List<Guid> knownPrimUUID_work = new List<Guid>(); | 2208 | List<Guid> knownPrimUUID_work = new List<Guid>(); |
2211 | 2209 | ||
2212 | foreach (LLUUID id in m_knownPrimUUID) | 2210 | foreach (LLUUID id in m_knownPrimUUID) |
@@ -2215,6 +2213,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
2215 | } | 2213 | } |
2216 | 2214 | ||
2217 | info.AddValue("m_knownPrimUUID", knownPrimUUID_work); | 2215 | info.AddValue("m_knownPrimUUID", knownPrimUUID_work); |
2218 | } | 2216 | } |
2219 | } | 2217 | } |
2220 | } | 2218 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index fcc8519..fd2bd15 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs | |||
@@ -636,15 +636,15 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
636 | //OpenSim functions | 636 | //OpenSim functions |
637 | string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); | 637 | string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); |
638 | string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | 638 | string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, |
639 | int timer, int alpha); | 639 | int timer, int alpha); |
640 | string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer); | 640 | string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer); |
641 | string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | 641 | string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, |
642 | int timer, int alpha); | 642 | int timer, int alpha); |
643 | double osTerrainGetHeight(int x, int y); | 643 | double osTerrainGetHeight(int x, int y); |
644 | int osTerrainSetHeight(int x, int y, double val); | 644 | int osTerrainSetHeight(int x, int y, double val); |
645 | int osRegionRestart(double seconds); | 645 | int osRegionRestart(double seconds); |
646 | void osRegionNotice(string msg); | 646 | void osRegionNotice(string msg); |
647 | bool osConsoleCommand(string Command); | 647 | bool osConsoleCommand(string Command); |
648 | void osSetParcelMediaURL(string url); | 648 | void osSetParcelMediaURL(string url); |
649 | void osSetPrimFloatOnWater(int floatYN); | 649 | void osSetPrimFloatOnWater(int floatYN); |
650 | 650 | ||