diff options
author | Jeff Ames | 2008-05-30 08:35:57 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-30 08:35:57 +0000 |
commit | 04625109560fb54d613b1fc9c81a8a9f387720c9 (patch) | |
tree | af00035a676beee3542a55cd13ce09e57f1ad778 | |
parent | thanks krtaylor for a (diff) | |
download | opensim-SC_OLD-04625109560fb54d613b1fc9c81a8a9f387720c9.zip opensim-SC_OLD-04625109560fb54d613b1fc9c81a8a9f387720c9.tar.gz opensim-SC_OLD-04625109560fb54d613b1fc9c81a8a9f387720c9.tar.bz2 opensim-SC_OLD-04625109560fb54d613b1fc9c81a8a9f387720c9.tar.xz |
Update svn properties. Formatting cleanup.
21 files changed, 396 insertions, 442 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 6441412..3d32511 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt | |||
@@ -23,9 +23,10 @@ OpenSim Developers | |||
23 | * Danx0r | 23 | * Danx0r |
24 | * Dalien | 24 | * Dalien |
25 | * Darok | 25 | * Darok |
26 | * chi11ken (3Di) | 26 | * chi11ken (Genkii) |
27 | * adjohn (3Di) | 27 | * adjohn (Genkii) |
28 | * Alondria | 28 | * Alondria |
29 | * Dr Scofield (IBM) | ||
29 | 30 | ||
30 | 31 | ||
31 | Patches | 32 | Patches |
@@ -38,7 +39,6 @@ Patches | |||
38 | * daTwitch | 39 | * daTwitch |
39 | * mikkopa/_someone - RealXtend | 40 | * mikkopa/_someone - RealXtend |
40 | * openlifegrid.com | 41 | * openlifegrid.com |
41 | * Dr Scofield (IBM) | ||
42 | * Daedius | 42 | * Daedius |
43 | * alex_carnell | 43 | * alex_carnell |
44 | * webmage (IBM) | 44 | * webmage (IBM) |
@@ -81,8 +81,8 @@ This software uses components from the following developers: | |||
81 | * NUnit (http://www.nunit.org) | 81 | * NUnit (http://www.nunit.org) |
82 | * AGEIA Inc. (PhysX) | 82 | * AGEIA Inc. (PhysX) |
83 | * Russel L. Smith (ODE) | 83 | * Russel L. Smith (ODE) |
84 | * Prebuild ( http://sourceforge.net/projects/dnpb/ ) | 84 | * Prebuild (http://sourceforge.net/projects/dnpb/) |
85 | * LibSecondLife ( http://www.libsecondlife.org/wiki/Main_Page ) | 85 | * LibSecondLife (http://www.libsecondlife.org/wiki/Main_Page) |
86 | 86 | ||
87 | 87 | ||
88 | In addition, we would like to thank: | 88 | In addition, we would like to thank: |
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs index 421c283..86ceffc 100644 --- a/OpenSim/Data/MySQL/MySQLGridData.cs +++ b/OpenSim/Data/MySQL/MySQLGridData.cs | |||
@@ -53,9 +53,12 @@ namespace OpenSim.Data.MySQL | |||
53 | /// </summary> | 53 | /// </summary> |
54 | override public void Initialise(string connect) | 54 | override public void Initialise(string connect) |
55 | { | 55 | { |
56 | if (connect != String.Empty) { | 56 | if (connect != String.Empty) |
57 | { | ||
57 | database = new MySQLManager(connect); | 58 | database = new MySQLManager(connect); |
58 | } else { | 59 | } |
60 | else | ||
61 | { | ||
59 | m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.xml and we'll use that instead"); | 62 | m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.xml and we'll use that instead"); |
60 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); | 63 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); |
61 | string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); | 64 | string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); |
@@ -65,9 +68,8 @@ namespace OpenSim.Data.MySQL | |||
65 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); | 68 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); |
66 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); | 69 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); |
67 | 70 | ||
68 | database = | 71 | database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, |
69 | new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, | 72 | settingPooling, settingPort); |
70 | settingPort); | ||
71 | } | 73 | } |
72 | 74 | ||
73 | TestTables(); | 75 | TestTables(); |
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 74afe4f..8e160b7 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Data.MySQL | |||
50 | 50 | ||
51 | public void Initialise(string connect) | 51 | public void Initialise(string connect) |
52 | { | 52 | { |
53 | if(connect != String.Empty) | 53 | if (connect != String.Empty) |
54 | { | 54 | { |
55 | database = new MySQLManager(connect); | 55 | database = new MySQLManager(connect); |
56 | } | 56 | } |
diff --git a/OpenSim/Data/MySQL/MySQLLogData.cs b/OpenSim/Data/MySQL/MySQLLogData.cs index 0873066..2bd246a 100644 --- a/OpenSim/Data/MySQL/MySQLLogData.cs +++ b/OpenSim/Data/MySQL/MySQLLogData.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Data.MySQL | |||
34 | /// An interface to the log database for MySQL | 34 | /// An interface to the log database for MySQL |
35 | /// </summary> | 35 | /// </summary> |
36 | internal class MySQLLogData : ILogData | 36 | internal class MySQLLogData : ILogData |
37 | { | 37 | { |
38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
39 | /// <summary> | 39 | /// <summary> |
40 | /// The database manager | 40 | /// The database manager |
@@ -46,9 +46,12 @@ namespace OpenSim.Data.MySQL | |||
46 | /// </summary> | 46 | /// </summary> |
47 | public void Initialise(string connect) | 47 | public void Initialise(string connect) |
48 | { | 48 | { |
49 | if (connect != String.Empty) { | 49 | if (connect != String.Empty) |
50 | { | ||
50 | database = new MySQLManager(connect); | 51 | database = new MySQLManager(connect); |
51 | } else { | 52 | } |
53 | else | ||
54 | { | ||
52 | m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.xml and we'll use that instead"); | 55 | m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.xml and we'll use that instead"); |
53 | 56 | ||
54 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); | 57 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); |
@@ -59,9 +62,8 @@ namespace OpenSim.Data.MySQL | |||
59 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); | 62 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); |
60 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); | 63 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); |
61 | 64 | ||
62 | database = | 65 | database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, |
63 | new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, | 66 | settingPooling, settingPort); |
64 | settingPort); | ||
65 | } | 67 | } |
66 | } | 68 | } |
67 | 69 | ||
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index cc64e6c..e8353b4 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -255,28 +255,28 @@ namespace OpenSim.Framework.Communications | |||
255 | remote_client.SendNameReply(uuid, names[0], names[1]); | 255 | remote_client.SendNameReply(uuid, names[0], names[1]); |
256 | } | 256 | } |
257 | 257 | ||
258 | } | 258 | } |
259 | } | 259 | } |
260 | 260 | ||
261 | private string[] doUUIDNameRequest(LLUUID uuid) | 261 | private string[] doUUIDNameRequest(LLUUID uuid) |
262 | { | 262 | { |
263 | string[] returnstring = new string[0]; | 263 | string[] returnstring = new string[0]; |
264 | bool doLookup = false; | 264 | bool doLookup = false; |
265 | 265 | ||
266 | 266 | ||
267 | lock (m_nameRequestCache) | 267 | lock (m_nameRequestCache) |
268 | { | 268 | { |
269 | if (m_nameRequestCache.ContainsKey(uuid)) | 269 | if (m_nameRequestCache.ContainsKey(uuid)) |
270 | { | 270 | { |
271 | returnstring = m_nameRequestCache[uuid]; | 271 | returnstring = m_nameRequestCache[uuid]; |
272 | } | 272 | } |
273 | else | 273 | else |
274 | { | 274 | { |
275 | // we don't want to lock the dictionary while we're doing the lookup | 275 | // we don't want to lock the dictionary while we're doing the lookup |
276 | doLookup = true; | 276 | doLookup = true; |
277 | } | 277 | } |
278 | } | 278 | } |
279 | 279 | ||
280 | if (doLookup) { | 280 | if (doLookup) { |
281 | UserProfileData profileData = m_userService.GetUserProfile(uuid); | 281 | UserProfileData profileData = m_userService.GetUserProfile(uuid); |
282 | if (profileData != null) | 282 | if (profileData != null) |
@@ -293,7 +293,7 @@ namespace OpenSim.Framework.Communications | |||
293 | } | 293 | } |
294 | } | 294 | } |
295 | return returnstring; | 295 | return returnstring; |
296 | 296 | ||
297 | } | 297 | } |
298 | 298 | ||
299 | public bool UUIDNameCachedTest(LLUUID uuid) | 299 | public bool UUIDNameCachedTest(LLUUID uuid) |
@@ -311,7 +311,7 @@ namespace OpenSim.Framework.Communications | |||
311 | string lastname = names[1]; | 311 | string lastname = names[1]; |
312 | 312 | ||
313 | return firstname + " " + lastname; | 313 | return firstname + " " + lastname; |
314 | 314 | ||
315 | } | 315 | } |
316 | return "(hippos)"; | 316 | return "(hippos)"; |
317 | } | 317 | } |
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index e57682f..ce351ca 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -84,7 +84,8 @@ namespace OpenSim.Framework.Servers | |||
84 | 84 | ||
85 | string handlerKey = GetHandlerKey(httpMethod, path); | 85 | string handlerKey = GetHandlerKey(httpMethod, path); |
86 | 86 | ||
87 | lock(m_streamHandlers) { | 87 | lock (m_streamHandlers) |
88 | { | ||
88 | if (!m_streamHandlers.ContainsKey(handlerKey)) | 89 | if (!m_streamHandlers.ContainsKey(handlerKey)) |
89 | { | 90 | { |
90 | //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey); | 91 | //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey); |
@@ -100,7 +101,8 @@ namespace OpenSim.Framework.Servers | |||
100 | 101 | ||
101 | public bool AddXmlRPCHandler(string method, XmlRpcMethod handler) | 102 | public bool AddXmlRPCHandler(string method, XmlRpcMethod handler) |
102 | { | 103 | { |
103 | lock(m_rpcHandlers) { | 104 | lock (m_rpcHandlers) |
105 | { | ||
104 | if (!m_rpcHandlers.ContainsKey(method)) | 106 | if (!m_rpcHandlers.ContainsKey(method)) |
105 | { | 107 | { |
106 | m_rpcHandlers.Add(method, handler); | 108 | m_rpcHandlers.Add(method, handler); |
@@ -114,7 +116,8 @@ namespace OpenSim.Framework.Servers | |||
114 | 116 | ||
115 | public bool AddHTTPHandler(string method, GenericHTTPMethod handler) | 117 | public bool AddHTTPHandler(string method, GenericHTTPMethod handler) |
116 | { | 118 | { |
117 | lock(m_HTTPHandlers) { | 119 | lock (m_HTTPHandlers) |
120 | { | ||
118 | if (!m_HTTPHandlers.ContainsKey(method)) | 121 | if (!m_HTTPHandlers.ContainsKey(method)) |
119 | { | 122 | { |
120 | m_HTTPHandlers.Add(method, handler); | 123 | m_HTTPHandlers.Add(method, handler); |
@@ -132,7 +135,8 @@ namespace OpenSim.Framework.Servers | |||
132 | 135 | ||
133 | public bool AddAgentHandler(string agent, IHttpAgentHandler handler) | 136 | public bool AddAgentHandler(string agent, IHttpAgentHandler handler) |
134 | { | 137 | { |
135 | lock(m_agentHandlers) { | 138 | lock (m_agentHandlers) |
139 | { | ||
136 | if (!m_agentHandlers.ContainsKey(agent)) | 140 | if (!m_agentHandlers.ContainsKey(agent)) |
137 | { | 141 | { |
138 | m_agentHandlers.Add(agent, handler); | 142 | m_agentHandlers.Add(agent, handler); |
@@ -171,7 +175,8 @@ namespace OpenSim.Framework.Servers | |||
171 | 175 | ||
172 | if (TryGetAgentHandler(request, response, out agentHandler)) | 176 | if (TryGetAgentHandler(request, response, out agentHandler)) |
173 | { | 177 | { |
174 | if (HandleAgentRequest(agentHandler, request, response)) { | 178 | if (HandleAgentRequest(agentHandler, request, response)) |
179 | { | ||
175 | m_log.DebugFormat("[HTTP-AGENT] Handler located for {0}", request.UserAgent); | 180 | m_log.DebugFormat("[HTTP-AGENT] Handler located for {0}", request.UserAgent); |
176 | return; | 181 | return; |
177 | } | 182 | } |
diff --git a/OpenSim/Framework/Servers/OSHttpRequestPump.cs b/OpenSim/Framework/Servers/OSHttpRequestPump.cs index 78348bb..8a3e73f 100644 --- a/OpenSim/Framework/Servers/OSHttpRequestPump.cs +++ b/OpenSim/Framework/Servers/OSHttpRequestPump.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Servers | |||
47 | public static OSHttpRequestPump[] Pumps(OSHttpServer server, int poolSize) | 47 | public static OSHttpRequestPump[] Pumps(OSHttpServer server, int poolSize) |
48 | { | 48 | { |
49 | OSHttpRequestPump[] pumps = new OSHttpRequestPump[poolSize]; | 49 | OSHttpRequestPump[] pumps = new OSHttpRequestPump[poolSize]; |
50 | for(int i = 0; i < pumps.Length; i++) | 50 | for (int i = 0; i < pumps.Length; i++) |
51 | { | 51 | { |
52 | pumps[i]._httpServer = server; | 52 | pumps[i]._httpServer = server; |
53 | } | 53 | } |
diff --git a/OpenSim/Framework/Servers/OSHttpServer.cs b/OpenSim/Framework/Servers/OSHttpServer.cs index e6caac3..3aa8042 100644 --- a/OpenSim/Framework/Servers/OSHttpServer.cs +++ b/OpenSim/Framework/Servers/OSHttpServer.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Framework.Servers | |||
58 | 58 | ||
59 | // thread identifier | 59 | // thread identifier |
60 | protected string _engineId; | 60 | protected string _engineId; |
61 | public string EngineID | 61 | public string EngineID |
62 | { | 62 | { |
63 | get { return _engineId; } | 63 | get { return _engineId; } |
64 | } | 64 | } |
@@ -86,7 +86,7 @@ namespace OpenSim.Framework.Servers | |||
86 | /// <summary> | 86 | /// <summary> |
87 | /// Instantiate an HTTPS server. | 87 | /// Instantiate an HTTPS server. |
88 | /// </summary> | 88 | /// </summary> |
89 | public OSHttpServer(IPAddress address, int port, X509Certificate certificate, int poolSize) : | 89 | public OSHttpServer(IPAddress address, int port, X509Certificate certificate, int poolSize) : |
90 | this(address, port, poolSize) | 90 | this(address, port, poolSize) |
91 | { | 91 | { |
92 | _engineId = String.Format("OSHttpServer [HTTPS:{0}/ps:{1}]", port, poolSize); | 92 | _engineId = String.Format("OSHttpServer [HTTPS:{0}/ps:{1}]", port, poolSize); |
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Servers | |||
96 | /// <summary> | 96 | /// <summary> |
97 | /// Start the HTTP server engine. | 97 | /// Start the HTTP server engine. |
98 | /// </summary> | 98 | /// </summary> |
99 | public void Start() | 99 | public void Start() |
100 | { | 100 | { |
101 | _engine = new Thread(new ThreadStart(Engine)); | 101 | _engine = new Thread(new ThreadStart(Engine)); |
102 | _engine.Name = _engineId; | 102 | _engine.Name = _engineId; |
@@ -107,13 +107,13 @@ namespace OpenSim.Framework.Servers | |||
107 | 107 | ||
108 | /// <summary> | 108 | /// <summary> |
109 | /// </summary> | 109 | /// </summary> |
110 | private void Engine() | 110 | private void Engine() |
111 | { | 111 | { |
112 | while (true) | 112 | while (true) |
113 | { | 113 | { |
114 | // do stuff | 114 | // do stuff |
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | } | 118 | } |
119 | } | 119 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 440392a..071a1bb 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
47 | { | 47 | { |
48 | public delegate bool PacketMethod(IClientAPI simClient, Packet packet); | 48 | public delegate bool PacketMethod(IClientAPI simClient, Packet packet); |
49 | 49 | ||
50 | public class PacketDupeLimiter | 50 | public class PacketDupeLimiter |
51 | { | 51 | { |
52 | public PacketType pktype; | 52 | public PacketType pktype; |
53 | public int timeIn; | 53 | public int timeIn; |
@@ -658,7 +658,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
658 | { | 658 | { |
659 | // this will normally trigger at least one packet (ping response) | 659 | // this will normally trigger at least one packet (ping response) |
660 | SendStartPingCheck(0); | 660 | SendStartPingCheck(0); |
661 | |||
662 | } | 661 | } |
663 | } | 662 | } |
664 | else | 663 | else |
@@ -666,7 +665,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
666 | // Something received in the meantime - we can reset the counters | 665 | // Something received in the meantime - we can reset the counters |
667 | m_probesWithNoIngressPackets = 0; | 666 | m_probesWithNoIngressPackets = 0; |
668 | m_lastPacketsReceived = m_packetsReceived; | 667 | m_lastPacketsReceived = m_packetsReceived; |
669 | |||
670 | } | 668 | } |
671 | //SendPacketStats(); | 669 | //SendPacketStats(); |
672 | } | 670 | } |
@@ -726,7 +724,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
726 | // Previously ClientView.API partial class | 724 | // Previously ClientView.API partial class |
727 | public event Action<IClientAPI> OnLogout; | 725 | public event Action<IClientAPI> OnLogout; |
728 | public event ObjectPermissions OnObjectPermissions; | 726 | public event ObjectPermissions OnObjectPermissions; |
729 | |||
730 | public event Action<IClientAPI> OnConnectionClosed; | 727 | public event Action<IClientAPI> OnConnectionClosed; |
731 | public event ViewerEffectEventHandler OnViewerEffect; | 728 | public event ViewerEffectEventHandler OnViewerEffect; |
732 | public event ImprovedInstantMessage OnInstantMessage; | 729 | public event ImprovedInstantMessage OnInstantMessage; |
@@ -788,12 +785,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
788 | public event DisconnectUser OnDisconnectUser; | 785 | public event DisconnectUser OnDisconnectUser; |
789 | public event RequestAvatarProperties OnRequestAvatarProperties; | 786 | public event RequestAvatarProperties OnRequestAvatarProperties; |
790 | public event SetAlwaysRun OnSetAlwaysRun; | 787 | public event SetAlwaysRun OnSetAlwaysRun; |
791 | |||
792 | public event FetchInventory OnAgentDataUpdateRequest; | 788 | public event FetchInventory OnAgentDataUpdateRequest; |
793 | public event FetchInventory OnUserInfoRequest; | 789 | public event FetchInventory OnUserInfoRequest; |
794 | public event TeleportLocationRequest OnSetStartLocationRequest; | 790 | public event TeleportLocationRequest OnSetStartLocationRequest; |
795 | public event UpdateAvatarProperties OnUpdateAvatarProperties; | 791 | public event UpdateAvatarProperties OnUpdateAvatarProperties; |
796 | |||
797 | public event CreateNewInventoryItem OnCreateNewInventoryItem; | 792 | public event CreateNewInventoryItem OnCreateNewInventoryItem; |
798 | public event CreateInventoryFolder OnCreateNewInventoryFolder; | 793 | public event CreateInventoryFolder OnCreateNewInventoryFolder; |
799 | public event UpdateInventoryFolder OnUpdateInventoryFolder; | 794 | public event UpdateInventoryFolder OnUpdateInventoryFolder; |
@@ -816,9 +811,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
816 | public event MoveTaskInventory OnMoveTaskItem; | 811 | public event MoveTaskInventory OnMoveTaskItem; |
817 | public event RemoveTaskInventory OnRemoveTaskItem; | 812 | public event RemoveTaskInventory OnRemoveTaskItem; |
818 | public event RequestAsset OnRequestAsset; | 813 | public event RequestAsset OnRequestAsset; |
819 | |||
820 | public event UUIDNameRequest OnNameFromUUIDRequest; | 814 | public event UUIDNameRequest OnNameFromUUIDRequest; |
821 | |||
822 | public event ParcelAccessListRequest OnParcelAccessListRequest; | 815 | public event ParcelAccessListRequest OnParcelAccessListRequest; |
823 | public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; | 816 | public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; |
824 | public event ParcelPropertiesRequest OnParcelPropertiesRequest; | 817 | public event ParcelPropertiesRequest OnParcelPropertiesRequest; |
@@ -829,36 +822,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
829 | public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; | 822 | public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; |
830 | public event ParcelAbandonRequest OnParcelAbandonRequest; | 823 | public event ParcelAbandonRequest OnParcelAbandonRequest; |
831 | public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; | 824 | public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; |
832 | |||
833 | public event RegionInfoRequest OnRegionInfoRequest; | 825 | public event RegionInfoRequest OnRegionInfoRequest; |
834 | public event EstateCovenantRequest OnEstateCovenantRequest; | 826 | public event EstateCovenantRequest OnEstateCovenantRequest; |
835 | |||
836 | public event FriendActionDelegate OnApproveFriendRequest; | 827 | public event FriendActionDelegate OnApproveFriendRequest; |
837 | public event FriendActionDelegate OnDenyFriendRequest; | 828 | public event FriendActionDelegate OnDenyFriendRequest; |
838 | public event FriendshipTermination OnTerminateFriendship; | 829 | public event FriendshipTermination OnTerminateFriendship; |
839 | |||
840 | public event PacketStats OnPacketStats; | 830 | public event PacketStats OnPacketStats; |
841 | |||
842 | public event MoneyTransferRequest OnMoneyTransferRequest; | 831 | public event MoneyTransferRequest OnMoneyTransferRequest; |
843 | public event EconomyDataRequest OnEconomyDataRequest; | 832 | public event EconomyDataRequest OnEconomyDataRequest; |
844 | |||
845 | public event MoneyBalanceRequest OnMoneyBalanceRequest; | 833 | public event MoneyBalanceRequest OnMoneyBalanceRequest; |
846 | public event ParcelBuy OnParcelBuy; | 834 | public event ParcelBuy OnParcelBuy; |
847 | |||
848 | public event UUIDNameRequest OnTeleportHomeRequest; | 835 | public event UUIDNameRequest OnTeleportHomeRequest; |
849 | |||
850 | public event UUIDNameRequest OnUUIDGroupNameRequest; | 836 | public event UUIDNameRequest OnUUIDGroupNameRequest; |
851 | |||
852 | public event ScriptAnswer OnScriptAnswer; | 837 | public event ScriptAnswer OnScriptAnswer; |
853 | public event RequestPayPrice OnRequestPayPrice; | 838 | public event RequestPayPrice OnRequestPayPrice; |
854 | public event AgentSit OnUndo; | 839 | public event AgentSit OnUndo; |
855 | |||
856 | public event ForceReleaseControls OnForceReleaseControls; | 840 | public event ForceReleaseControls OnForceReleaseControls; |
857 | |||
858 | public event GodLandStatRequest OnLandStatRequest; | 841 | public event GodLandStatRequest OnLandStatRequest; |
859 | |||
860 | public event RequestObjectPropertiesFamily OnObjectGroupRequest; | 842 | public event RequestObjectPropertiesFamily OnObjectGroupRequest; |
861 | |||
862 | public event DetailedEstateDataRequest OnDetailedEstateDataRequest; | 843 | public event DetailedEstateDataRequest OnDetailedEstateDataRequest; |
863 | public event SetEstateFlagsRequest OnSetEstateFlagsRequest; | 844 | public event SetEstateFlagsRequest OnSetEstateFlagsRequest; |
864 | public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; | 845 | public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; |
@@ -1049,7 +1030,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1049 | //} | 1030 | //} |
1050 | } | 1031 | } |
1051 | 1032 | ||
1052 | |||
1053 | private void DoSendLayerData(object o) | 1033 | private void DoSendLayerData(object o) |
1054 | { | 1034 | { |
1055 | float[] map = (float[])o; | 1035 | float[] map = (float[])o; |
@@ -1083,7 +1063,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1083 | OutPacket(layerpack, ThrottleOutPacketType.Land); | 1063 | OutPacket(layerpack, ThrottleOutPacketType.Land); |
1084 | } | 1064 | } |
1085 | 1065 | ||
1086 | |||
1087 | /// <summary> | 1066 | /// <summary> |
1088 | /// Sends a specified patch to a client | 1067 | /// Sends a specified patch to a client |
1089 | /// </summary> | 1068 | /// </summary> |
@@ -1449,7 +1428,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1449 | 1428 | ||
1450 | if (i < MAX_ITEMS_PER_PACKET) | 1429 | if (i < MAX_ITEMS_PER_PACKET) |
1451 | { | 1430 | { |
1452 | |||
1453 | OutPacket(descend, ThrottleOutPacketType.Asset); | 1431 | OutPacket(descend, ThrottleOutPacketType.Asset); |
1454 | } | 1432 | } |
1455 | } | 1433 | } |
@@ -1748,7 +1726,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1748 | economyData.Info.TeleportPriceExponent = TeleportPriceExponent; | 1726 | economyData.Info.TeleportPriceExponent = TeleportPriceExponent; |
1749 | economyData.Header.Reliable = true; | 1727 | economyData.Header.Reliable = true; |
1750 | OutPacket(economyData, ThrottleOutPacketType.Unknown); | 1728 | OutPacket(economyData, ThrottleOutPacketType.Unknown); |
1751 | |||
1752 | } | 1729 | } |
1753 | 1730 | ||
1754 | public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) | 1731 | public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) |
@@ -2209,7 +2186,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2209 | 2186 | ||
2210 | ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); | 2187 | ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); |
2211 | 2188 | ||
2212 | 2189 | ||
2213 | 2190 | ||
2214 | // TODO: don't create new blocks if recycling an old packet | 2191 | // TODO: don't create new blocks if recycling an old packet |
2215 | outPacket.RegionData.RegionHandle = regionHandle; | 2192 | outPacket.RegionData.RegionHandle = regionHandle; |
@@ -2256,8 +2233,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2256 | outPacket.ObjectData[0].OwnerID = ownerID; | 2233 | outPacket.ObjectData[0].OwnerID = ownerID; |
2257 | outPacket.ObjectData[0].Gain = (float) SoundGain; | 2234 | outPacket.ObjectData[0].Gain = (float) SoundGain; |
2258 | outPacket.ObjectData[0].Radius = (float) SoundRadius; | 2235 | outPacket.ObjectData[0].Radius = (float) SoundRadius; |
2259 | outPacket.ObjectData[0].Flags = SoundFlags; | 2236 | outPacket.ObjectData[0].Flags = SoundFlags; |
2260 | |||
2261 | 2237 | ||
2262 | byte[] pb = pos.GetBytes(); | 2238 | byte[] pb = pos.GetBytes(); |
2263 | Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); | 2239 | Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); |
@@ -2318,6 +2294,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2318 | terse.Header.Zerocoded = true; | 2294 | terse.Header.Zerocoded = true; |
2319 | OutPacket(terse, ThrottleOutPacketType.Task); | 2295 | OutPacket(terse, ThrottleOutPacketType.Task); |
2320 | } | 2296 | } |
2297 | |||
2321 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) | 2298 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) |
2322 | { | 2299 | { |
2323 | AssetUploadCompletePacket newPack = new AssetUploadCompletePacket(); | 2300 | AssetUploadCompletePacket newPack = new AssetUploadCompletePacket(); |
@@ -2327,6 +2304,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2327 | newPack.Header.Zerocoded = true; | 2304 | newPack.Header.Zerocoded = true; |
2328 | OutPacket(newPack, ThrottleOutPacketType.Asset); | 2305 | OutPacket(newPack, ThrottleOutPacketType.Asset); |
2329 | } | 2306 | } |
2307 | |||
2330 | public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) | 2308 | public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) |
2331 | { | 2309 | { |
2332 | RequestXferPacket newPack = new RequestXferPacket(); | 2310 | RequestXferPacket newPack = new RequestXferPacket(); |
@@ -2337,8 +2315,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2337 | newPack.XferID.Filename = FileName; | 2315 | newPack.XferID.Filename = FileName; |
2338 | newPack.Header.Zerocoded = true; | 2316 | newPack.Header.Zerocoded = true; |
2339 | OutPacket(newPack, ThrottleOutPacketType.Asset); | 2317 | OutPacket(newPack, ThrottleOutPacketType.Asset); |
2340 | |||
2341 | } | 2318 | } |
2319 | |||
2342 | public void SendConfirmXfer(ulong xferID, uint PacketID) | 2320 | public void SendConfirmXfer(ulong xferID, uint PacketID) |
2343 | { | 2321 | { |
2344 | ConfirmXferPacketPacket newPack = new ConfirmXferPacketPacket(); | 2322 | ConfirmXferPacketPacket newPack = new ConfirmXferPacketPacket(); |
@@ -2347,6 +2325,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2347 | newPack.Header.Zerocoded = true; | 2325 | newPack.Header.Zerocoded = true; |
2348 | OutPacket(newPack, ThrottleOutPacketType.Asset); | 2326 | OutPacket(newPack, ThrottleOutPacketType.Asset); |
2349 | } | 2327 | } |
2328 | |||
2350 | public void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) | 2329 | public void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) |
2351 | { | 2330 | { |
2352 | ImageDataPacket im = new ImageDataPacket(); | 2331 | ImageDataPacket im = new ImageDataPacket(); |
@@ -2362,6 +2341,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2362 | im.Header.Zerocoded = true; | 2341 | im.Header.Zerocoded = true; |
2363 | OutPacket(im, ThrottleOutPacketType.Texture); | 2342 | OutPacket(im, ThrottleOutPacketType.Texture); |
2364 | } | 2343 | } |
2344 | |||
2365 | public void SendShutdownConnectionNotice() | 2345 | public void SendShutdownConnectionNotice() |
2366 | { | 2346 | { |
2367 | OutPacket(PacketPool.Instance.GetPacket(PacketType.DisableSimulator), ThrottleOutPacketType.Unknown); | 2347 | OutPacket(PacketPool.Instance.GetPacket(PacketType.DisableSimulator), ThrottleOutPacketType.Unknown); |
@@ -2449,125 +2429,126 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2449 | #endregion | 2429 | #endregion |
2450 | 2430 | ||
2451 | #region Estate Data Sending Methods | 2431 | #region Estate Data Sending Methods |
2452 | private bool convertParamStringToBool(byte[] field) | ||
2453 | { | ||
2454 | string s = Helpers.FieldToUTF8String(field); | ||
2455 | if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true") | ||
2456 | { | ||
2457 | return true; | ||
2458 | } | ||
2459 | return false; | ||
2460 | } | ||
2461 | 2432 | ||
2462 | public void sendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) | 2433 | private bool convertParamStringToBool(byte[] field) |
2434 | { | ||
2435 | string s = Helpers.FieldToUTF8String(field); | ||
2436 | if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true") | ||
2463 | { | 2437 | { |
2464 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | 2438 | return true; |
2465 | packet.AgentData.TransactionID = LLUUID.Random(); | 2439 | } |
2466 | packet.AgentData.AgentID = this.AgentId; | 2440 | return false; |
2467 | packet.AgentData.SessionID = this.SessionId; | 2441 | } |
2468 | packet.MethodData.Invoice = invoice; | ||
2469 | packet.MethodData.Method = Helpers.StringToField("setaccess"); | ||
2470 | 2442 | ||
2471 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; | 2443 | public void sendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) |
2444 | { | ||
2445 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | ||
2446 | packet.AgentData.TransactionID = LLUUID.Random(); | ||
2447 | packet.AgentData.AgentID = this.AgentId; | ||
2448 | packet.AgentData.SessionID = this.SessionId; | ||
2449 | packet.MethodData.Invoice = invoice; | ||
2450 | packet.MethodData.Method = Helpers.StringToField("setaccess"); | ||
2472 | 2451 | ||
2473 | for (int i = 0; i < (6 + EstateManagers.Length); i++) | 2452 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; |
2474 | { | ||
2475 | returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); | ||
2476 | } | ||
2477 | int j = 0; | ||
2478 | |||
2479 | returnblock[j].Parameter = Helpers.StringToField(estateID.ToString()); j++; | ||
2480 | returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++; | ||
2481 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | ||
2482 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | ||
2483 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | ||
2484 | returnblock[j].Parameter = Helpers.StringToField(EstateManagers.Length.ToString()); j++; | ||
2485 | for (int i = 0; i < EstateManagers.Length; i++) | ||
2486 | { | ||
2487 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; | ||
2488 | } | ||
2489 | packet.ParamList = returnblock; | ||
2490 | packet.Header.Reliable = false; | ||
2491 | this.OutPacket(packet, ThrottleOutPacketType.Task); | ||
2492 | } | ||
2493 | 2453 | ||
2494 | public void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) | 2454 | for (int i = 0; i < (6 + EstateManagers.Length); i++) |
2495 | { | 2455 | { |
2496 | RegionInfoPacket rinfopack = new RegionInfoPacket(); | 2456 | returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); |
2497 | RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock(); | ||
2498 | rinfopack.AgentData.AgentID = this.AgentId; | ||
2499 | rinfopack.AgentData.SessionID = this.SessionId; | ||
2500 | rinfoblk.BillableFactor =args.billableFactor; | ||
2501 | rinfoblk.EstateID = args.estateID; | ||
2502 | rinfoblk.MaxAgents = args.maxAgents; | ||
2503 | rinfoblk.ObjectBonusFactor =args.objectBonusFactor; | ||
2504 | rinfoblk.ParentEstateID = args.parentEstateID; | ||
2505 | rinfoblk.PricePerMeter = args.pricePerMeter; | ||
2506 | rinfoblk.RedirectGridX = args.redirectGridX; | ||
2507 | rinfoblk.RedirectGridY = args.redirectGridY; | ||
2508 | rinfoblk.RegionFlags = args.regionFlags; | ||
2509 | rinfoblk.SimAccess = args.simAccess; | ||
2510 | rinfoblk.SunHour = args.sunHour; | ||
2511 | rinfoblk.TerrainLowerLimit = args.terrainLowerLimit; | ||
2512 | rinfoblk.TerrainRaiseLimit = args.terrainRaiseLimit; | ||
2513 | rinfoblk.UseEstateSun = args.useEstateSun; | ||
2514 | rinfoblk.WaterHeight = args.waterHeight; | ||
2515 | rinfoblk.SimName = Helpers.StringToField(args.simName); | ||
2516 | |||
2517 | |||
2518 | rinfopack.RegionInfo = rinfoblk; | ||
2519 | |||
2520 | this.OutPacket(rinfopack, ThrottleOutPacketType.Task); | ||
2521 | } | 2457 | } |
2522 | 2458 | int j = 0; | |
2523 | public void sendEstateCovenantInformation() | 2459 | |
2460 | returnblock[j].Parameter = Helpers.StringToField(estateID.ToString()); j++; | ||
2461 | returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++; | ||
2462 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | ||
2463 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | ||
2464 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | ||
2465 | returnblock[j].Parameter = Helpers.StringToField(EstateManagers.Length.ToString()); j++; | ||
2466 | for (int i = 0; i < EstateManagers.Length; i++) | ||
2524 | { | 2467 | { |
2525 | EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); | 2468 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; |
2526 | EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); | ||
2527 | edata.CovenantID = m_scene.RegionInfo.CovenantID; | ||
2528 | edata.CovenantTimestamp = 0; | ||
2529 | edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
2530 | edata.EstateName = | ||
2531 | Helpers.StringToField(m_scene.RegionInfo.MasterAvatarFirstName + " " + m_scene.RegionInfo.MasterAvatarLastName); | ||
2532 | einfopack.Data = edata; | ||
2533 | this.OutPacket(einfopack, ThrottleOutPacketType.Task); | ||
2534 | } | 2469 | } |
2470 | packet.ParamList = returnblock; | ||
2471 | packet.Header.Reliable = false; | ||
2472 | this.OutPacket(packet, ThrottleOutPacketType.Task); | ||
2473 | } | ||
2535 | 2474 | ||
2536 | public void sendDetailedEstateData(LLUUID invoice, string estateName, uint estateID) | 2475 | public void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) |
2476 | { | ||
2477 | RegionInfoPacket rinfopack = new RegionInfoPacket(); | ||
2478 | RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock(); | ||
2479 | rinfopack.AgentData.AgentID = this.AgentId; | ||
2480 | rinfopack.AgentData.SessionID = this.SessionId; | ||
2481 | rinfoblk.BillableFactor =args.billableFactor; | ||
2482 | rinfoblk.EstateID = args.estateID; | ||
2483 | rinfoblk.MaxAgents = args.maxAgents; | ||
2484 | rinfoblk.ObjectBonusFactor =args.objectBonusFactor; | ||
2485 | rinfoblk.ParentEstateID = args.parentEstateID; | ||
2486 | rinfoblk.PricePerMeter = args.pricePerMeter; | ||
2487 | rinfoblk.RedirectGridX = args.redirectGridX; | ||
2488 | rinfoblk.RedirectGridY = args.redirectGridY; | ||
2489 | rinfoblk.RegionFlags = args.regionFlags; | ||
2490 | rinfoblk.SimAccess = args.simAccess; | ||
2491 | rinfoblk.SunHour = args.sunHour; | ||
2492 | rinfoblk.TerrainLowerLimit = args.terrainLowerLimit; | ||
2493 | rinfoblk.TerrainRaiseLimit = args.terrainRaiseLimit; | ||
2494 | rinfoblk.UseEstateSun = args.useEstateSun; | ||
2495 | rinfoblk.WaterHeight = args.waterHeight; | ||
2496 | rinfoblk.SimName = Helpers.StringToField(args.simName); | ||
2497 | |||
2498 | rinfopack.RegionInfo = rinfoblk; | ||
2499 | |||
2500 | this.OutPacket(rinfopack, ThrottleOutPacketType.Task); | ||
2501 | } | ||
2502 | |||
2503 | public void sendEstateCovenantInformation() | ||
2504 | { | ||
2505 | EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); | ||
2506 | EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); | ||
2507 | edata.CovenantID = m_scene.RegionInfo.CovenantID; | ||
2508 | edata.CovenantTimestamp = 0; | ||
2509 | edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
2510 | edata.EstateName = | ||
2511 | Helpers.StringToField(m_scene.RegionInfo.MasterAvatarFirstName + " " + m_scene.RegionInfo.MasterAvatarLastName); | ||
2512 | einfopack.Data = edata; | ||
2513 | this.OutPacket(einfopack, ThrottleOutPacketType.Task); | ||
2514 | } | ||
2515 | |||
2516 | public void sendDetailedEstateData(LLUUID invoice, string estateName, uint estateID) | ||
2517 | { | ||
2518 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | ||
2519 | packet.MethodData.Invoice = invoice; | ||
2520 | packet.AgentData.TransactionID = LLUUID.Random(); | ||
2521 | packet.MethodData.Method = Helpers.StringToField("estateupdateinfo"); | ||
2522 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[9]; | ||
2523 | |||
2524 | for (int i = 0; i < 9; i++) | ||
2537 | { | 2525 | { |
2538 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | 2526 | returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); |
2539 | packet.MethodData.Invoice = invoice; | ||
2540 | packet.AgentData.TransactionID = LLUUID.Random(); | ||
2541 | packet.MethodData.Method = Helpers.StringToField("estateupdateinfo"); | ||
2542 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[9]; | ||
2543 | |||
2544 | for (int i = 0; i < 9; i++) | ||
2545 | { | ||
2546 | returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); | ||
2547 | } | ||
2548 | |||
2549 | //Sending Estate Settings | ||
2550 | returnblock[0].Parameter = Helpers.StringToField(estateName); | ||
2551 | returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); | ||
2552 | returnblock[2].Parameter = Helpers.StringToField(estateID.ToString()); | ||
2553 | |||
2554 | // TODO: Resolve Magic numbers here | ||
2555 | returnblock[3].Parameter = Helpers.StringToField("269516800"); | ||
2556 | returnblock[4].Parameter = Helpers.StringToField("0"); | ||
2557 | returnblock[5].Parameter = Helpers.StringToField("1"); | ||
2558 | returnblock[6].Parameter = Helpers.StringToField(m_scene.RegionInfo.RegionID.ToString()); | ||
2559 | returnblock[7].Parameter = Helpers.StringToField("1160895077"); | ||
2560 | returnblock[8].Parameter = Helpers.StringToField("1"); | ||
2561 | |||
2562 | packet.ParamList = returnblock; | ||
2563 | packet.Header.Reliable = false; | ||
2564 | //System.Console.WriteLine("[ESTATE]: SIM--->" + packet.ToString()); | ||
2565 | this.OutPacket(packet, ThrottleOutPacketType.Task); | ||
2566 | } | 2527 | } |
2567 | 2528 | ||
2529 | //Sending Estate Settings | ||
2530 | returnblock[0].Parameter = Helpers.StringToField(estateName); | ||
2531 | returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); | ||
2532 | returnblock[2].Parameter = Helpers.StringToField(estateID.ToString()); | ||
2533 | |||
2534 | // TODO: Resolve Magic numbers here | ||
2535 | returnblock[3].Parameter = Helpers.StringToField("269516800"); | ||
2536 | returnblock[4].Parameter = Helpers.StringToField("0"); | ||
2537 | returnblock[5].Parameter = Helpers.StringToField("1"); | ||
2538 | returnblock[6].Parameter = Helpers.StringToField(m_scene.RegionInfo.RegionID.ToString()); | ||
2539 | returnblock[7].Parameter = Helpers.StringToField("1160895077"); | ||
2540 | returnblock[8].Parameter = Helpers.StringToField("1"); | ||
2541 | |||
2542 | packet.ParamList = returnblock; | ||
2543 | packet.Header.Reliable = false; | ||
2544 | //System.Console.WriteLine("[ESTATE]: SIM--->" + packet.ToString()); | ||
2545 | this.OutPacket(packet, ThrottleOutPacketType.Task); | ||
2546 | } | ||
2547 | |||
2568 | #endregion | 2548 | #endregion |
2569 | 2549 | ||
2570 | #region Land Data Sending Methods | 2550 | #region Land Data Sending Methods |
2551 | |||
2571 | public void sendLandParcelOverlay(byte[] data, int sequence_id) | 2552 | public void sendLandParcelOverlay(byte[] data, int sequence_id) |
2572 | { | 2553 | { |
2573 | 2554 | ||
@@ -2578,6 +2559,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2578 | packet.Header.Zerocoded = true; | 2559 | packet.Header.Zerocoded = true; |
2579 | this.OutPacket(packet, ThrottleOutPacketType.Task); | 2560 | this.OutPacket(packet, ThrottleOutPacketType.Task); |
2580 | } | 2561 | } |
2562 | |||
2581 | public void sendLandProperties(IClientAPI remote_client,int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity, uint regionFlags) | 2563 | public void sendLandProperties(IClientAPI remote_client,int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity, uint regionFlags) |
2582 | { | 2564 | { |
2583 | ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ParcelProperties); | 2565 | ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ParcelProperties); |
@@ -2743,8 +2725,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2743 | notifyCount = 32; | 2725 | notifyCount = 32; |
2744 | } | 2726 | } |
2745 | 2727 | ||
2746 | |||
2747 | |||
2748 | ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock | 2728 | ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock |
2749 | = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount]; | 2729 | = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount]; |
2750 | 2730 | ||
@@ -2773,9 +2753,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2773 | 2753 | ||
2774 | #endregion | 2754 | #endregion |
2775 | 2755 | ||
2776 | #region Helper Methods | 2756 | #region Helper Methods |
2777 | 2757 | ||
2778 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, LLVector3 pos, | 2758 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, LLVector3 pos, |
2779 | LLVector3 velocity, | 2759 | LLVector3 velocity, |
2780 | LLQuaternion rotation) | 2760 | LLQuaternion rotation) |
2781 | { | 2761 | { |
@@ -2958,7 +2938,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2958 | bytes[i++] = (byte)((rvelz >> 8) % 256); | 2938 | bytes[i++] = (byte)((rvelz >> 8) % 256); |
2959 | dat.Data = bytes; | 2939 | dat.Data = bytes; |
2960 | 2940 | ||
2961 | |||
2962 | return dat; | 2941 | return dat; |
2963 | } | 2942 | } |
2964 | 2943 | ||
@@ -3034,7 +3013,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3034 | objdata.ObjectData[47] = 63; | 3013 | objdata.ObjectData[47] = 63; |
3035 | } | 3014 | } |
3036 | 3015 | ||
3037 | |||
3038 | /// <summary> | 3016 | /// <summary> |
3039 | /// | 3017 | /// |
3040 | /// </summary> | 3018 | /// </summary> |
@@ -3165,13 +3143,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3165 | false); | 3143 | false); |
3166 | } | 3144 | } |
3167 | return true; | 3145 | return true; |
3168 | |||
3169 | } | 3146 | } |
3170 | else | 3147 | else |
3171 | { | 3148 | { |
3172 | return false; | 3149 | return false; |
3173 | } | 3150 | } |
3174 | |||
3175 | } | 3151 | } |
3176 | 3152 | ||
3177 | private bool HandleUUIDGroupNameRequest(IClientAPI sender, Packet Pack) | 3153 | private bool HandleUUIDGroupNameRequest(IClientAPI sender, Packet Pack) |
@@ -3205,8 +3181,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3205 | return true; | 3181 | return true; |
3206 | } | 3182 | } |
3207 | 3183 | ||
3208 | |||
3209 | |||
3210 | private bool HandleViewerEffect(IClientAPI sender, Packet Pack) | 3184 | private bool HandleViewerEffect(IClientAPI sender, Packet Pack) |
3211 | { | 3185 | { |
3212 | ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; | 3186 | ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; |
@@ -3346,7 +3320,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3346 | handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; | 3320 | handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; |
3347 | if (handlerUpdatePrimSinglePosition != null) | 3321 | if (handlerUpdatePrimSinglePosition != null) |
3348 | { | 3322 | { |
3349 | |||
3350 | // Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); | 3323 | // Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
3351 | handlerUpdatePrimSinglePosition(localId, pos1, this); | 3324 | handlerUpdatePrimSinglePosition(localId, pos1, this); |
3352 | } | 3325 | } |
@@ -3357,7 +3330,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3357 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; | 3330 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; |
3358 | if (handlerUpdatePrimSingleRotation != null) | 3331 | if (handlerUpdatePrimSingleRotation != null) |
3359 | { | 3332 | { |
3360 | |||
3361 | //Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 3333 | //Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
3362 | handlerUpdatePrimSingleRotation(localId, rot1, this); | 3334 | handlerUpdatePrimSingleRotation(localId, rot1, this); |
3363 | } | 3335 | } |
@@ -3368,7 +3340,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3368 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; | 3340 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; |
3369 | if (handlerUpdatePrimSingleRotation != null) | 3341 | if (handlerUpdatePrimSingleRotation != null) |
3370 | { | 3342 | { |
3371 | |||
3372 | //Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 3343 | //Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
3373 | handlerUpdatePrimSingleRotation(localId, rot2, this); | 3344 | handlerUpdatePrimSingleRotation(localId, rot2, this); |
3374 | } | 3345 | } |
@@ -3381,11 +3352,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3381 | handlerUpdatePrimScale = OnUpdatePrimScale; | 3352 | handlerUpdatePrimScale = OnUpdatePrimScale; |
3382 | if (handlerUpdatePrimScale != null) | 3353 | if (handlerUpdatePrimScale != null) |
3383 | { | 3354 | { |
3384 | |||
3385 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 3355 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
3386 | handlerUpdatePrimScale(localId, scale1, this); | 3356 | handlerUpdatePrimScale(localId, scale1, this); |
3387 | 3357 | ||
3388 | |||
3389 | handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; | 3358 | handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; |
3390 | if (handlerUpdatePrimSinglePosition != null) | 3359 | if (handlerUpdatePrimSinglePosition != null) |
3391 | { | 3360 | { |
@@ -3405,40 +3374,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3405 | } | 3374 | } |
3406 | break; | 3375 | break; |
3407 | case 10: | 3376 | case 10: |
3408 | |||
3409 | LLQuaternion rot3 = new LLQuaternion(block.Data, 0, true); | 3377 | LLQuaternion rot3 = new LLQuaternion(block.Data, 0, true); |
3410 | 3378 | ||
3411 | handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; | 3379 | handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; |
3412 | if (handlerUpdatePrimRotation != null) | 3380 | if (handlerUpdatePrimRotation != null) |
3413 | { | 3381 | { |
3414 | |||
3415 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 3382 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
3416 | handlerUpdatePrimRotation(localId, rot3, this); | 3383 | handlerUpdatePrimRotation(localId, rot3, this); |
3417 | } | 3384 | } |
3418 | break; | 3385 | break; |
3419 | case 11: | 3386 | case 11: |
3420 | |||
3421 | LLVector3 pos3 = new LLVector3(block.Data, 0); | 3387 | LLVector3 pos3 = new LLVector3(block.Data, 0); |
3422 | LLQuaternion rot4 = new LLQuaternion(block.Data, 12, true); | 3388 | LLQuaternion rot4 = new LLQuaternion(block.Data, 12, true); |
3423 | 3389 | ||
3424 | handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; | 3390 | handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; |
3425 | if (handlerUpdatePrimGroupRotation != null) | 3391 | if (handlerUpdatePrimGroupRotation != null) |
3426 | { | 3392 | { |
3427 | |||
3428 | //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); | 3393 | //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
3429 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 3394 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
3430 | handlerUpdatePrimGroupRotation(localId, pos3, rot4, this); | 3395 | handlerUpdatePrimGroupRotation(localId, pos3, rot4, this); |
3431 | } | 3396 | } |
3432 | break; | 3397 | break; |
3433 | case 13: | 3398 | case 13: |
3434 | |||
3435 | LLVector3 scale2 = new LLVector3(block.Data, 12); | 3399 | LLVector3 scale2 = new LLVector3(block.Data, 12); |
3436 | LLVector3 pos4 = new LLVector3(block.Data, 0); | 3400 | LLVector3 pos4 = new LLVector3(block.Data, 0); |
3437 | 3401 | ||
3438 | handlerUpdatePrimScale = OnUpdatePrimScale; | 3402 | handlerUpdatePrimScale = OnUpdatePrimScale; |
3439 | if (handlerUpdatePrimScale != null) | 3403 | if (handlerUpdatePrimScale != null) |
3440 | { | 3404 | { |
3441 | |||
3442 | //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 3405 | //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
3443 | handlerUpdatePrimScale(localId, scale2, this); | 3406 | handlerUpdatePrimScale(localId, scale2, this); |
3444 | 3407 | ||
@@ -3464,7 +3427,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3464 | 3427 | ||
3465 | if (handlerUpdateVector != null) | 3428 | if (handlerUpdateVector != null) |
3466 | { | 3429 | { |
3467 | |||
3468 | handlerUpdateVector(localId, pos5, this); | 3430 | handlerUpdateVector(localId, pos5, this); |
3469 | } | 3431 | } |
3470 | } | 3432 | } |
@@ -3841,11 +3803,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3841 | 3803 | ||
3842 | protected void AckTimer_Elapsed(object sender, ElapsedEventArgs ea) | 3804 | protected void AckTimer_Elapsed(object sender, ElapsedEventArgs ea) |
3843 | { | 3805 | { |
3844 | |||
3845 | SendAcks(); | 3806 | SendAcks(); |
3846 | ResendUnacked(); | 3807 | ResendUnacked(); |
3847 | SendPacketStats(); | 3808 | SendPacketStats(); |
3848 | |||
3849 | } | 3809 | } |
3850 | 3810 | ||
3851 | protected void SendPacketStats() | 3811 | protected void SendPacketStats() |
@@ -3858,6 +3818,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3858 | m_lastPacketsSentSentToScene = m_packetsSent; | 3818 | m_lastPacketsSentSentToScene = m_packetsSent; |
3859 | } | 3819 | } |
3860 | } | 3820 | } |
3821 | |||
3861 | protected void ClearOldPacketDupeTracking() | 3822 | protected void ClearOldPacketDupeTracking() |
3862 | { | 3823 | { |
3863 | lock (m_dupeLimiter) | 3824 | lock (m_dupeLimiter) |
@@ -3865,7 +3826,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3865 | List<uint> toEliminate = new List<uint>(); | 3826 | List<uint> toEliminate = new List<uint>(); |
3866 | try | 3827 | try |
3867 | { | 3828 | { |
3868 | |||
3869 | foreach (uint seq in m_dupeLimiter.Keys) | 3829 | foreach (uint seq in m_dupeLimiter.Keys) |
3870 | { | 3830 | { |
3871 | PacketDupeLimiter pkdata = null; | 3831 | PacketDupeLimiter pkdata = null; |
@@ -3913,7 +3873,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3913 | 3873 | ||
3914 | private bool m_packetProcessingEnabled = true; | 3874 | private bool m_packetProcessingEnabled = true; |
3915 | 3875 | ||
3916 | public bool IsActive { | 3876 | public bool IsActive |
3877 | { | ||
3917 | get { return m_packetProcessingEnabled; } | 3878 | get { return m_packetProcessingEnabled; } |
3918 | set { m_packetProcessingEnabled = value; } | 3879 | set { m_packetProcessingEnabled = value; } |
3919 | } | 3880 | } |
@@ -3945,10 +3906,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3945 | } | 3906 | } |
3946 | else | 3907 | else |
3947 | { | 3908 | { |
3948 | |||
3949 | switch (Pack.Type) | 3909 | switch (Pack.Type) |
3950 | { | 3910 | { |
3951 | #region Scene/Avatar | 3911 | #region Scene/Avatar |
3952 | 3912 | ||
3953 | case PacketType.AvatarPropertiesRequest: | 3913 | case PacketType.AvatarPropertiesRequest: |
3954 | AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; | 3914 | AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; |
@@ -4425,9 +4385,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4425 | } | 4385 | } |
4426 | break; | 4386 | break; |
4427 | 4387 | ||
4428 | #endregion | 4388 | #endregion |
4429 | 4389 | ||
4430 | #region Objects/m_sceneObjects | 4390 | #region Objects/m_sceneObjects |
4431 | 4391 | ||
4432 | case PacketType.ObjectLink: | 4392 | case PacketType.ObjectLink: |
4433 | ObjectLinkPacket link = (ObjectLinkPacket)Pack; | 4393 | ObjectLinkPacket link = (ObjectLinkPacket)Pack; |
@@ -4816,9 +4776,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4816 | } | 4776 | } |
4817 | break; | 4777 | break; |
4818 | 4778 | ||
4819 | #endregion | 4779 | #endregion |
4820 | 4780 | ||
4821 | #region Inventory/Asset/Other related packets | 4781 | #region Inventory/Asset/Other related packets |
4822 | 4782 | ||
4823 | case PacketType.RequestImage: | 4783 | case PacketType.RequestImage: |
4824 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; | 4784 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; |
@@ -5346,8 +5306,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5346 | } | 5306 | } |
5347 | break; | 5307 | break; |
5348 | 5308 | ||
5349 | #endregion | 5309 | #endregion |
5350 | |||
5351 | 5310 | ||
5352 | case PacketType.UUIDNameRequest: | 5311 | case PacketType.UUIDNameRequest: |
5353 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; | 5312 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; |
@@ -5361,7 +5320,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5361 | } | 5320 | } |
5362 | break; | 5321 | break; |
5363 | 5322 | ||
5364 | #region Parcel related packets | 5323 | #region Parcel related packets |
5365 | 5324 | ||
5366 | case PacketType.ParcelAccessListRequest: | 5325 | case PacketType.ParcelAccessListRequest: |
5367 | ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; | 5326 | ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; |
@@ -5518,14 +5477,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5518 | } | 5477 | } |
5519 | break; | 5478 | break; |
5520 | 5479 | ||
5521 | #endregion | 5480 | #endregion |
5522 | 5481 | ||
5523 | #region Estate Packets | 5482 | #region Estate Packets |
5524 | 5483 | ||
5525 | case PacketType.EstateOwnerMessage: | 5484 | case PacketType.EstateOwnerMessage: |
5526 | EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; | 5485 | EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; |
5527 | 5486 | ||
5528 | |||
5529 | switch (Helpers.FieldToUTF8String(messagePacket.MethodData.Method)) | 5487 | switch (Helpers.FieldToUTF8String(messagePacket.MethodData.Method)) |
5530 | { | 5488 | { |
5531 | case "getinfo": | 5489 | case "getinfo": |
@@ -5772,9 +5730,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5772 | } | 5730 | } |
5773 | break; | 5731 | break; |
5774 | 5732 | ||
5775 | #endregion | 5733 | #endregion |
5776 | 5734 | ||
5777 | #region GodPackets | 5735 | #region GodPackets |
5778 | 5736 | ||
5779 | case PacketType.RequestGodlikePowers: | 5737 | case PacketType.RequestGodlikePowers: |
5780 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; | 5738 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; |
@@ -5822,9 +5780,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5822 | //OutPacket(kupack, ThrottleOutPacketType.Task); | 5780 | //OutPacket(kupack, ThrottleOutPacketType.Task); |
5823 | break; | 5781 | break; |
5824 | 5782 | ||
5825 | #endregion | 5783 | #endregion |
5826 | 5784 | ||
5827 | #region Economy/Transaction Packets | 5785 | #region Economy/Transaction Packets |
5828 | 5786 | ||
5829 | case PacketType.MoneyBalanceRequest: | 5787 | case PacketType.MoneyBalanceRequest: |
5830 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; | 5788 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; |
@@ -5856,9 +5814,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5856 | } | 5814 | } |
5857 | break; | 5815 | break; |
5858 | 5816 | ||
5859 | #endregion | 5817 | #endregion |
5860 | 5818 | ||
5861 | #region unimplemented handlers | 5819 | #region unimplemented handlers |
5862 | 5820 | ||
5863 | case PacketType.StartPingCheck: | 5821 | case PacketType.StartPingCheck: |
5864 | // Send the client the ping response back | 5822 | // Send the client the ping response back |
@@ -5935,7 +5893,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5935 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); | 5893 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); |
5936 | break; | 5894 | break; |
5937 | 5895 | ||
5938 | #endregion | 5896 | #endregion |
5939 | } | 5897 | } |
5940 | } | 5898 | } |
5941 | 5899 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index cf0e0e8..309a795 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -398,8 +398,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
398 | public RegionInfo RequestClosestRegion(string regionName) | 398 | public RegionInfo RequestClosestRegion(string regionName) |
399 | { | 399 | { |
400 | foreach (RegionInfo ri in m_remoteRegionInfoCache.Values) | 400 | foreach (RegionInfo ri in m_remoteRegionInfoCache.Values) |
401 | if(ri.RegionName == regionName) | 401 | { |
402 | if (ri.RegionName == regionName) | ||
402 | return ri; | 403 | return ri; |
404 | } | ||
403 | 405 | ||
404 | RegionInfo regionInfo = null; | 406 | RegionInfo regionInfo = null; |
405 | try | 407 | try |
@@ -441,7 +443,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
441 | regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); | 443 | regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); |
442 | regionInfo.RegionName = (string) responseData["region_name"]; | 444 | regionInfo.RegionName = (string) responseData["region_name"]; |
443 | 445 | ||
444 | if(!m_remoteRegionInfoCache.ContainsKey(regionInfo.RegionHandle)) | 446 | if (!m_remoteRegionInfoCache.ContainsKey(regionInfo.RegionHandle)) |
445 | m_remoteRegionInfoCache.Add(regionInfo.RegionHandle, regionInfo); | 447 | m_remoteRegionInfoCache.Add(regionInfo.RegionHandle, regionInfo); |
446 | } | 448 | } |
447 | catch (WebException) | 449 | catch (WebException) |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index 5c739af..c3f8d2b 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -1,66 +1,66 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using OpenSim.Region.Environment.Scenes; | 28 | using OpenSim.Region.Environment.Scenes; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using log4net; | 30 | using log4net; |
31 | 31 | ||
32 | namespace OpenSim.Region.Environment.Modules.World.Archiver | 32 | namespace OpenSim.Region.Environment.Modules.World.Archiver |
33 | { | 33 | { |
34 | /// <summary> | 34 | /// <summary> |
35 | /// Handles an individual archive read request | 35 | /// Handles an individual archive read request |
36 | /// </summary> | 36 | /// </summary> |
37 | public class ArchiveReadRequest | 37 | public class ArchiveReadRequest |
38 | { | 38 | { |
39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
40 | 40 | ||
41 | private Scene m_scene; | 41 | private Scene m_scene; |
42 | private string m_loadPath; | 42 | private string m_loadPath; |
43 | 43 | ||
44 | public ArchiveReadRequest(Scene scene, string loadPath) | 44 | public ArchiveReadRequest(Scene scene, string loadPath) |
45 | { | 45 | { |
46 | m_scene = scene; | 46 | m_scene = scene; |
47 | m_loadPath = loadPath; | 47 | m_loadPath = loadPath; |
48 | 48 | ||
49 | DearchiveRegion(); | 49 | DearchiveRegion(); |
50 | } | 50 | } |
51 | 51 | ||
52 | protected void DearchiveRegion() | 52 | protected void DearchiveRegion() |
53 | { | 53 | { |
54 | TarArchiveReader archive = new TarArchiveReader(m_loadPath); | 54 | TarArchiveReader archive = new TarArchiveReader(m_loadPath); |
55 | 55 | ||
56 | // Just test for now by reading first file | 56 | // Just test for now by reading first file |
57 | string filePath = "ERROR"; | 57 | string filePath = "ERROR"; |
58 | 58 | ||
59 | byte[] data = archive.Read(out filePath); | 59 | byte[] data = archive.Read(out filePath); |
60 | 60 | ||
61 | m_log.DebugFormat("[ARCHIVER]: Successfully read {0} ({1} bytes) from archive {2}", filePath, data.Length, m_loadPath); | 61 | m_log.DebugFormat("[ARCHIVER]: Successfully read {0} ({1} bytes) from archive {2}", filePath, data.Length, m_loadPath); |
62 | 62 | ||
63 | archive.Close(); | 63 | archive.Close(); |
64 | } | 64 | } |
65 | } | 65 | } |
66 | } | 66 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/TarArchiveReader.cs b/OpenSim/Region/Environment/Modules/World/Archiver/TarArchiveReader.cs index e785c6c..80641e3 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/TarArchiveReader.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/TarArchiveReader.cs | |||
@@ -1,108 +1,108 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | //using System.Reflection; | 30 | //using System.Reflection; |
31 | //using log4net; | 31 | //using log4net; |
32 | 32 | ||
33 | namespace OpenSim.Region.Environment.Modules.World.Archiver | 33 | namespace OpenSim.Region.Environment.Modules.World.Archiver |
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// Temporary code to do the bare minimum required to read a tar archive for our purposes | 36 | /// Temporary code to do the bare minimum required to read a tar archive for our purposes |
37 | /// </summary> | 37 | /// </summary> |
38 | public class TarArchiveReader | 38 | public class TarArchiveReader |
39 | { | 39 | { |
40 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 40 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
41 | 41 | ||
42 | protected static System.Text.ASCIIEncoding m_asciiEncoding = new System.Text.ASCIIEncoding(); | 42 | protected static System.Text.ASCIIEncoding m_asciiEncoding = new System.Text.ASCIIEncoding(); |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
45 | /// Binary reader for the underlying stream | 45 | /// Binary reader for the underlying stream |
46 | /// </summary> | 46 | /// </summary> |
47 | protected BinaryReader m_br; | 47 | protected BinaryReader m_br; |
48 | 48 | ||
49 | public TarArchiveReader(string archivePath) | 49 | public TarArchiveReader(string archivePath) |
50 | { | 50 | { |
51 | m_br = new BinaryReader(new FileStream(archivePath, FileMode.Open)); | 51 | m_br = new BinaryReader(new FileStream(archivePath, FileMode.Open)); |
52 | } | 52 | } |
53 | 53 | ||
54 | public byte[] Read(out string filePath) | 54 | public byte[] Read(out string filePath) |
55 | { | 55 | { |
56 | TarHeader header = ReadHeader(); | 56 | TarHeader header = ReadHeader(); |
57 | filePath = header.FilePath; | 57 | filePath = header.FilePath; |
58 | return m_br.ReadBytes(header.FileSize); | 58 | return m_br.ReadBytes(header.FileSize); |
59 | } | 59 | } |
60 | 60 | ||
61 | /// <summary> | 61 | /// <summary> |
62 | /// Read the next 512 byte chunk of data as a tar header. | 62 | /// Read the next 512 byte chunk of data as a tar header. |
63 | /// </summary> | 63 | /// </summary> |
64 | /// <returns>A tar header struct</returns> | 64 | /// <returns>A tar header struct</returns> |
65 | protected TarHeader ReadHeader() | 65 | protected TarHeader ReadHeader() |
66 | { | 66 | { |
67 | TarHeader tarHeader = new TarHeader(); | 67 | TarHeader tarHeader = new TarHeader(); |
68 | 68 | ||
69 | byte[] header = m_br.ReadBytes(512); | 69 | byte[] header = m_br.ReadBytes(512); |
70 | 70 | ||
71 | tarHeader.FilePath = m_asciiEncoding.GetString(header, 0, 100); | 71 | tarHeader.FilePath = m_asciiEncoding.GetString(header, 0, 100); |
72 | tarHeader.FileSize = ConvertOctalBytesToDecimal(header, 124, 11); | 72 | tarHeader.FileSize = ConvertOctalBytesToDecimal(header, 124, 11); |
73 | 73 | ||
74 | return tarHeader; | 74 | return tarHeader; |
75 | } | 75 | } |
76 | 76 | ||
77 | public void Close() | 77 | public void Close() |
78 | { | 78 | { |
79 | m_br.Close(); | 79 | m_br.Close(); |
80 | } | 80 | } |
81 | 81 | ||
82 | /// <summary> | 82 | /// <summary> |
83 | /// Convert octal bytes to a decimal representation | 83 | /// Convert octal bytes to a decimal representation |
84 | /// </summary> | 84 | /// </summary> |
85 | /// <param name="bytes"></param> | 85 | /// <param name="bytes"></param> |
86 | /// <returns></returns> | 86 | /// <returns></returns> |
87 | public static int ConvertOctalBytesToDecimal(byte[] bytes, int startIndex, int count) | 87 | public static int ConvertOctalBytesToDecimal(byte[] bytes, int startIndex, int count) |
88 | { | 88 | { |
89 | string oString = m_asciiEncoding.GetString(bytes, startIndex, count); | 89 | string oString = m_asciiEncoding.GetString(bytes, startIndex, count); |
90 | 90 | ||
91 | int d = 0; | 91 | int d = 0; |
92 | 92 | ||
93 | foreach (char c in oString) | 93 | foreach (char c in oString) |
94 | { | 94 | { |
95 | d <<= 3; | 95 | d <<= 3; |
96 | d |= c - '0'; | 96 | d |= c - '0'; |
97 | } | 97 | } |
98 | 98 | ||
99 | return d; | 99 | return d; |
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | public struct TarHeader | 103 | public struct TarHeader |
104 | { | 104 | { |
105 | public string FilePath; | 105 | public string FilePath; |
106 | public int FileSize; | 106 | public int FileSize; |
107 | } | 107 | } |
108 | } | 108 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index 96ae065..ff179da 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | |||
@@ -357,7 +357,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
357 | else | 357 | else |
358 | { | 358 | { |
359 | lsri.OwnerName = "waiting"; | 359 | lsri.OwnerName = "waiting"; |
360 | lock(uuidNameLookupList) | 360 | lock (uuidNameLookupList) |
361 | uuidNameLookupList.Add(sog.OwnerID); | 361 | uuidNameLookupList.Add(sog.OwnerID); |
362 | } | 362 | } |
363 | 363 | ||
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs index 889be97..e1358db 100644 --- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules | |||
104 | private ulong CurrentTime | 104 | private ulong CurrentTime |
105 | { | 105 | { |
106 | get { | 106 | get { |
107 | 107 | ||
108 | return (ulong)(((System.DateTime.Now.Ticks) - TicksToEpoch + TicksOffset)/10000000); | 108 | return (ulong)(((System.DateTime.Now.Ticks) - TicksToEpoch + TicksOffset)/10000000); |
109 | } | 109 | } |
110 | } | 110 | } |
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Environment.Modules | |||
346 | { | 346 | { |
347 | if (m_rootAgents.ContainsKey(avatar.UUID)) | 347 | if (m_rootAgents.ContainsKey(avatar.UUID)) |
348 | { | 348 | { |
349 | m_rootAgents[avatar.UUID] = avatar.RegionHandle; | 349 | m_rootAgents[avatar.UUID] = avatar.RegionHandle; |
350 | } | 350 | } |
351 | else | 351 | else |
352 | { | 352 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 63146bd..c596f6e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
192 | public void LoadCurrentSceneFromXml2(string filename) | 192 | public void LoadCurrentSceneFromXml2(string filename) |
193 | { | 193 | { |
194 | CurrentOrFirstScene.LoadPrimsFromXml2(filename); | 194 | CurrentOrFirstScene.LoadPrimsFromXml2(filename); |
195 | } | 195 | } |
196 | 196 | ||
197 | /// <summary> | 197 | /// <summary> |
198 | /// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets | 198 | /// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets |
diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs index 154a423..8a95df9 100644 --- a/OpenSim/Region/Physics/Meshing/Extruder.cs +++ b/OpenSim/Region/Physics/Meshing/Extruder.cs | |||
@@ -62,7 +62,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
62 | public float pathTaperX = 0.0f; | 62 | public float pathTaperX = 0.0f; |
63 | public float pathTaperY = 0.0f; | 63 | public float pathTaperY = 0.0f; |
64 | 64 | ||
65 | |||
66 | public Mesh Extrude(Mesh m) | 65 | public Mesh Extrude(Mesh m) |
67 | { | 66 | { |
68 | startParameter = float.MinValue; | 67 | startParameter = float.MinValue; |
@@ -129,8 +128,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
129 | v.Y = v2.Y; | 128 | v.Y = v2.Y; |
130 | v.Z = v2.Z; | 129 | v.Z = v2.Z; |
131 | } | 130 | } |
132 | |||
133 | } | 131 | } |
132 | |||
134 | foreach (Vertex v in workingMinus.vertices) | 133 | foreach (Vertex v in workingMinus.vertices) |
135 | { | 134 | { |
136 | if (v == null) | 135 | if (v == null) |
@@ -159,10 +158,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
159 | } | 158 | } |
160 | 159 | ||
161 | result.Append(workingMinus); | 160 | result.Append(workingMinus); |
162 | |||
163 | result.Append(workingMiddle); | 161 | result.Append(workingMiddle); |
164 | 162 | ||
165 | |||
166 | int iLastNull = 0; | 163 | int iLastNull = 0; |
167 | 164 | ||
168 | for (int i = 0; i < workingMiddle.vertices.Count; i++) | 165 | for (int i = 0; i < workingMiddle.vertices.Count; i++) |
@@ -228,6 +225,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
228 | new Triangle(workingPlus.vertices[iNext], workingMiddle.vertices[i], workingMiddle.vertices[iNext]); | 225 | new Triangle(workingPlus.vertices[iNext], workingMiddle.vertices[i], workingMiddle.vertices[iNext]); |
229 | result.Add(tSide); | 226 | result.Add(tSide); |
230 | } | 227 | } |
228 | |||
231 | if (twistMid != 0) | 229 | if (twistMid != 0) |
232 | { | 230 | { |
233 | foreach (Vertex v in result.vertices) | 231 | foreach (Vertex v in result.vertices) |
@@ -245,6 +243,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
245 | } | 243 | } |
246 | return result; | 244 | return result; |
247 | } | 245 | } |
246 | |||
248 | public Mesh ExtrudeCircularPath(Mesh m) | 247 | public Mesh ExtrudeCircularPath(Mesh m) |
249 | { | 248 | { |
250 | //startParameter = float.MinValue; | 249 | //startParameter = float.MinValue; |
@@ -294,8 +293,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
294 | //System.Console.WriteLine("taperBotFactorX: " + taperBotFactorX.ToString() + " taperBotFactorY: " + taperBotFactorY.ToString() | 293 | //System.Console.WriteLine("taperBotFactorX: " + taperBotFactorX.ToString() + " taperBotFactorY: " + taperBotFactorY.ToString() |
295 | // + " taperTopFactorX: " + taperTopFactorX.ToString() + " taperTopFactorY: " + taperTopFactorY.ToString()); | 294 | // + " taperTopFactorX: " + taperTopFactorX.ToString() + " taperTopFactorY: " + taperTopFactorY.ToString()); |
296 | 295 | ||
297 | |||
298 | |||
299 | do | 296 | do |
300 | { | 297 | { |
301 | float percentOfPath = 1.0f; | 298 | float percentOfPath = 1.0f; |
@@ -328,10 +325,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
328 | 325 | ||
329 | //System.Console.WriteLine("Extruder: radius: " + radius.ToString() + " radiusScale: " + radiusScale.ToString()); | 326 | //System.Console.WriteLine("Extruder: radius: " + radius.ToString() + " radiusScale: " + radiusScale.ToString()); |
330 | 327 | ||
331 | |||
332 | |||
333 | |||
334 | |||
335 | float twist = twistBot + (twistTotal * (float)percentOfPath); | 328 | float twist = twistBot + (twistTotal * (float)percentOfPath); |
336 | 329 | ||
337 | float zOffset = (float)(System.Math.Sin(angle) * (0.5f - yPathScale)) * radiusScale; | 330 | float zOffset = (float)(System.Math.Sin(angle) * (0.5f - yPathScale)) * radiusScale; |
@@ -404,13 +397,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
404 | } | 397 | } |
405 | lastLayer = newLayer; | 398 | lastLayer = newLayer; |
406 | 399 | ||
407 | |||
408 | |||
409 | |||
410 | |||
411 | |||
412 | |||
413 | |||
414 | // calc next angle | 400 | // calc next angle |
415 | 401 | ||
416 | if (angle >= endAngle) | 402 | if (angle >= endAngle) |
@@ -421,10 +407,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
421 | if (angle > endAngle) | 407 | if (angle > endAngle) |
422 | angle = endAngle; | 408 | angle = endAngle; |
423 | } | 409 | } |
424 | } | 410 | } while (!done); |
425 | while (!done); | ||
426 | |||
427 | |||
428 | 411 | ||
429 | // scale the mesh to the desired size | 412 | // scale the mesh to the desired size |
430 | float xScale = size.X; | 413 | float xScale = size.X; |
@@ -432,12 +415,14 @@ namespace OpenSim.Region.Physics.Meshing | |||
432 | float zScale = size.Z; | 415 | float zScale = size.Z; |
433 | 416 | ||
434 | foreach (Vertex v in result.vertices) | 417 | foreach (Vertex v in result.vertices) |
418 | { | ||
435 | if (v != null) | 419 | if (v != null) |
436 | { | 420 | { |
437 | v.X *= xScale; | 421 | v.X *= xScale; |
438 | v.Y *= yScale; | 422 | v.Y *= yScale; |
439 | v.Z *= zScale; | 423 | v.Z *= zScale; |
440 | } | 424 | } |
425 | } | ||
441 | 426 | ||
442 | return result; | 427 | return result; |
443 | } | 428 | } |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 5ef392c..3fbc7c9 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -255,7 +255,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
255 | holeHull.AddVertex(IPM); | 255 | holeHull.AddVertex(IPM); |
256 | } | 256 | } |
257 | //if (hshape == HollowShape.Circle && pbs.PathCurve == (byte)Extrusion.Straight) | 257 | //if (hshape == HollowShape.Circle && pbs.PathCurve == (byte)Extrusion.Straight) |
258 | if ( hshape == HollowShape.Circle ) | 258 | if (hshape == HollowShape.Circle) |
259 | { | 259 | { |
260 | float hollowFactorF = (float)fhollowFactor / (float)50000; | 260 | float hollowFactorF = (float)fhollowFactor / (float)50000; |
261 | 261 | ||
@@ -1346,7 +1346,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1346 | // || (primShape.ProfileCurve & 0x07) == (byte) ProfileShape.Square) | 1346 | // || (primShape.ProfileCurve & 0x07) == (byte) ProfileShape.Square) |
1347 | { | 1347 | { |
1348 | //Console.WriteLine("Meshmerizer thinks " + primName + " is a TORUS"); | 1348 | //Console.WriteLine("Meshmerizer thinks " + primName + " is a TORUS"); |
1349 | if ( hollowShape == HollowShape.Same ) | 1349 | if (hollowShape == HollowShape.Same) |
1350 | hollowShape = HollowShape.Circle; | 1350 | hollowShape = HollowShape.Circle; |
1351 | 1351 | ||
1352 | // build the profile shape | 1352 | // build the profile shape |
@@ -1381,7 +1381,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1381 | else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) // a ring | 1381 | else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) // a ring |
1382 | { | 1382 | { |
1383 | //Console.WriteLine("Meshmerizer thinks " + primName + " is a TUBE"); | 1383 | //Console.WriteLine("Meshmerizer thinks " + primName + " is a TUBE"); |
1384 | if ( hollowShape == HollowShape.Same ) | 1384 | if (hollowShape == HollowShape.Same) |
1385 | hollowShape = HollowShape.Square; | 1385 | hollowShape = HollowShape.Square; |
1386 | 1386 | ||
1387 | outerHull.AddVertex(new Vertex(+0.5f, +0.5f, 0.0f)); | 1387 | outerHull.AddVertex(new Vertex(+0.5f, +0.5f, 0.0f)); |
@@ -1393,7 +1393,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1393 | else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.EquilateralTriangle) | 1393 | else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.EquilateralTriangle) |
1394 | { | 1394 | { |
1395 | //Console.WriteLine("Meshmerizer thinks " + primName + " is a RING"); | 1395 | //Console.WriteLine("Meshmerizer thinks " + primName + " is a RING"); |
1396 | if ( hollowShape == HollowShape.Same ) | 1396 | if (hollowShape == HollowShape.Same) |
1397 | hollowShape = HollowShape.Triangle; | 1397 | hollowShape = HollowShape.Triangle; |
1398 | 1398 | ||
1399 | outerHull.AddVertex(new Vertex(+0.255f, -0.375f, 0.0f)); | 1399 | outerHull.AddVertex(new Vertex(+0.255f, -0.375f, 0.0f)); |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 33aa905..518e37b 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -1432,7 +1432,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1432 | m_host.Sound = key; | 1432 | m_host.Sound = key; |
1433 | } | 1433 | } |
1434 | // else try to locate the name in inventory of object. found returns key, | 1434 | // else try to locate the name in inventory of object. found returns key, |
1435 | // not found returns LLUUID.Zero | 1435 | // not found returns LLUUID.Zero |
1436 | else | 1436 | else |
1437 | { | 1437 | { |
1438 | m_host.Sound = InventoryKey(sound.ToString()); | 1438 | m_host.Sound = InventoryKey(sound.ToString()); |
@@ -1477,7 +1477,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1477 | m_host.Sound = LLUUID.Zero; | 1477 | m_host.Sound = LLUUID.Zero; |
1478 | m_host.SoundGain = 0; | 1478 | m_host.SoundGain = 0; |
1479 | m_host.SoundFlags = 0; | 1479 | m_host.SoundFlags = 0; |
1480 | m_host.SoundRadius = 0; | 1480 | m_host.SoundRadius = 0; |
1481 | 1481 | ||
1482 | m_host.SendFullUpdateToAllClients(); | 1482 | m_host.SendFullUpdateToAllClients(); |
1483 | 1483 | ||
@@ -3871,7 +3871,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3871 | { | 3871 | { |
3872 | // Finally got to the first line of the notecard | 3872 | // Finally got to the first line of the notecard |
3873 | // now find the end of the notecard text delimited by }<LF> | 3873 | // now find the end of the notecard text delimited by }<LF> |
3874 | // parse the lines, delimited by <LF> | 3874 | // parse the lines, delimited by <LF> |
3875 | notecardIndex = dataString.IndexOf("\n", notecardIndex); | 3875 | notecardIndex = dataString.IndexOf("\n", notecardIndex); |
3876 | notecardIndex++; // get past delimiter | 3876 | notecardIndex++; // get past delimiter |
3877 | 3877 | ||
@@ -5627,10 +5627,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5627 | 5627 | ||
5628 | RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator); | 5628 | RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator); |
5629 | 5629 | ||
5630 | switch(data) | 5630 | switch (data) |
5631 | { | 5631 | { |
5632 | case 5: // DATA_SIM_POS | 5632 | case 5: // DATA_SIM_POS |
5633 | if(info == null) | 5633 | if (info == null) |
5634 | return LLUUID.Zero.ToString(); | 5634 | return LLUUID.Zero.ToString(); |
5635 | reply = new LSL_Types.Vector3( | 5635 | reply = new LSL_Types.Vector3( |
5636 | info.RegionLocX * Constants.RegionSize, | 5636 | info.RegionLocX * Constants.RegionSize, |
@@ -5638,18 +5638,18 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5638 | 0).ToString(); | 5638 | 0).ToString(); |
5639 | break; | 5639 | break; |
5640 | case 6: // DATA_SIM_STATUS | 5640 | case 6: // DATA_SIM_STATUS |
5641 | if(info != null) | 5641 | if (info != null) |
5642 | reply = "up"; // Duh! | 5642 | reply = "up"; // Duh! |
5643 | else | 5643 | else |
5644 | reply = "unknown"; | 5644 | reply = "unknown"; |
5645 | break; | 5645 | break; |
5646 | case 7: // DATA_SIM_RATING | 5646 | case 7: // DATA_SIM_RATING |
5647 | if(info == null) | 5647 | if (info == null) |
5648 | return LLUUID.Zero.ToString(); | 5648 | return LLUUID.Zero.ToString(); |
5649 | int access = (int)info.EstateSettings.simAccess; | 5649 | int access = (int)info.EstateSettings.simAccess; |
5650 | if(access == 21) | 5650 | if (access == 21) |
5651 | reply = "MATURE"; | 5651 | reply = "MATURE"; |
5652 | else if(access == 13) | 5652 | else if (access == 13) |
5653 | reply = "MATURE"; | 5653 | reply = "MATURE"; |
5654 | else | 5654 | else |
5655 | reply = "UNKNOWN"; | 5655 | reply = "UNKNOWN"; |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs index eb87a9c..5f86c9c 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs | |||
@@ -59,9 +59,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
59 | public LLUUID RegisterRequest(uint localID, LLUUID itemID, | 59 | public LLUUID RegisterRequest(uint localID, LLUUID itemID, |
60 | string identifier) | 60 | string identifier) |
61 | { | 61 | { |
62 | lock(DataserverRequests) | 62 | lock (DataserverRequests) |
63 | { | 63 | { |
64 | if(DataserverRequests.ContainsKey(identifier)) | 64 | if (DataserverRequests.ContainsKey(identifier)) |
65 | return LLUUID.Zero; | 65 | return LLUUID.Zero; |
66 | 66 | ||
67 | DataserverRequest ds = new DataserverRequest(); | 67 | DataserverRequest ds = new DataserverRequest(); |
@@ -84,9 +84,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
84 | { | 84 | { |
85 | DataserverRequest ds; | 85 | DataserverRequest ds; |
86 | 86 | ||
87 | lock(DataserverRequests) | 87 | lock (DataserverRequests) |
88 | { | 88 | { |
89 | if(!DataserverRequests.ContainsKey(identifier)) | 89 | if (!DataserverRequests.ContainsKey(identifier)) |
90 | return; | 90 | return; |
91 | 91 | ||
92 | ds=DataserverRequests[identifier]; | 92 | ds=DataserverRequests[identifier]; |
@@ -101,11 +101,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
101 | 101 | ||
102 | public void RemoveEvents(uint localID, LLUUID itemID) | 102 | public void RemoveEvents(uint localID, LLUUID itemID) |
103 | { | 103 | { |
104 | lock(DataserverRequests) | 104 | lock (DataserverRequests) |
105 | { | 105 | { |
106 | foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) | 106 | foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) |
107 | { | 107 | { |
108 | if(ds.itemID == itemID) | 108 | if (ds.itemID == itemID) |
109 | DataserverRequests.Remove(ds.handle); | 109 | DataserverRequests.Remove(ds.handle); |
110 | } | 110 | } |
111 | } | 111 | } |
@@ -113,11 +113,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
113 | 113 | ||
114 | public void ExpireRequests() | 114 | public void ExpireRequests() |
115 | { | 115 | { |
116 | lock(DataserverRequests) | 116 | lock (DataserverRequests) |
117 | { | 117 | { |
118 | foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) | 118 | foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) |
119 | { | 119 | { |
120 | if(ds.startTime > DateTime.Now.AddSeconds(30)) | 120 | if (ds.startTime > DateTime.Now.AddSeconds(30)) |
121 | DataserverRequests.Remove(ds.handle); | 121 | DataserverRequests.Remove(ds.handle); |
122 | } | 122 | } |
123 | } | 123 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs index c793add..ba6a98c 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
57 | bool handled = false; | 57 | bool handled = false; |
58 | 58 | ||
59 | // Request must be taken out of the queue in case there is no handler, otherwise we loop infinitely | 59 | // Request must be taken out of the queue in case there is no handler, otherwise we loop infinitely |
60 | xmlrpc.RemoveCompletedRequest(rInfo.GetMessageID()); | 60 | xmlrpc.RemoveCompletedRequest(rInfo.GetMessageID()); |
61 | 61 | ||
62 | // And since the xmlrpc request queue is actually shared among all regions on the simulator, we need | 62 | // And since the xmlrpc request queue is actually shared among all regions on the simulator, we need |
63 | // to look in each one for the appropriate handler | 63 | // to look in each one for the appropriate handler |
@@ -96,9 +96,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
96 | 96 | ||
97 | // Request must be taken out of the queue in case there is no handler, otherwise we loop infinitely | 97 | // Request must be taken out of the queue in case there is no handler, otherwise we loop infinitely |
98 | xmlrpc.RemoveCompletedSRDRequest(srdInfo.GetReqID()); | 98 | xmlrpc.RemoveCompletedSRDRequest(srdInfo.GetReqID()); |
99 | 99 | ||
100 | // And this is another shared queue... so we check each of the script engines for a handler | 100 | // And this is another shared queue... so we check each of the script engines for a handler |
101 | foreach (ScriptEngine sman in ScriptEngine.ScriptEngines) | 101 | foreach (ScriptEngine sman in ScriptEngine.ScriptEngines) |
102 | { | 102 | { |
103 | if (sman.m_ScriptManager.GetScript(srdInfo.m_localID,srdInfo.m_itemID) != null) { | 103 | if (sman.m_ScriptManager.GetScript(srdInfo.m_localID,srdInfo.m_itemID) != null) { |
104 | 104 | ||
@@ -116,7 +116,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
116 | handled = true; | 116 | handled = true; |
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
120 | if (! handled) | 120 | if (! handled) |
121 | { | 121 | { |
122 | Console.WriteLine("Unhandled xml_srdrequest: " + srdInfo.GetReqID()); | 122 | Console.WriteLine("Unhandled xml_srdrequest: " + srdInfo.GetReqID()); |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 10380f2..583bb93 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -87,9 +87,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
87 | string quote = String.Empty; | 87 | string quote = String.Empty; |
88 | bool last_was_escape = false; | 88 | bool last_was_escape = false; |
89 | int quote_replaced_count = 0; | 89 | int quote_replaced_count = 0; |
90 | 90 | ||
91 | string removefwnoncomments = nonCommentFwsl.Replace(Script, "\"\";"); | 91 | string removefwnoncomments = nonCommentFwsl.Replace(Script, "\"\";"); |
92 | 92 | ||
93 | string removecomments = conelinecomments.Replace(removefwnoncomments, ""); | 93 | string removecomments = conelinecomments.Replace(removefwnoncomments, ""); |
94 | removecomments = cstylecomments.Replace(removecomments, ""); | 94 | removecomments = cstylecomments.Replace(removecomments, ""); |
95 | string[] localscript = removecomments.Split('"'); | 95 | string[] localscript = removecomments.Split('"'); |
@@ -121,9 +121,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
121 | // ignores alpha.x alpha.y, alpha.z for refering to vector components | 121 | // ignores alpha.x alpha.y, alpha.z for refering to vector components |
122 | Match SecurityM; | 122 | Match SecurityM; |
123 | 123 | ||
124 | 124 | ||
125 | SecurityM = Regex.Match(checkscript, @"([a-zA-Z])\.(?:[a-wA-Z]|[a-zA-Z][a-zA-Z])", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 125 | SecurityM = Regex.Match(checkscript, @"([a-zA-Z])\.(?:[a-wA-Z]|[a-zA-Z][a-zA-Z])", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
126 | if (SecurityM.Success) | 126 | if (SecurityM.Success) |
127 | throw new Exception("CS0103: 'The . symbol cannot be used in LSL except in float values or vector components'. Detected around: " + SecurityM.Captures[0].Value); | 127 | throw new Exception("CS0103: 'The . symbol cannot be used in LSL except in float values or vector components'. Detected around: " + SecurityM.Captures[0].Value); |
128 | 128 | ||
129 | SecurityM = Regex.Match(checkscript, @"typeof\s", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 129 | SecurityM = Regex.Match(checkscript, @"typeof\s", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |