diff options
Diffstat (limited to 'OpenSim/Region')
21 files changed, 208 insertions, 282 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs index 616d8d9..d7d9128 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// When packetqueue dequeues this packet in the outgoing stream, it thread aborts | 36 | /// When packetqueue dequeues this packet in the outgoing stream, it thread aborts |
37 | /// Ensures that the thread abort happens from within the client thread | 37 | /// Ensures that the thread abort happens from within the client thread |
38 | /// regardless of where the close method is called | 38 | /// regardless of where the close method is called |
39 | /// </summary> | 39 | /// </summary> |
40 | class KillPacket : Packet | 40 | class KillPacket : Packet |
@@ -42,20 +42,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
42 | private Header header; | 42 | private Header header; |
43 | public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer) | 43 | public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer) |
44 | { | 44 | { |
45 | |||
46 | } | 45 | } |
47 | 46 | ||
48 | public override void FromBytes(byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer) | 47 | public override void FromBytes(byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer) |
49 | { | 48 | { |
50 | |||
51 | } | 49 | } |
52 | 50 | ||
53 | public override Header Header { get { return header; } set { header = value; }} | 51 | public override Header Header { get { return header; } set { header = value; }} |
54 | 52 | ||
55 | public override byte[] ToBytes() | 53 | public override byte[] ToBytes() |
56 | { | 54 | { |
57 | return new byte[0]; | 55 | return new byte[0]; |
58 | } | 56 | } |
57 | |||
59 | public KillPacket() | 58 | public KillPacket() |
60 | { | 59 | { |
61 | Header = new LowHeader(); | 60 | Header = new LowHeader(); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index fc99334..0a067d5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -373,7 +373,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
373 | public bool SendLogoutPacketWhenClosing | 373 | public bool SendLogoutPacketWhenClosing |
374 | { | 374 | { |
375 | set { m_SendLogoutPacketWhenClosing = value; } | 375 | set { m_SendLogoutPacketWhenClosing = value; } |
376 | } | 376 | } |
377 | 377 | ||
378 | /* METHODS */ | 378 | /* METHODS */ |
379 | 379 | ||
@@ -459,10 +459,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
459 | { | 459 | { |
460 | GC.Collect(); | 460 | GC.Collect(); |
461 | 461 | ||
462 | // Sends a KillPacket object, with which, the | 462 | // Sends a KillPacket object, with which, the |
463 | // blockingqueue dequeues and sees it's a killpacket | 463 | // blockingqueue dequeues and sees it's a killpacket |
464 | // and terminates within the context of the client thread. | 464 | // and terminates within the context of the client thread. |
465 | // This ensures that it's done from within the context | 465 | // This ensures that it's done from within the context |
466 | // of the client thread regardless of where Close() is called. | 466 | // of the client thread regardless of where Close() is called. |
467 | KillEndDone(); | 467 | KillEndDone(); |
468 | } | 468 | } |
@@ -2099,8 +2099,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2099 | #endregion | 2099 | #endregion |
2100 | 2100 | ||
2101 | // Gesture | 2101 | // Gesture |
2102 | |||
2103 | |||
2104 | 2102 | ||
2105 | #region Appearance/ Wearables Methods | 2103 | #region Appearance/ Wearables Methods |
2106 | 2104 | ||
@@ -5964,11 +5962,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5964 | if (handlerActivateGesture != null) | 5962 | if (handlerActivateGesture != null) |
5965 | { | 5963 | { |
5966 | handlerActivateGesture(this, | 5964 | handlerActivateGesture(this, |
5967 | activateGesturePacket.Data[0].AssetID, | 5965 | activateGesturePacket.Data[0].AssetID, |
5968 | activateGesturePacket.Data[0].ItemID); | 5966 | activateGesturePacket.Data[0].ItemID); |
5969 | } | 5967 | } |
5970 | else m_log.Error("Null pointer for activateGesture"); | 5968 | else m_log.Error("Null pointer for activateGesture"); |
5971 | 5969 | ||
5972 | break; | 5970 | break; |
5973 | 5971 | ||
5974 | case PacketType.DeactivateGestures: | 5972 | case PacketType.DeactivateGestures: |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index e874394..551e7ab 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | |||
@@ -234,7 +234,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
234 | // to. Packet drop notifies will not be triggered in this | 234 | // to. Packet drop notifies will not be triggered in this |
235 | // configuration! | 235 | // configuration! |
236 | // | 236 | // |
237 | 237 | ||
238 | if ((m_SynchronizeClient != null) && (!m_Client.IsActive)) | 238 | if ((m_SynchronizeClient != null) && (!m_Client.IsActive)) |
239 | { | 239 | { |
240 | if (m_SynchronizeClient(m_Client.Scene, packet, | 240 | if (m_SynchronizeClient(m_Client.Scene, packet, |
@@ -749,7 +749,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
749 | // If we sent a killpacket | 749 | // If we sent a killpacket |
750 | if (packet is KillPacket) | 750 | if (packet is KillPacket) |
751 | Thread.CurrentThread.Abort(); | 751 | Thread.CurrentThread.Abort(); |
752 | 752 | ||
753 | // Actually make the byte array and send it | 753 | // Actually make the byte array and send it |
754 | byte[] sendbuffer = packet.ToBytes(); | 754 | byte[] sendbuffer = packet.ToBytes(); |
755 | 755 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index abaf743..da2e4a2 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -260,9 +260,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
260 | catch (SocketException e) | 260 | catch (SocketException e) |
261 | { | 261 | { |
262 | m_log.WarnFormat( | 262 | m_log.WarnFormat( |
263 | "[OGS1 GRID SERVICES]: RequestNeighbours(): Lookup of neighbour {0} failed! Not including in neighbours list. {1}", | 263 | "[OGS1 GRID SERVICES]: RequestNeighbours(): Lookup of neighbour {0} failed! Not including in neighbours list. {1}", |
264 | simIp, e); | 264 | simIp, e); |
265 | 265 | ||
266 | continue; | 266 | continue; |
267 | } | 267 | } |
268 | 268 | ||
@@ -304,7 +304,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
304 | SendParams.Add(requestData); | 304 | SendParams.Add(requestData); |
305 | XmlRpcRequest gridReq = new XmlRpcRequest("simulator_data_request", SendParams); | 305 | XmlRpcRequest gridReq = new XmlRpcRequest("simulator_data_request", SendParams); |
306 | XmlRpcResponse gridResp = null; | 306 | XmlRpcResponse gridResp = null; |
307 | 307 | ||
308 | try | 308 | try |
309 | { | 309 | { |
310 | gridResp = gridReq.Send(serversInfo.GridURL, 3000); | 310 | gridResp = gridReq.Send(serversInfo.GridURL, 3000); |
@@ -312,9 +312,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
312 | catch (WebException e) | 312 | catch (WebException e) |
313 | { | 313 | { |
314 | m_log.ErrorFormat( | 314 | m_log.ErrorFormat( |
315 | "[OGS1 GRID SERVICES]: Communication with the grid server at {0} failed, {1}", | 315 | "[OGS1 GRID SERVICES]: Communication with the grid server at {0} failed, {1}", |
316 | serversInfo.GridURL, e); | 316 | serversInfo.GridURL, e); |
317 | 317 | ||
318 | return null; | 318 | return null; |
319 | } | 319 | } |
320 | 320 | ||
@@ -1621,14 +1621,14 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1621 | { | 1621 | { |
1622 | m_log.DebugFormat( | 1622 | m_log.DebugFormat( |
1623 | "[OGS1 GRID SERVICES]: CheckRegion Socket Setup exception: {0}:{1}", e.Message, e.StackTrace); | 1623 | "[OGS1 GRID SERVICES]: CheckRegion Socket Setup exception: {0}:{1}", e.Message, e.StackTrace); |
1624 | 1624 | ||
1625 | return false; | 1625 | return false; |
1626 | } | 1626 | } |
1627 | 1627 | ||
1628 | if (timed_out) | 1628 | if (timed_out) |
1629 | { | 1629 | { |
1630 | m_log.DebugFormat( | 1630 | m_log.DebugFormat( |
1631 | "[OGS1 GRID SERVICES]: socket [{0}] timed out ({1}) waiting to obtain a connection.", | 1631 | "[OGS1 GRID SERVICES]: socket [{0}] timed out ({1}) waiting to obtain a connection.", |
1632 | m_EndPoint, timeOut * 1000); | 1632 | m_EndPoint, timeOut * 1000); |
1633 | 1633 | ||
1634 | if (retry) | 1634 | if (retry) |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index 77dd0f9..9f01ad8 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs | |||
@@ -1537,7 +1537,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1537 | { | 1537 | { |
1538 | GetClientFunds(client); | 1538 | GetClientFunds(client); |
1539 | 1539 | ||
1540 | lock(m_KnownClientFunds) | 1540 | lock (m_KnownClientFunds) |
1541 | { | 1541 | { |
1542 | if (!m_KnownClientFunds.ContainsKey(client.AgentId)) | 1542 | if (!m_KnownClientFunds.ContainsKey(client.AgentId)) |
1543 | return 0; | 1543 | return 0; |
@@ -1570,7 +1570,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1570 | 1570 | ||
1571 | int funds = m_KnownClientFunds[remoteClient.AgentId]; | 1571 | int funds = m_KnownClientFunds[remoteClient.AgentId]; |
1572 | 1572 | ||
1573 | if(salePrice != 0 && funds < salePrice) | 1573 | if (salePrice != 0 && funds < salePrice) |
1574 | { | 1574 | { |
1575 | remoteClient.SendAgentAlertMessage("Unable to buy now. You don't have sufficient funds.", false); | 1575 | remoteClient.SendAgentAlertMessage("Unable to buy now. You don't have sufficient funds.", false); |
1576 | return; | 1576 | return; |
@@ -1584,7 +1584,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1584 | remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false); | 1584 | remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false); |
1585 | return; | 1585 | return; |
1586 | } | 1586 | } |
1587 | 1587 | ||
1588 | doMoneyTransfer(remoteClient.AgentId, part.OwnerID, salePrice, 5000, "Object buy"); | 1588 | doMoneyTransfer(remoteClient.AgentId, part.OwnerID, salePrice, 5000, "Object buy"); |
1589 | 1589 | ||
1590 | s.PerformObjectBuy(remoteClient, categoryID, localID, saleType); | 1590 | s.PerformObjectBuy(remoteClient, categoryID, localID, saleType); |
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs index 926e584..0c15637 100644 --- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -83,16 +83,13 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
83 | public bool visible_to_parent; | 83 | public bool visible_to_parent; |
84 | } | 84 | } |
85 | 85 | ||
86 | |||
87 | public class OpenGridProtocolModule : IRegionModule | 86 | public class OpenGridProtocolModule : IRegionModule |
88 | { | 87 | { |
89 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 88 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
90 | private List<Scene> m_scene = new List<Scene>(); | 89 | private List<Scene> m_scene = new List<Scene>(); |
91 | 90 | ||
92 | private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>(); | 91 | private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>(); |
93 | private Dictionary<LLUUID, OGPState> m_OGPState = new Dictionary<LLUUID, OGPState>(); | 92 | private Dictionary<LLUUID, OGPState> m_OGPState = new Dictionary<LLUUID, OGPState>(); |
94 | |||
95 | |||
96 | 93 | ||
97 | #region IRegionModule Members | 94 | #region IRegionModule Members |
98 | 95 | ||
@@ -134,7 +131,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
134 | m_log.Error("[OGP]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions."); | 131 | m_log.Error("[OGP]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions."); |
135 | } | 132 | } |
136 | } | 133 | } |
137 | 134 | ||
138 | } | 135 | } |
139 | 136 | ||
140 | if (!m_scene.Contains(scene)) | 137 | if (!m_scene.Contains(scene)) |
@@ -217,15 +214,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
217 | m_log.WarnFormat("[REQUESTREZAVATAR]: {0}", request.ToString()); | 214 | m_log.WarnFormat("[REQUESTREZAVATAR]: {0}", request.ToString()); |
218 | 215 | ||
219 | LLSDMap requestMap = (LLSDMap)request; | 216 | LLSDMap requestMap = (LLSDMap)request; |
220 | 217 | ||
221 | Scene homeScene = GetRootScene(); | 218 | Scene homeScene = GetRootScene(); |
222 | |||
223 | |||
224 | 219 | ||
225 | if (homeScene == null) | 220 | if (homeScene == null) |
226 | return GenerateNoHandlerMessage(); | 221 | return GenerateNoHandlerMessage(); |
227 | 222 | ||
228 | |||
229 | RegionInfo reg = homeScene.RegionInfo; | 223 | RegionInfo reg = homeScene.RegionInfo; |
230 | ulong regionhandle = GetOSCompatibleRegionHandle(reg); | 224 | ulong regionhandle = GetOSCompatibleRegionHandle(reg); |
231 | //string RegionURI = reg.ServerURI; | 225 | //string RegionURI = reg.ServerURI; |
@@ -234,14 +228,13 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
234 | LLUUID RemoteAgentID = requestMap["agent_id"].AsUUID(); | 228 | LLUUID RemoteAgentID = requestMap["agent_id"].AsUUID(); |
235 | 229 | ||
236 | // will be used in the future. The client always connects with the aditi agentid currently | 230 | // will be used in the future. The client always connects with the aditi agentid currently |
237 | LLUUID LocalAgentID = RemoteAgentID; | 231 | LLUUID LocalAgentID = RemoteAgentID; |
238 | 232 | ||
239 | string FirstName = requestMap["first_name"].AsString(); | 233 | string FirstName = requestMap["first_name"].AsString(); |
240 | string LastName = requestMap["last_name"].AsString(); | 234 | string LastName = requestMap["last_name"].AsString(); |
241 | 235 | ||
242 | |||
243 | OGPState userState = GetOGPState(LocalAgentID); | 236 | OGPState userState = GetOGPState(LocalAgentID); |
244 | 237 | ||
245 | userState.first_name = requestMap["first_name"].AsString(); | 238 | userState.first_name = requestMap["first_name"].AsString(); |
246 | userState.last_name = requestMap["last_name"].AsString(); | 239 | userState.last_name = requestMap["last_name"].AsString(); |
247 | userState.age_verified = requestMap["age_verified"].AsBoolean(); | 240 | userState.age_verified = requestMap["age_verified"].AsBoolean(); |
@@ -268,7 +261,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
268 | responseMap["region_Y"] = LLSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY | 261 | responseMap["region_Y"] = LLSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY |
269 | responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); | 262 | responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); |
270 | responseMap["sim_access"] = LLSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG"); | 263 | responseMap["sim_access"] = LLSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG"); |
271 | 264 | ||
272 | // Generate a dummy agent for the user so we can get back a CAPS path | 265 | // Generate a dummy agent for the user so we can get back a CAPS path |
273 | AgentCircuitData agentData = new AgentCircuitData(); | 266 | AgentCircuitData agentData = new AgentCircuitData(); |
274 | agentData.AgentID = LocalAgentID; | 267 | agentData.AgentID = LocalAgentID; |
@@ -299,7 +292,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
299 | useragent.SecureSessionID=agentData.SecureSessionID; | 292 | useragent.SecureSessionID=agentData.SecureSessionID; |
300 | useragent.SessionID = agentData.SessionID; | 293 | useragent.SessionID = agentData.SessionID; |
301 | 294 | ||
302 | |||
303 | UserProfileData userProfile = new UserProfileData(); | 295 | UserProfileData userProfile = new UserProfileData(); |
304 | userProfile.AboutText = "OGP User"; | 296 | userProfile.AboutText = "OGP User"; |
305 | userProfile.CanDoMask = (uint)0; | 297 | userProfile.CanDoMask = (uint)0; |
@@ -338,15 +330,13 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
338 | 330 | ||
339 | // Do caps registration | 331 | // Do caps registration |
340 | // get seed cap | 332 | // get seed cap |
341 | 333 | ||
342 | |||
343 | // Stick our data in the cache so the region will know something about us | 334 | // Stick our data in the cache so the region will know something about us |
344 | homeScene.CommsManager.UserProfileCacheService.PreloadUserCache(agentData.AgentID, userProfile); | 335 | homeScene.CommsManager.UserProfileCacheService.PreloadUserCache(agentData.AgentID, userProfile); |
345 | 336 | ||
346 | // Call 'new user' event handler | 337 | // Call 'new user' event handler |
347 | homeScene.NewUserConnection(reg.RegionHandle, agentData); | 338 | homeScene.NewUserConnection(reg.RegionHandle, agentData); |
348 | 339 | ||
349 | |||
350 | //string raCap = string.Empty; | 340 | //string raCap = string.Empty; |
351 | 341 | ||
352 | LLUUID AvatarRezCapUUID = LLUUID.Random(); | 342 | LLUUID AvatarRezCapUUID = LLUUID.Random(); |
@@ -379,16 +369,16 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
379 | public LLSD RezAvatarMethod(string path, LLSD request) | 369 | public LLSD RezAvatarMethod(string path, LLSD request) |
380 | { | 370 | { |
381 | m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString()); | 371 | m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString()); |
382 | 372 | ||
383 | LLSDMap responseMap = new LLSDMap(); | 373 | LLSDMap responseMap = new LLSDMap(); |
384 | 374 | ||
385 | AgentCircuitData userData = null; | 375 | AgentCircuitData userData = null; |
386 | 376 | ||
387 | // Only people we've issued a cap can go further | 377 | // Only people we've issued a cap can go further |
388 | if (TryGetAgentCircuitData(path,out userData)) | 378 | if (TryGetAgentCircuitData(path,out userData)) |
389 | { | 379 | { |
390 | LLSDMap requestMap = (LLSDMap)request; | 380 | LLSDMap requestMap = (LLSDMap)request; |
391 | 381 | ||
392 | // take these values to start. There's a few more | 382 | // take these values to start. There's a few more |
393 | LLUUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); | 383 | LLUUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); |
394 | LLUUID SessionID = requestMap["session_id"].AsUUID(); | 384 | LLUUID SessionID = requestMap["session_id"].AsUUID(); |
@@ -419,7 +409,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
419 | if (item.ContainsKey("parent_estate_id")) | 409 | if (item.ContainsKey("parent_estate_id")) |
420 | { | 410 | { |
421 | parentEstateID = item["parent_estate_id"].AsInteger(); | 411 | parentEstateID = item["parent_estate_id"].AsInteger(); |
422 | 412 | ||
423 | } | 413 | } |
424 | if (item.ContainsKey("region_id")) | 414 | if (item.ContainsKey("region_id")) |
425 | { | 415 | { |
@@ -437,11 +427,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
437 | 427 | ||
438 | // Locate a home scene suitable for the user. | 428 | // Locate a home scene suitable for the user. |
439 | Scene homeScene = GetRootScene(); | 429 | Scene homeScene = GetRootScene(); |
440 | 430 | ||
441 | if (homeScene != null) | 431 | if (homeScene != null) |
442 | { | 432 | { |
443 | // Get a reference to their Cap object so we can pull out the capobjectroot | 433 | // Get a reference to their Cap object so we can pull out the capobjectroot |
444 | OpenSim.Framework.Communications.Capabilities.Caps userCap = | 434 | OpenSim.Framework.Communications.Capabilities.Caps userCap = |
445 | homeScene.GetCapsHandlerForUser(userData.AgentID); | 435 | homeScene.GetCapsHandlerForUser(userData.AgentID); |
446 | 436 | ||
447 | //Update the circuit data in the region so this user is authorized | 437 | //Update the circuit data in the region so this user is authorized |
@@ -470,7 +460,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
470 | userState.region_id = regionID; | 460 | userState.region_id = regionID; |
471 | userState.src_parent_estate_id = parentEstateID; | 461 | userState.src_parent_estate_id = parentEstateID; |
472 | userState.visible_to_parent = visibleToParent; | 462 | userState.visible_to_parent = visibleToParent; |
473 | 463 | ||
474 | // Save state changes | 464 | // Save state changes |
475 | UpdateOGPState(userData.AgentID, userState); | 465 | UpdateOGPState(userData.AgentID, userState); |
476 | 466 | ||
@@ -481,8 +471,8 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
481 | LLSDArray PositionArray = new LLSDArray(); | 471 | LLSDArray PositionArray = new LLSDArray(); |
482 | PositionArray.Add(LLSD.FromInteger(128)); | 472 | PositionArray.Add(LLSD.FromInteger(128)); |
483 | PositionArray.Add(LLSD.FromInteger(128)); | 473 | PositionArray.Add(LLSD.FromInteger(128)); |
484 | PositionArray.Add(LLSD.FromInteger(40)); | 474 | PositionArray.Add(LLSD.FromInteger(40)); |
485 | 475 | ||
486 | LLSDArray LookAtArray = new LLSDArray(); | 476 | LLSDArray LookAtArray = new LLSDArray(); |
487 | LookAtArray.Add(LLSD.FromInteger(1)); | 477 | LookAtArray.Add(LLSD.FromInteger(1)); |
488 | LookAtArray.Add(LLSD.FromInteger(1)); | 478 | LookAtArray.Add(LLSD.FromInteger(1)); |
@@ -503,44 +493,36 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
503 | responseMap["seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); | 493 | responseMap["seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); |
504 | responseMap["region"] = LLSD.FromUUID(reg.originRegionID); | 494 | responseMap["region"] = LLSD.FromUUID(reg.originRegionID); |
505 | responseMap["look_at"] = LookAtArray; | 495 | responseMap["look_at"] = LookAtArray; |
506 | 496 | ||
507 | responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); | 497 | responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); |
508 | responseMap["sim_host"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());// + ":" + reg.InternalEndPoint.Port.ToString()); | 498 | responseMap["sim_host"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());// + ":" + reg.InternalEndPoint.Port.ToString()); |
509 | responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); | 499 | responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); |
510 | 500 | ||
511 | responseMap["session_id"] = LLSD.FromUUID(SessionID); | 501 | responseMap["session_id"] = LLSD.FromUUID(SessionID); |
512 | responseMap["secure_session_id"] = LLSD.FromUUID(SecureSessionID); | 502 | responseMap["secure_session_id"] = LLSD.FromUUID(SecureSessionID); |
513 | responseMap["circuit_code"] = LLSD.FromInteger(circuitcode); | 503 | responseMap["circuit_code"] = LLSD.FromInteger(circuitcode); |
514 | 504 | ||
515 | responseMap["position"] = PositionArray; | 505 | responseMap["position"] = PositionArray; |
516 | 506 | ||
517 | responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); | 507 | responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); |
518 | 508 | ||
519 | responseMap["sim_access"] = LLSD.FromString("Mature"); | 509 | responseMap["sim_access"] = LLSD.FromString("Mature"); |
520 | 510 | ||
521 | responseMap["connect"] = LLSD.FromBoolean(true); | 511 | responseMap["connect"] = LLSD.FromBoolean(true); |
522 | 512 | ||
523 | m_log.InfoFormat("[OGP]: host: {0}, IP {1}", responseMap["sim_host"].ToString(), responseMap["sim_ip"].ToString()); | 513 | m_log.InfoFormat("[OGP]: host: {0}, IP {1}", responseMap["sim_host"].ToString(), responseMap["sim_ip"].ToString()); |
524 | |||
525 | } | 514 | } |
526 | |||
527 | } | 515 | } |
528 | 516 | ||
529 | return responseMap; | 517 | return responseMap; |
530 | } | 518 | } |
531 | 519 | ||
532 | |||
533 | |||
534 | public LLSD DerezAvatarMethod(string path, LLSD request) | 520 | public LLSD DerezAvatarMethod(string path, LLSD request) |
535 | { | 521 | { |
536 | |||
537 | |||
538 | m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString()); | 522 | m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString()); |
539 | 523 | ||
540 | //LLSD llsdResponse = null; | 524 | //LLSD llsdResponse = null; |
541 | LLSDMap responseMap = new LLSDMap(); | 525 | LLSDMap responseMap = new LLSDMap(); |
542 | |||
543 | |||
544 | 526 | ||
545 | string[] PathArray = path.Split('/'); | 527 | string[] PathArray = path.Split('/'); |
546 | m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); | 528 | m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); |
@@ -549,17 +531,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
549 | LLUUID userUUID = LLUUID.Zero; | 531 | LLUUID userUUID = LLUUID.Zero; |
550 | if (Helpers.TryParse(uuidString, out userUUID)) | 532 | if (Helpers.TryParse(uuidString, out userUUID)) |
551 | { | 533 | { |
552 | |||
553 | LLUUID RemoteID = uuidString; | 534 | LLUUID RemoteID = uuidString; |
554 | LLUUID LocalID = RemoteID; | 535 | LLUUID LocalID = RemoteID; |
555 | // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds | 536 | // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds |
556 | // would be done already.. but the client connects with the Aditi UUID | 537 | // would be done already.. but the client connects with the Aditi UUID |
557 | // regardless over the UDP stack | 538 | // regardless over the UDP stack |
558 | 539 | ||
559 | OGPState userState = GetOGPState(LocalID); | 540 | OGPState userState = GetOGPState(LocalID); |
560 | if (userState.agent_id != LLUUID.Zero) | 541 | if (userState.agent_id != LLUUID.Zero) |
561 | { | 542 | { |
562 | |||
563 | //LLSDMap outboundRequestMap = new LLSDMap(); | 543 | //LLSDMap outboundRequestMap = new LLSDMap(); |
564 | LLSDMap inboundRequestMap = (LLSDMap)request; | 544 | LLSDMap inboundRequestMap = (LLSDMap)request; |
565 | string rezAvatarString = inboundRequestMap["rez_avatar"].AsString(); | 545 | string rezAvatarString = inboundRequestMap["rez_avatar"].AsString(); |
@@ -569,12 +549,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
569 | LookAtArray.Add(LLSD.FromInteger(1)); | 549 | LookAtArray.Add(LLSD.FromInteger(1)); |
570 | LookAtArray.Add(LLSD.FromInteger(1)); | 550 | LookAtArray.Add(LLSD.FromInteger(1)); |
571 | 551 | ||
572 | |||
573 | LLSDArray PositionArray = new LLSDArray(); | 552 | LLSDArray PositionArray = new LLSDArray(); |
574 | PositionArray.Add(LLSD.FromInteger(128)); | 553 | PositionArray.Add(LLSD.FromInteger(128)); |
575 | PositionArray.Add(LLSD.FromInteger(128)); | 554 | PositionArray.Add(LLSD.FromInteger(128)); |
576 | PositionArray.Add(LLSD.FromInteger(40)); | 555 | PositionArray.Add(LLSD.FromInteger(40)); |
577 | 556 | ||
578 | LLSDArray lookArray = new LLSDArray(); | 557 | LLSDArray lookArray = new LLSDArray(); |
579 | lookArray.Add(LLSD.FromInteger(128)); | 558 | lookArray.Add(LLSD.FromInteger(128)); |
580 | lookArray.Add(LLSD.FromInteger(128)); | 559 | lookArray.Add(LLSD.FromInteger(128)); |
@@ -582,11 +561,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
582 | 561 | ||
583 | responseMap["connect"] = LLSD.FromBoolean(true);// it's okay to give this user up | 562 | responseMap["connect"] = LLSD.FromBoolean(true);// it's okay to give this user up |
584 | responseMap["look_at"] = LookAtArray; | 563 | responseMap["look_at"] = LookAtArray; |
585 | 564 | ||
586 | m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name); | 565 | m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name); |
587 | 566 | ||
588 | LLSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); | 567 | LLSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); |
589 | 568 | ||
590 | // If invoking it returned an error, parse and end | 569 | // If invoking it returned an error, parse and end |
591 | if (rezResponseMap.ContainsKey("connect")) | 570 | if (rezResponseMap.ContainsKey("connect")) |
592 | { | 571 | { |
@@ -599,17 +578,16 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
599 | string rezRespSeedCap = rezResponseMap["seed_capability"].AsString(); | 578 | string rezRespSeedCap = rezResponseMap["seed_capability"].AsString(); |
600 | string rezRespSim_ip = rezResponseMap["sim_ip"].AsString(); | 579 | string rezRespSim_ip = rezResponseMap["sim_ip"].AsString(); |
601 | string rezRespSim_host = rezResponseMap["sim_host"].AsString(); | 580 | string rezRespSim_host = rezResponseMap["sim_host"].AsString(); |
602 | 581 | ||
603 | int rrPort = rezResponseMap["sim_port"].AsInteger(); | 582 | int rrPort = rezResponseMap["sim_port"].AsInteger(); |
604 | int rrX = rezResponseMap["region_x"].AsInteger(); | 583 | int rrX = rezResponseMap["region_x"].AsInteger(); |
605 | int rrY = rezResponseMap["region_y"].AsInteger(); | 584 | int rrY = rezResponseMap["region_y"].AsInteger(); |
606 | m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); | 585 | m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); |
607 | LLUUID rrRID = rezResponseMap["region_id"].AsUUID(); | 586 | LLUUID rrRID = rezResponseMap["region_id"].AsUUID(); |
608 | 587 | ||
609 | string rrAccess = rezResponseMap["sim_access"].AsString(); | 588 | string rrAccess = rezResponseMap["sim_access"].AsString(); |
610 | 589 | ||
611 | LLSDArray RezResponsePositionArray = (LLSDArray)rezResponseMap["position"]; | 590 | LLSDArray RezResponsePositionArray = (LLSDArray)rezResponseMap["position"]; |
612 | |||
613 | 591 | ||
614 | responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap); | 592 | responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap); |
615 | responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); | 593 | responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); |
@@ -619,23 +597,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
619 | responseMap["region_y"] = LLSD.FromInteger(rrY ); | 597 | responseMap["region_y"] = LLSD.FromInteger(rrY ); |
620 | responseMap["region_id"] = LLSD.FromUUID(rrRID); | 598 | responseMap["region_id"] = LLSD.FromUUID(rrRID); |
621 | responseMap["sim_access"] = LLSD.FromString(rrAccess); | 599 | responseMap["sim_access"] = LLSD.FromString(rrAccess); |
622 | |||
623 | |||
624 | |||
625 | responseMap["position"] = RezResponsePositionArray; | 600 | responseMap["position"] = RezResponsePositionArray; |
626 | responseMap["look_at"] = lookArray; | 601 | responseMap["look_at"] = lookArray; |
627 | responseMap["connect"] = LLSD.FromBoolean(true); | 602 | responseMap["connect"] = LLSD.FromBoolean(true); |
628 | 603 | ||
629 | ShutdownConnection(LocalID,this); | 604 | ShutdownConnection(LocalID,this); |
630 | 605 | ||
631 | |||
632 | m_log.Warn("RESPONSEDEREZ: " + responseMap.ToString()); | 606 | m_log.Warn("RESPONSEDEREZ: " + responseMap.ToString()); |
633 | return responseMap; | 607 | return responseMap; |
634 | |||
635 | } | 608 | } |
636 | else | 609 | else |
637 | { | 610 | { |
638 | |||
639 | return GenerateNoHandlerMessage(); | 611 | return GenerateNoHandlerMessage(); |
640 | } | 612 | } |
641 | } | 613 | } |
@@ -649,20 +621,18 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
649 | 621 | ||
650 | private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState) | 622 | private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState) |
651 | { | 623 | { |
652 | |||
653 | Scene reg = GetRootScene(); | 624 | Scene reg = GetRootScene(); |
654 | 625 | ||
655 | WebRequest DeRezRequest = WebRequest.Create(CapAddress); | 626 | WebRequest DeRezRequest = WebRequest.Create(CapAddress); |
656 | DeRezRequest.Method = "POST"; | 627 | DeRezRequest.Method = "POST"; |
657 | DeRezRequest.ContentType = "application/xml+llsd"; | 628 | DeRezRequest.ContentType = "application/xml+llsd"; |
658 | |||
659 | 629 | ||
660 | LLSDMap RAMap = new LLSDMap(); | 630 | LLSDMap RAMap = new LLSDMap(); |
661 | LLSDMap AgentParms = new LLSDMap(); | 631 | LLSDMap AgentParms = new LLSDMap(); |
662 | LLSDMap RegionParms = new LLSDMap(); | 632 | LLSDMap RegionParms = new LLSDMap(); |
663 | 633 | ||
664 | LLSDArray Parameter = new LLSDArray(2); | 634 | LLSDArray Parameter = new LLSDArray(2); |
665 | 635 | ||
666 | LLSDMap version = new LLSDMap(); | 636 | LLSDMap version = new LLSDMap(); |
667 | version["version"] = LLSD.FromInteger(userState.src_version); | 637 | version["version"] = LLSD.FromInteger(userState.src_version); |
668 | Parameter.Add((LLSD)version); | 638 | Parameter.Add((LLSD)version); |
@@ -673,7 +643,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
673 | SrcData["region_id"] = LLSD.FromUUID(reg.RegionInfo.originRegionID); | 643 | SrcData["region_id"] = LLSD.FromUUID(reg.RegionInfo.originRegionID); |
674 | SrcData["visible_to_parent"] = LLSD.FromBoolean(userState.visible_to_parent); | 644 | SrcData["visible_to_parent"] = LLSD.FromBoolean(userState.visible_to_parent); |
675 | Parameter.Add((LLSD)SrcData); | 645 | Parameter.Add((LLSD)SrcData); |
676 | 646 | ||
677 | AgentParms["first_name"] = LLSD.FromString(userState.first_name); | 647 | AgentParms["first_name"] = LLSD.FromString(userState.first_name); |
678 | AgentParms["last_name"] = LLSD.FromString(userState.last_name); | 648 | AgentParms["last_name"] = LLSD.FromString(userState.last_name); |
679 | AgentParms["agent_id"] = LLSD.FromUUID(userState.agent_id); | 649 | AgentParms["agent_id"] = LLSD.FromUUID(userState.agent_id); |
@@ -689,13 +659,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
689 | AgentParms["age_verified"] = LLSD.FromBoolean(userState.age_verified); | 659 | AgentParms["age_verified"] = LLSD.FromBoolean(userState.age_verified); |
690 | AgentParms["limited_to_estate"] = LLSD.FromInteger(userState.limited_to_estate); | 660 | AgentParms["limited_to_estate"] = LLSD.FromInteger(userState.limited_to_estate); |
691 | AgentParms["inventory_host"] = LLSD.FromString(userState.inventory_host); | 661 | AgentParms["inventory_host"] = LLSD.FromString(userState.inventory_host); |
692 | 662 | ||
693 | // version 1 | 663 | // version 1 |
694 | RAMap = AgentParms; | 664 | RAMap = AgentParms; |
695 | 665 | ||
696 | // Planned for version 2 | 666 | // Planned for version 2 |
697 | // RAMap["agent_params"] = AgentParms; | 667 | // RAMap["agent_params"] = AgentParms; |
698 | |||
699 | 668 | ||
700 | RAMap["region_params"] = RegionParms; | 669 | RAMap["region_params"] = RegionParms; |
701 | RAMap["parameter"] = Parameter; | 670 | RAMap["parameter"] = Parameter; |
@@ -770,15 +739,13 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
770 | return responseMap; | 739 | return responseMap; |
771 | } | 740 | } |
772 | 741 | ||
773 | |||
774 | |||
775 | public LLSD GenerateNoHandlerMessage() | 742 | public LLSD GenerateNoHandlerMessage() |
776 | { | 743 | { |
777 | LLSDMap map = new LLSDMap(); | 744 | LLSDMap map = new LLSDMap(); |
778 | map["reason"] = LLSD.FromString("LLSDRequest"); | 745 | map["reason"] = LLSD.FromString("LLSDRequest"); |
779 | map["message"] = LLSD.FromString("No handler registered for LLSD Requests"); | 746 | map["message"] = LLSD.FromString("No handler registered for LLSD Requests"); |
780 | map["login"] = LLSD.FromString("false"); | 747 | map["login"] = LLSD.FromString("false"); |
781 | 748 | ||
782 | return map; | 749 | return map; |
783 | } | 750 | } |
784 | 751 | ||
@@ -802,7 +769,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
802 | CapsLoginID.Remove(path); | 769 | CapsLoginID.Remove(path); |
803 | } | 770 | } |
804 | 771 | ||
805 | |||
806 | private Scene GetRootScene() | 772 | private Scene GetRootScene() |
807 | { | 773 | { |
808 | Scene ReturnScene = null; | 774 | Scene ReturnScene = null; |
@@ -815,9 +781,8 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
815 | } | 781 | } |
816 | 782 | ||
817 | return ReturnScene; | 783 | return ReturnScene; |
818 | |||
819 | } | 784 | } |
820 | 785 | ||
821 | private ulong GetOSCompatibleRegionHandle(RegionInfo reg) | 786 | private ulong GetOSCompatibleRegionHandle(RegionInfo reg) |
822 | { | 787 | { |
823 | return Util.UIntsToLong(reg.RegionLocX, reg.RegionLocY); | 788 | return Util.UIntsToLong(reg.RegionLocX, reg.RegionLocY); |
@@ -849,7 +814,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
849 | returnState.src_version = 1; | 814 | returnState.src_version = 1; |
850 | returnState.src_parent_estate_id = 1; | 815 | returnState.src_parent_estate_id = 1; |
851 | returnState.visible_to_parent = true; | 816 | returnState.visible_to_parent = true; |
852 | 817 | ||
853 | return returnState; | 818 | return returnState; |
854 | } | 819 | } |
855 | 820 | ||
@@ -871,9 +836,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
871 | public void DeleteOGPState(LLUUID agentId) | 836 | public void DeleteOGPState(LLUUID agentId) |
872 | { | 837 | { |
873 | lock (m_OGPState) | 838 | lock (m_OGPState) |
839 | { | ||
874 | if (m_OGPState.ContainsKey(agentId)) | 840 | if (m_OGPState.ContainsKey(agentId)) |
875 | m_OGPState.Remove(agentId); | 841 | m_OGPState.Remove(agentId); |
876 | 842 | } | |
877 | } | 843 | } |
878 | 844 | ||
879 | private void UpdateOGPState(LLUUID agentId, OGPState state) | 845 | private void UpdateOGPState(LLUUID agentId, OGPState state) |
@@ -884,12 +850,13 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
884 | { | 850 | { |
885 | m_OGPState[agentId] = state; | 851 | m_OGPState[agentId] = state; |
886 | } | 852 | } |
887 | else | 853 | else |
888 | { | 854 | { |
889 | m_OGPState.Add(agentId,state); | 855 | m_OGPState.Add(agentId,state); |
890 | } | 856 | } |
891 | } | 857 | } |
892 | } | 858 | } |
859 | |||
893 | public void ShutdownConnection(LLUUID avatarId, OpenGridProtocolModule mod) | 860 | public void ShutdownConnection(LLUUID avatarId, OpenGridProtocolModule mod) |
894 | { | 861 | { |
895 | Scene homeScene = GetRootScene(); | 862 | Scene homeScene = GetRootScene(); |
@@ -903,22 +870,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
903 | ta.Start(); | 870 | ta.Start(); |
904 | } | 871 | } |
905 | } | 872 | } |
873 | |||
906 | // Temporary hack to allow teleporting to and from Vaak | 874 | // Temporary hack to allow teleporting to and from Vaak |
907 | private static bool customXertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) | 875 | private static bool customXertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) |
908 | { | 876 | { |
909 | |||
910 | //if (cert.Subject == "E=root@lindenlab.com, CN=*.vaak.lindenlab.com, O=\"Linden Lab, Inc.\", L=San Francisco, S=California, C=US") | 877 | //if (cert.Subject == "E=root@lindenlab.com, CN=*.vaak.lindenlab.com, O=\"Linden Lab, Inc.\", L=San Francisco, S=California, C=US") |
911 | //{ | 878 | //{ |
912 | |||
913 | return true; | 879 | return true; |
914 | |||
915 | //} | 880 | //} |
916 | 881 | ||
917 | //return false; | 882 | //return false; |
918 | |||
919 | } | 883 | } |
920 | |||
921 | |||
922 | } | 884 | } |
923 | 885 | ||
924 | public class KillAUser | 886 | public class KillAUser |
@@ -944,7 +906,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
944 | avToBeKilled.ControllingClient.SendLogoutPacketWhenClosing = false; | 906 | avToBeKilled.ControllingClient.SendLogoutPacketWhenClosing = false; |
945 | 907 | ||
946 | Thread.Sleep(30000); | 908 | Thread.Sleep(30000); |
947 | 909 | ||
948 | // test for child agent because they might have come back | 910 | // test for child agent because they might have come back |
949 | if (avToBeKilled.IsChildAgent) | 911 | if (avToBeKilled.IsChildAgent) |
950 | { | 912 | { |
@@ -953,12 +915,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
953 | } | 915 | } |
954 | } | 916 | } |
955 | } | 917 | } |
956 | |||
957 | } | 918 | } |
919 | |||
958 | public class MonoCert : ICertificatePolicy | 920 | public class MonoCert : ICertificatePolicy |
959 | { | 921 | { |
960 | |||
961 | |||
962 | #region ICertificatePolicy Members | 922 | #region ICertificatePolicy Members |
963 | 923 | ||
964 | public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) | 924 | public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs index 5e22e57..0b68c5f 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs | |||
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
59 | /// Path for terrains. Technically these may be assets, but I think it's quite nice to split them out. | 59 | /// Path for terrains. Technically these may be assets, but I think it's quite nice to split them out. |
60 | /// </summary> | 60 | /// </summary> |
61 | public static readonly string TERRAINS_PATH = "terrains/"; | 61 | public static readonly string TERRAINS_PATH = "terrains/"; |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// The character the separates the uuid from extension information in an archived asset filename | 64 | /// The character the separates the uuid from extension information in an archived asset filename |
65 | /// </summary> | 65 | /// </summary> |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index 201986e..89f5fd7 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -212,16 +212,16 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
212 | // Right now we're nastily obtaining the lluuid from the filename | 212 | // Right now we're nastily obtaining the lluuid from the filename |
213 | string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); | 213 | string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); |
214 | int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR); | 214 | int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR); |
215 | 215 | ||
216 | if (i == -1) | 216 | if (i == -1) |
217 | { | 217 | { |
218 | m_log.ErrorFormat( | 218 | m_log.ErrorFormat( |
219 | "[ARCHIVER]: Could not find extension information in asset path {0} since it's missing the separator {1}. Skipping", | 219 | "[ARCHIVER]: Could not find extension information in asset path {0} since it's missing the separator {1}. Skipping", |
220 | assetPath, ArchiveConstants.ASSET_EXTENSION_SEPARATOR); | 220 | assetPath, ArchiveConstants.ASSET_EXTENSION_SEPARATOR); |
221 | 221 | ||
222 | return false; | 222 | return false; |
223 | } | 223 | } |
224 | 224 | ||
225 | string extension = filename.Substring(i); | 225 | string extension = filename.Substring(i); |
226 | string uuid = filename.Remove(filename.Length - extension.Length); | 226 | string uuid = filename.Remove(filename.Length - extension.Length); |
227 | 227 | ||
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 2d27b11..c1f5566 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -315,13 +315,13 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
315 | public event RegionHandleRequest OnRegionHandleRequest; | 315 | public event RegionHandleRequest OnRegionHandleRequest; |
316 | public event ParcelInfoRequest OnParcelInfoRequest; | 316 | public event ParcelInfoRequest OnParcelInfoRequest; |
317 | 317 | ||
318 | public event ActivateGesture OnActivateGesture; | 318 | public event ActivateGesture OnActivateGesture; |
319 | public event DeactivateGesture OnDeactivateGesture; | 319 | public event DeactivateGesture OnDeactivateGesture; |
320 | 320 | ||
321 | #pragma warning restore 67 | 321 | #pragma warning restore 67 |
322 | 322 | ||
323 | #endregion | 323 | #endregion |
324 | 324 | ||
325 | public void ActivateGesture(LLUUID assetId, LLUUID gestureId) | 325 | public void ActivateGesture(LLUUID assetId, LLUUID gestureId) |
326 | { | 326 | { |
327 | } | 327 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs index 2ae4174..bfb5016 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs | |||
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
103 | 103 | ||
104 | Bitmap mapbmp = new Bitmap(256, 256); | 104 | Bitmap mapbmp = new Bitmap(256, 256); |
105 | //long t = System.Environment.TickCount; | 105 | //long t = System.Environment.TickCount; |
106 | //for(int i = 0; i < 10; ++i) { | 106 | //for (int i = 0; i < 10; ++i) { |
107 | terrainRenderer.TerrainToBitmap(mapbmp); | 107 | terrainRenderer.TerrainToBitmap(mapbmp); |
108 | //} | 108 | //} |
109 | //t = System.Environment.TickCount - t; | 109 | //t = System.Environment.TickCount - t; |
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs index 253a7f5..1ee86ba 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs | |||
@@ -97,8 +97,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
97 | // No, that doesn't scale it: | 97 | // No, that doesn't scale it: |
98 | // heightvalue = low + mid * (heightvalue - low) / mid; => low + (heightvalue - low) * mid / mid = low + (heightvalue - low) * 1 = low + heightvalue - low = heightvalue | 98 | // heightvalue = low + mid * (heightvalue - low) / mid; => low + (heightvalue - low) * mid / mid = low + (heightvalue - low) * 1 = low + heightvalue - low = heightvalue |
99 | 99 | ||
100 | |||
101 | |||
102 | if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue)) | 100 | if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue)) |
103 | heightvalue = 0; | 101 | heightvalue = 0; |
104 | else if (heightvalue > 255f) | 102 | else if (heightvalue > 255f) |
@@ -136,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
136 | int hfdiffi = 0; | 134 | int hfdiffi = 0; |
137 | int hfdiffihighlight = 0; | 135 | int hfdiffihighlight = 0; |
138 | float highlightfactor = 0.18f; | 136 | float highlightfactor = 0.18f; |
139 | 137 | ||
140 | try | 138 | try |
141 | { | 139 | { |
142 | // hfdiffi = Math.Abs((int)((hfdiff * 4) + (hfdiff * 0.5))) + 1; | 140 | // hfdiffi = Math.Abs((int)((hfdiff * 4) + (hfdiff * 0.5))) + 1; |
@@ -146,7 +144,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
146 | // hfdiffi = hfdiffi + Math.Abs((int)(((hfdiff % 1) * 0.5f) * 10f) - 1); | 144 | // hfdiffi = hfdiffi + Math.Abs((int)(((hfdiff % 1) * 0.5f) * 10f) - 1); |
147 | hfdiffi = hfdiffi + Math.Abs((int)((hfdiff % 1f) * 5f) - 1); | 145 | hfdiffi = hfdiffi + Math.Abs((int)((hfdiff % 1f) * 5f) - 1); |
148 | } | 146 | } |
149 | 147 | ||
150 | hfdiffihighlight = Math.Abs((int)((hfdiff * highlightfactor) * 4.5f)) + 1; | 148 | hfdiffihighlight = Math.Abs((int)((hfdiff * highlightfactor) * 4.5f)) + 1; |
151 | if (hfdiff % 1f != 0) | 149 | if (hfdiff % 1f != 0) |
152 | { | 150 | { |
@@ -195,10 +193,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
195 | color = Color.FromArgb((r - hfdiffi > 0) ? r - hfdiffi : 0, | 193 | color = Color.FromArgb((r - hfdiffi > 0) ? r - hfdiffi : 0, |
196 | (g - hfdiffi > 0) ? g - hfdiffi : 0, | 194 | (g - hfdiffi > 0) ? g - hfdiffi : 0, |
197 | (b - hfdiffi > 0) ? b - hfdiffi : 0); | 195 | (b - hfdiffi > 0) ? b - hfdiffi : 0); |
198 | 196 | ||
199 | mapbmp.SetPixel(x-1, yr+1, color); | 197 | mapbmp.SetPixel(x-1, yr+1, color); |
200 | } | 198 | } |
201 | |||
202 | } | 199 | } |
203 | } | 200 | } |
204 | } | 201 | } |
@@ -213,7 +210,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
213 | color = Color.Black; | 210 | color = Color.Black; |
214 | mapbmp.SetPixel(x, yr, color); | 211 | mapbmp.SetPixel(x, yr, color); |
215 | } | 212 | } |
216 | |||
217 | } | 213 | } |
218 | else | 214 | else |
219 | { | 215 | { |
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs index 957a1df..615befc 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs | |||
@@ -82,10 +82,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
82 | // (for info about algorithm, see http://en.wikipedia.org/wiki/HSL_and_HSV) | 82 | // (for info about algorithm, see http://en.wikipedia.org/wiki/HSL_and_HSV) |
83 | public Color toColor() | 83 | public Color toColor() |
84 | { | 84 | { |
85 | if(s < 0f) Console.WriteLine("S < 0: " + s); | 85 | if (s < 0f) Console.WriteLine("S < 0: " + s); |
86 | else if(s > 1f) Console.WriteLine("S > 1: " + s); | 86 | else if (s > 1f) Console.WriteLine("S > 1: " + s); |
87 | if(v < 0f) Console.WriteLine("V < 0: " + v); | 87 | if (v < 0f) Console.WriteLine("V < 0: " + v); |
88 | else if(v > 1f) Console.WriteLine("V > 1: " + v); | 88 | else if (v > 1f) Console.WriteLine("V > 1: " + v); |
89 | 89 | ||
90 | float f = h / 60f; | 90 | float f = h / 60f; |
91 | int sector = (int)f % 6; | 91 | int sector = (int)f % 6; |
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
95 | int ti = (int)(v * (1f - (1f - f) * s) * 255f); | 95 | int ti = (int)(v * (1f - (1f - f) * s) * 255f); |
96 | int vi = (int)(v * 255f); | 96 | int vi = (int)(v * 255f); |
97 | 97 | ||
98 | switch(sector) | 98 | switch (sector) |
99 | { | 99 | { |
100 | case 0: | 100 | case 0: |
101 | return Color.FromArgb(vi, ti, pi); | 101 | return Color.FromArgb(vi, ti, pi); |
@@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
168 | { | 168 | { |
169 | AssetBase asset = m_scene.AssetCache.GetAsset(id, true); | 169 | AssetBase asset = m_scene.AssetCache.GetAsset(id, true); |
170 | m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null); | 170 | m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null); |
171 | if(asset == null) return null; | 171 | if (asset == null) return null; |
172 | return new Bitmap(OpenJPEG.DecodeToImage(asset.Data)); | 172 | return new Bitmap(OpenJPEG.DecodeToImage(asset.Data)); |
173 | } | 173 | } |
174 | 174 | ||
@@ -179,9 +179,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
179 | // color-channel, so 2^24 is the maximum value we can get, adding everything. | 179 | // color-channel, so 2^24 is the maximum value we can get, adding everything. |
180 | // int is be big enough for that. | 180 | // int is be big enough for that. |
181 | int r = 0, g = 0, b = 0; | 181 | int r = 0, g = 0, b = 0; |
182 | for(int y = 0; y < bmp.Height; ++y) | 182 | for (int y = 0; y < bmp.Height; ++y) |
183 | { | 183 | { |
184 | for(int x = 0; x < bmp.Width; ++x) | 184 | for (int x = 0; x < bmp.Width; ++x) |
185 | { | 185 | { |
186 | Color c = bmp.GetPixel(x, y); | 186 | Color c = bmp.GetPixel(x, y); |
187 | r += (int)c.R & 0xff; | 187 | r += (int)c.R & 0xff; |
@@ -218,14 +218,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
218 | 218 | ||
219 | // interpolate two colors in HSV space and return the resulting color | 219 | // interpolate two colors in HSV space and return the resulting color |
220 | private HSV interpolateHSV(ref HSV c1, ref HSV c2, float ratio) { | 220 | private HSV interpolateHSV(ref HSV c1, ref HSV c2, float ratio) { |
221 | if(ratio <= 0f) return c1; | 221 | if (ratio <= 0f) return c1; |
222 | if(ratio >= 1f) return c2; | 222 | if (ratio >= 1f) return c2; |
223 | 223 | ||
224 | // make sure we are on the same side on the hue-circle for interpolation | 224 | // make sure we are on the same side on the hue-circle for interpolation |
225 | // We change the hue of the parameters here, but we don't change the color | 225 | // We change the hue of the parameters here, but we don't change the color |
226 | // represented by that value | 226 | // represented by that value |
227 | if(c1.h - c2.h > 180f) c1.h -= 360f; | 227 | if (c1.h - c2.h > 180f) c1.h -= 360f; |
228 | else if(c2.h - c1.h > 180f) c1.h += 360f; | 228 | else if (c2.h - c1.h > 180f) c1.h += 360f; |
229 | 229 | ||
230 | return new HSV(c1.h * (1f - ratio) + c2.h * ratio, | 230 | return new HSV(c1.h * (1f - ratio) + c2.h * ratio, |
231 | c1.s * (1f - ratio) + c2.s * ratio, | 231 | c1.s * (1f - ratio) + c2.s * ratio, |
@@ -321,16 +321,16 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
321 | } | 321 | } |
322 | 322 | ||
323 | HSV hsv; | 323 | HSV hsv; |
324 | if(hmod <= low) hsv = hsv1; // too low | 324 | if (hmod <= low) hsv = hsv1; // too low |
325 | else if(hmod >= high) hsv = hsv4; // too high | 325 | else if (hmod >= high) hsv = hsv4; // too high |
326 | else | 326 | else |
327 | { | 327 | { |
328 | // HSV-interpolate along the colors | 328 | // HSV-interpolate along the colors |
329 | // first, rescale h to 0.0 - 1.0 | 329 | // first, rescale h to 0.0 - 1.0 |
330 | hmod = (hmod - low) / (high - low); | 330 | hmod = (hmod - low) / (high - low); |
331 | // now we have to split: 0.00 => color1, 0.33 => color2, 0.67 => color3, 1.00 => color4 | 331 | // now we have to split: 0.00 => color1, 0.33 => color2, 0.67 => color3, 1.00 => color4 |
332 | if(hmod < 1f/3f) hsv = interpolateHSV(ref hsv1, ref hsv2, hmod * 3f); | 332 | if (hmod < 1f/3f) hsv = interpolateHSV(ref hsv1, ref hsv2, hmod * 3f); |
333 | else if(hmod < 2f/3f) hsv = interpolateHSV(ref hsv2, ref hsv3, (hmod * 3f) - 1f); | 333 | else if (hmod < 2f/3f) hsv = interpolateHSV(ref hsv2, ref hsv3, (hmod * 3f) - 1f); |
334 | else hsv = interpolateHSV(ref hsv3, ref hsv4, (hmod * 3f) - 2f); | 334 | else hsv = interpolateHSV(ref hsv3, ref hsv4, (hmod * 3f) - 2f); |
335 | } | 335 | } |
336 | 336 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 424c56c..0bd0028 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -276,8 +276,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
276 | if (m_storageManager.EstateDataStore != null) | 276 | if (m_storageManager.EstateDataStore != null) |
277 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); | 277 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); |
278 | 278 | ||
279 | |||
280 | |||
281 | //Bind Storage Manager functions to some land manager functions for this scene | 279 | //Bind Storage Manager functions to some land manager functions for this scene |
282 | EventManager.OnLandObjectAdded += | 280 | EventManager.OnLandObjectAdded += |
283 | new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject); | 281 | new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject); |
@@ -322,7 +320,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
322 | { | 320 | { |
323 | m_log.Warn("Failed to load StartupConfig"); | 321 | m_log.Warn("Failed to load StartupConfig"); |
324 | } | 322 | } |
325 | |||
326 | } | 323 | } |
327 | 324 | ||
328 | #endregion | 325 | #endregion |
@@ -351,7 +348,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
351 | // we add it to the notify list regardless of distance. | 348 | // we add it to the notify list regardless of distance. |
352 | // We'll check the agent's draw distance before notifying them though. | 349 | // We'll check the agent's draw distance before notifying them though. |
353 | 350 | ||
354 | |||
355 | if (RegionInfo.RegionHandle != otherRegion.RegionHandle) | 351 | if (RegionInfo.RegionHandle != otherRegion.RegionHandle) |
356 | { | 352 | { |
357 | for (int i = 0; i < m_neighbours.Count; i++) | 353 | for (int i = 0; i < m_neighbours.Count; i++) |
@@ -386,8 +382,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
386 | 382 | ||
387 | int resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX); | 383 | int resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX); |
388 | int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY); | 384 | int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY); |
389 | if ((resultX <= 1) && | 385 | if (resultX <= 1 && resultY <= 1) |
390 | (resultY <= 1)) | ||
391 | { | 386 | { |
392 | try | 387 | try |
393 | { | 388 | { |
@@ -584,8 +579,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
584 | } | 579 | } |
585 | } | 580 | } |
586 | } | 581 | } |
587 | |||
588 | |||
589 | } | 582 | } |
590 | m_scripts_enabled = !ScriptEngine; | 583 | m_scripts_enabled = !ScriptEngine; |
591 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); | 584 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); |
@@ -600,7 +593,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
600 | public int GetInaccurateNeighborCount() | 593 | public int GetInaccurateNeighborCount() |
601 | { | 594 | { |
602 | lock (m_neighbours) | 595 | lock (m_neighbours) |
596 | { | ||
603 | return m_neighbours.Count; | 597 | return m_neighbours.Count; |
598 | } | ||
604 | } | 599 | } |
605 | 600 | ||
606 | // This is the method that shuts down the scene. | 601 | // This is the method that shuts down the scene. |
@@ -1062,7 +1057,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1062 | float hfdiff = hfvalue; | 1057 | float hfdiff = hfvalue; |
1063 | int hfdiffi = 0; | 1058 | int hfdiffi = 0; |
1064 | 1059 | ||
1065 | |||
1066 | for (int x = 0; x < 256; x++) | 1060 | for (int x = 0; x < 256; x++) |
1067 | { | 1061 | { |
1068 | //int tc = System.Environment.TickCount; | 1062 | //int tc = System.Environment.TickCount; |
@@ -1087,10 +1081,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1087 | //float tmpval = (float)hm[x, y]; | 1081 | //float tmpval = (float)hm[x, y]; |
1088 | float heightvalue = (float)hm[x, y]; | 1082 | float heightvalue = (float)hm[x, y]; |
1089 | 1083 | ||
1090 | |||
1091 | if (heightvalue > (float)m_regInfo.RegionSettings.WaterHeight) | 1084 | if (heightvalue > (float)m_regInfo.RegionSettings.WaterHeight) |
1092 | { | 1085 | { |
1093 | |||
1094 | // scale height value | 1086 | // scale height value |
1095 | heightvalue = low + mid * (heightvalue - low) / mid; | 1087 | heightvalue = low + mid * (heightvalue - low) / mid; |
1096 | 1088 | ||
@@ -1102,6 +1094,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1102 | 1094 | ||
1103 | if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue)) | 1095 | if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue)) |
1104 | heightvalue = 0; | 1096 | heightvalue = 0; |
1097 | |||
1105 | try | 1098 | try |
1106 | { | 1099 | { |
1107 | Color green = Color.FromArgb((int)heightvalue, 100, (int)heightvalue); | 1100 | Color green = Color.FromArgb((int)heightvalue, 100, (int)heightvalue); |
@@ -1136,7 +1129,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1136 | // we use floats, colors use bytes, so shrink are space down to | 1129 | // we use floats, colors use bytes, so shrink are space down to |
1137 | // 0-255 | 1130 | // 0-255 |
1138 | 1131 | ||
1139 | |||
1140 | try | 1132 | try |
1141 | { | 1133 | { |
1142 | hfdiffi = Math.Abs((int)((hfdiff * 4) + (hfdiff * 0.5))) + 1; | 1134 | hfdiffi = Math.Abs((int)((hfdiff * 4) + (hfdiff * 0.5))) + 1; |
@@ -1166,15 +1158,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1166 | mapbmp.SetPixel(x - 1, (256 - y) - 1, Shade); | 1158 | mapbmp.SetPixel(x - 1, (256 - y) - 1, Shade); |
1167 | } | 1159 | } |
1168 | } | 1160 | } |
1169 | |||
1170 | |||
1171 | } | 1161 | } |
1172 | |||
1173 | } | 1162 | } |
1174 | |||
1175 | |||
1176 | |||
1177 | |||
1178 | } | 1163 | } |
1179 | catch (System.ArgumentException) | 1164 | catch (System.ArgumentException) |
1180 | { | 1165 | { |
@@ -1264,7 +1249,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1264 | if (part == null) | 1249 | if (part == null) |
1265 | continue; | 1250 | continue; |
1266 | 1251 | ||
1267 | |||
1268 | // Draw if the object is at least 1 meter wide in any direction | 1252 | // Draw if the object is at least 1 meter wide in any direction |
1269 | if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f) | 1253 | if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f) |
1270 | { | 1254 | { |
@@ -1426,6 +1410,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1426 | } | 1410 | } |
1427 | } | 1411 | } |
1428 | } | 1412 | } |
1413 | |||
1429 | public void LazySaveGeneratedMaptile(byte[] data, bool temporary) | 1414 | public void LazySaveGeneratedMaptile(byte[] data, bool temporary) |
1430 | { | 1415 | { |
1431 | // Overwrites the local Asset cache with new maptile data | 1416 | // Overwrites the local Asset cache with new maptile data |
@@ -1482,6 +1467,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1482 | asset.Temporary = temporary; | 1467 | asset.Temporary = temporary; |
1483 | AssetCache.AddAsset(asset); | 1468 | AssetCache.AddAsset(asset); |
1484 | } | 1469 | } |
1470 | |||
1485 | #endregion | 1471 | #endregion |
1486 | 1472 | ||
1487 | #region Load Land | 1473 | #region Load Land |
@@ -1556,6 +1542,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1556 | pos = RayEnd; | 1542 | pos = RayEnd; |
1557 | return pos; | 1543 | return pos; |
1558 | } | 1544 | } |
1545 | |||
1559 | if (RayTargetID != LLUUID.Zero) | 1546 | if (RayTargetID != LLUUID.Zero) |
1560 | { | 1547 | { |
1561 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); | 1548 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); |
@@ -1921,9 +1908,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1921 | if (position.X > Constants.RegionSize + 0.1f) | 1908 | if (position.X > Constants.RegionSize + 0.1f) |
1922 | { | 1909 | { |
1923 | pos.X = ((pos.X - Constants.RegionSize)); | 1910 | pos.X = ((pos.X - Constants.RegionSize)); |
1924 | |||
1925 | newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize)); | 1911 | newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize)); |
1926 | |||
1927 | // x + 1 | 1912 | // x + 1 |
1928 | } | 1913 | } |
1929 | else if (position.X < -0.1f) | 1914 | else if (position.X < -0.1f) |
@@ -2165,9 +2150,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2165 | client.OnScriptReset += ProcessScriptReset; | 2150 | client.OnScriptReset += ProcessScriptReset; |
2166 | client.OnGetScriptRunning += GetScriptRunning; | 2151 | client.OnGetScriptRunning += GetScriptRunning; |
2167 | client.OnSetScriptRunning += SetScriptRunning; | 2152 | client.OnSetScriptRunning += SetScriptRunning; |
2168 | |||
2169 | client.OnRegionHandleRequest += RegionHandleRequest; | 2153 | client.OnRegionHandleRequest += RegionHandleRequest; |
2170 | |||
2171 | client.OnUnackedTerrain += TerrainUnAcked; | 2154 | client.OnUnackedTerrain += TerrainUnAcked; |
2172 | 2155 | ||
2173 | //Gesture | 2156 | //Gesture |
@@ -2185,7 +2168,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
2185 | 2168 | ||
2186 | if (userInfo != null) | 2169 | if (userInfo != null) |
2187 | { | 2170 | { |
2188 | |||
2189 | InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId); | 2171 | InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId); |
2190 | if (item != null) | 2172 | if (item != null) |
2191 | { | 2173 | { |
@@ -2206,7 +2188,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
2206 | 2188 | ||
2207 | if (userInfo != null) | 2189 | if (userInfo != null) |
2208 | { | 2190 | { |
2209 | |||
2210 | InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId); | 2191 | InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId); |
2211 | if (item != null) | 2192 | if (item != null) |
2212 | { | 2193 | { |
@@ -2607,7 +2588,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
2607 | "[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}", | 2588 | "[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}", |
2608 | agent.AgentID, regionHandle, RegionInfo.RegionName); | 2589 | agent.AgentID, regionHandle, RegionInfo.RegionName); |
2609 | } | 2590 | } |
2610 | |||
2611 | } | 2591 | } |
2612 | 2592 | ||
2613 | public void UpdateCircuitData(AgentCircuitData data) | 2593 | public void UpdateCircuitData(AgentCircuitData data) |
@@ -2645,9 +2625,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2645 | m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString()); | 2625 | m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString()); |
2646 | } | 2626 | } |
2647 | } | 2627 | } |
2648 | |||
2649 | |||
2650 | } | 2628 | } |
2629 | |||
2651 | /// <summary> | 2630 | /// <summary> |
2652 | /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent, | 2631 | /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent, |
2653 | /// then it is replaced by a new CAPS handler. | 2632 | /// then it is replaced by a new CAPS handler. |
@@ -2905,14 +2884,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2905 | public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position) | 2884 | public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position) |
2906 | { | 2885 | { |
2907 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); | 2886 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); |
2908 | 2887 | ||
2909 | if (info == null) | 2888 | if (info == null) |
2910 | { | 2889 | { |
2911 | // can't find the region: Tell viewer and abort | 2890 | // can't find the region: Tell viewer and abort |
2912 | remoteClient.SendTeleportFailed("The teleport destination could not be found."); | 2891 | remoteClient.SendTeleportFailed("The teleport destination could not be found."); |
2913 | return; | 2892 | return; |
2914 | } | 2893 | } |
2915 | 2894 | ||
2916 | lock (m_scenePresences) | 2895 | lock (m_scenePresences) |
2917 | { | 2896 | { |
2918 | if (m_scenePresences.ContainsKey(remoteClient.AgentId)) | 2897 | if (m_scenePresences.ContainsKey(remoteClient.AgentId)) |
@@ -3016,7 +2995,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
3016 | m_statsReporter.SetObjectCapacity(objects); | 2995 | m_statsReporter.SetObjectCapacity(objects); |
3017 | } | 2996 | } |
3018 | objectCapacity = objects; | 2997 | objectCapacity = objects; |
3019 | |||
3020 | } | 2998 | } |
3021 | 2999 | ||
3022 | public List<FriendListItem> GetFriendList(LLUUID avatarID) | 3000 | public List<FriendListItem> GetFriendList(LLUUID avatarID) |
@@ -3089,7 +3067,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
3089 | return LLUUID.Zero; | 3067 | return LLUUID.Zero; |
3090 | } | 3068 | } |
3091 | 3069 | ||
3092 | |||
3093 | /// <summary> | 3070 | /// <summary> |
3094 | /// This method is a way for the Friends Module to create an instant | 3071 | /// This method is a way for the Friends Module to create an instant |
3095 | /// message to the avatar and for Instant Messages that travel across | 3072 | /// message to the avatar and for Instant Messages that travel across |
@@ -3105,7 +3082,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
3105 | m_eventManager.TriggerGridInstantMessage(message, options); | 3082 | m_eventManager.TriggerGridInstantMessage(message, options); |
3106 | } | 3083 | } |
3107 | 3084 | ||
3108 | |||
3109 | public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms) | 3085 | public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms) |
3110 | { | 3086 | { |
3111 | // TODO: m_sceneGridService.DoStuff; | 3087 | // TODO: m_sceneGridService.DoStuff; |
@@ -3123,6 +3099,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3123 | // TODO: m_sceneGridService.DoStuff; | 3099 | // TODO: m_sceneGridService.DoStuff; |
3124 | m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID); | 3100 | m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID); |
3125 | } | 3101 | } |
3102 | |||
3126 | public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID) | 3103 | public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID) |
3127 | { | 3104 | { |
3128 | // TODO: m_sceneGridService.DoStuff; | 3105 | // TODO: m_sceneGridService.DoStuff; |
@@ -3135,11 +3112,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
3135 | m_statsReporter.AddOutPackets(outPackets); | 3112 | m_statsReporter.AddOutPackets(outPackets); |
3136 | m_statsReporter.AddunAckedBytes(unAckedBytes); | 3113 | m_statsReporter.AddunAckedBytes(unAckedBytes); |
3137 | } | 3114 | } |
3115 | |||
3138 | public void AddAgentTime(int ms) | 3116 | public void AddAgentTime(int ms) |
3139 | { | 3117 | { |
3140 | m_statsReporter.addFrameMS(ms); | 3118 | m_statsReporter.addFrameMS(ms); |
3141 | m_statsReporter.addAgentMS(ms); | 3119 | m_statsReporter.addAgentMS(ms); |
3142 | } | 3120 | } |
3121 | |||
3143 | public void AddAgentUpdates(int count) | 3122 | public void AddAgentUpdates(int count) |
3144 | { | 3123 | { |
3145 | m_statsReporter.AddAgentUpdates(count); | 3124 | m_statsReporter.AddAgentUpdates(count); |
@@ -3239,7 +3218,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
3239 | /// <param name="Message">The Message being sent to the user</param> | 3218 | /// <param name="Message">The Message being sent to the user</param> |
3240 | public void SendRegionMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) | 3219 | public void SendRegionMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) |
3241 | { | 3220 | { |
3242 | |||
3243 | List<ScenePresence> presenceList = GetScenePresences(); | 3221 | List<ScenePresence> presenceList = GetScenePresences(); |
3244 | 3222 | ||
3245 | foreach (ScenePresence presence in presenceList) | 3223 | foreach (ScenePresence presence in presenceList) |
@@ -3359,7 +3337,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3359 | 3337 | ||
3360 | foreach (ScenePresence presence in presenceList) | 3338 | foreach (ScenePresence presence in presenceList) |
3361 | { | 3339 | { |
3362 | if ((presence.Firstname == firstName) && (presence.Lastname == lastName)) | 3340 | if (presence.Firstname == firstName && presence.Lastname == lastName) |
3363 | { | 3341 | { |
3364 | presence.ControllingClient.SendAgentAlertMessage(message, modal); | 3342 | presence.ControllingClient.SendAgentAlertMessage(message, modal); |
3365 | break; | 3343 | break; |
@@ -3876,7 +3854,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
3876 | return m_httpListener.AddLLSDHandler(path, handler); | 3854 | return m_httpListener.AddLLSDHandler(path, handler); |
3877 | } | 3855 | } |
3878 | 3856 | ||
3879 | |||
3880 | public void RemoveStreamHandler(string httpMethod, string path) | 3857 | public void RemoveStreamHandler(string httpMethod, string path) |
3881 | { | 3858 | { |
3882 | m_httpListener.RemoveStreamHandler(httpMethod, path); | 3859 | m_httpListener.RemoveStreamHandler(httpMethod, path); |
@@ -3945,7 +3922,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
3945 | client.SendRegionHandle(regionID, info.RegionHandle); | 3922 | client.SendRegionHandle(regionID, info.RegionHandle); |
3946 | } | 3923 | } |
3947 | 3924 | ||
3948 | |||
3949 | public void TerrainUnAcked(IClientAPI client, int patchX, int patchY) | 3925 | public void TerrainUnAcked(IClientAPI client, int patchX, int patchY) |
3950 | { | 3926 | { |
3951 | //Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); | 3927 | //Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); |
@@ -3973,10 +3949,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
3973 | public void ObjectSaleInfo(IClientAPI client, LLUUID agentID, LLUUID sessionID, uint localID, byte saleType, int salePrice) | 3949 | public void ObjectSaleInfo(IClientAPI client, LLUUID agentID, LLUUID sessionID, uint localID, byte saleType, int salePrice) |
3974 | { | 3950 | { |
3975 | SceneObjectPart part = GetSceneObjectPart(localID); | 3951 | SceneObjectPart part = GetSceneObjectPart(localID); |
3976 | if(part == null || part.ParentGroup == null) | 3952 | if (part == null || part.ParentGroup == null) |
3977 | return; | 3953 | return; |
3978 | 3954 | ||
3979 | if(part.ParentGroup.RootPart == null) | 3955 | if (part.ParentGroup.RootPart == null) |
3980 | return; | 3956 | return; |
3981 | 3957 | ||
3982 | part = part.ParentGroup.RootPart; | 3958 | part = part.ParentGroup.RootPart; |
@@ -3994,10 +3970,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
3994 | { | 3970 | { |
3995 | SceneObjectPart part = GetSceneObjectPart(localID); | 3971 | SceneObjectPart part = GetSceneObjectPart(localID); |
3996 | 3972 | ||
3997 | if(part == null) | 3973 | if (part == null) |
3998 | return; | 3974 | return; |
3999 | 3975 | ||
4000 | if(part.ParentGroup == null) | 3976 | if (part.ParentGroup == null) |
4001 | return; | 3977 | return; |
4002 | 3978 | ||
4003 | SceneObjectGroup group = part.ParentGroup; | 3979 | SceneObjectGroup group = part.ParentGroup; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 24f814e..f8c5814 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
636 | // both regions | 636 | // both regions |
637 | if (avatar.ParentID != (uint)0) | 637 | if (avatar.ParentID != (uint)0) |
638 | avatar.StandUp(); | 638 | avatar.StandUp(); |
639 | if(!avatar.ValidateAttachments()) | 639 | if (!avatar.ValidateAttachments()) |
640 | { | 640 | { |
641 | avatar.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); | 641 | avatar.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); |
642 | return; | 642 | return; |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index cf24c73..4b785e9 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -2350,10 +2350,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2350 | // Validate | 2350 | // Validate |
2351 | foreach (SceneObjectGroup gobj in m_attachments) | 2351 | foreach (SceneObjectGroup gobj in m_attachments) |
2352 | { | 2352 | { |
2353 | if(gobj == null) | 2353 | if (gobj == null) |
2354 | return false; | 2354 | return false; |
2355 | 2355 | ||
2356 | if(gobj.RootPart == null) | 2356 | if (gobj.RootPart == null) |
2357 | { | 2357 | { |
2358 | return false; | 2358 | return false; |
2359 | } | 2359 | } |
@@ -2370,7 +2370,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2370 | // Validate | 2370 | // Validate |
2371 | foreach (SceneObjectGroup gobj in m_attachments) | 2371 | foreach (SceneObjectGroup gobj in m_attachments) |
2372 | { | 2372 | { |
2373 | if(gobj == null || gobj.RootPart == null) | 2373 | if (gobj == null || gobj.RootPart == null) |
2374 | return false; | 2374 | return false; |
2375 | } | 2375 | } |
2376 | 2376 | ||
diff --git a/OpenSim/Region/Physics/Meshing/Mesh.cs b/OpenSim/Region/Physics/Meshing/Mesh.cs index 394dcf3..4630d98 100644 --- a/OpenSim/Region/Physics/Meshing/Mesh.cs +++ b/OpenSim/Region/Physics/Meshing/Mesh.cs | |||
@@ -231,7 +231,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
231 | { | 231 | { |
232 | int[] result = getIndexListAsInt(); | 232 | int[] result = getIndexListAsInt(); |
233 | pinnedIndex = GCHandle.Alloc(result, GCHandleType.Pinned); | 233 | pinnedIndex = GCHandle.Alloc(result, GCHandleType.Pinned); |
234 | 234 | ||
235 | return result; | 235 | return result; |
236 | } | 236 | } |
237 | 237 | ||
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index a66a1b1..7cf8b76 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -1890,9 +1890,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
1890 | else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.HalfCircle) | 1890 | else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.HalfCircle) |
1891 | { // half circle, prim is a sphere | 1891 | { // half circle, prim is a sphere |
1892 | sides = 24; | 1892 | sides = 24; |
1893 | 1893 | ||
1894 | profileBegin = 0.5f * profileBegin + 0.5f; | 1894 | profileBegin = 0.5f * profileBegin + 0.5f; |
1895 | profileEnd = 0.5f * profileEnd + 0.5f; | 1895 | profileEnd = 0.5f * profileEnd + 0.5f; |
1896 | 1896 | ||
1897 | //profileHollow = 0.0f; // debugging only | 1897 | //profileHollow = 0.0f; // debugging only |
1898 | } | 1898 | } |
@@ -1904,7 +1904,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
1904 | hollowSides = 4; | 1904 | hollowSides = 4; |
1905 | else if (primShape.HollowShape == HollowShape.Triangle) | 1905 | else if (primShape.HollowShape == HollowShape.Triangle) |
1906 | hollowSides = 3; | 1906 | hollowSides = 3; |
1907 | |||
1908 | 1907 | ||
1909 | PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides); | 1908 | PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides); |
1910 | //PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, 0.0f, 4); | 1909 | //PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, 0.0f, 4); |
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index 53cc443..58bb82e 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs | |||
@@ -99,8 +99,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
99 | internal List<Angle> angles; | 99 | internal List<Angle> angles; |
100 | 100 | ||
101 | // this class should have a table of most commonly computed values | 101 | // this class should have a table of most commonly computed values |
102 | // instead of all the trig function calls | 102 | // instead of all the trig function calls |
103 | // most common would be for sides = 3, 4, or 24 | 103 | // most common would be for sides = 3, 4, or 24 |
104 | internal void makeAngles( int sides, float startAngle, float stopAngle ) | 104 | internal void makeAngles( int sides, float startAngle, float stopAngle ) |
105 | { | 105 | { |
106 | angles = new List<Angle>(); | 106 | angles = new List<Angle>(); |
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
134 | newAngle.Y = (float) System.Math.Sin(angle); | 134 | newAngle.Y = (float) System.Math.Sin(angle); |
135 | angles.Add(newAngle); | 135 | angles.Add(newAngle); |
136 | step += 1; | 136 | step += 1; |
137 | angle = stepSize * step; | 137 | angle = stepSize * step; |
138 | } | 138 | } |
139 | 139 | ||
140 | if (startAngle > angles[0].angle) | 140 | if (startAngle > angles[0].angle) |
@@ -187,15 +187,15 @@ namespace OpenSim.Region.Physics.Meshing | |||
187 | AngleList hollowAngles = new AngleList(); | 187 | AngleList hollowAngles = new AngleList(); |
188 | 188 | ||
189 | float xScale = 0.5f; | 189 | float xScale = 0.5f; |
190 | float yScale = 0.5f; | 190 | float yScale = 0.5f; |
191 | if (sides == 4) // corners of a square are sqrt(2) from center | 191 | if (sides == 4) // corners of a square are sqrt(2) from center |
192 | { | 192 | { |
193 | xScale = 0.707f; | 193 | xScale = 0.707f; |
194 | yScale = 0.707f; | 194 | yScale = 0.707f; |
195 | } | 195 | } |
196 | 196 | ||
197 | float startAngle = profileStart * twoPi; | 197 | float startAngle = profileStart * twoPi; |
198 | float stopAngle = profileEnd * twoPi; | 198 | float stopAngle = profileEnd * twoPi; |
199 | float stepSize = twoPi / sides; | 199 | float stepSize = twoPi / sides; |
200 | 200 | ||
201 | try { angles.makeAngles(sides, startAngle, stopAngle); } | 201 | try { angles.makeAngles(sides, startAngle, stopAngle); } |
@@ -397,7 +397,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
397 | { | 397 | { |
398 | vert = this.coords[i]; | 398 | vert = this.coords[i]; |
399 | Vertex v = new Vertex(vert.X, vert.Y, vert.Z) * q; | 399 | Vertex v = new Vertex(vert.X, vert.Y, vert.Z) * q; |
400 | 400 | ||
401 | vert.X = v.X; | 401 | vert.X = v.X; |
402 | vert.Y = v.Y; | 402 | vert.Y = v.Y; |
403 | vert.Z = v.Z; | 403 | vert.Z = v.Z; |
@@ -507,23 +507,23 @@ namespace OpenSim.Region.Physics.Meshing | |||
507 | s += "sides..................: " + this.sides.ToString(); | 507 | s += "sides..................: " + this.sides.ToString(); |
508 | s += "\nhollowSides..........: " + this.hollowSides.ToString(); | 508 | s += "\nhollowSides..........: " + this.hollowSides.ToString(); |
509 | s += "\nprofileStart.........: " + this.profileStart.ToString(); | 509 | s += "\nprofileStart.........: " + this.profileStart.ToString(); |
510 | s += "\nprofileEnd...........: " + this.profileEnd.ToString(); | 510 | s += "\nprofileEnd...........: " + this.profileEnd.ToString(); |
511 | s += "\nhollow...............: " + this.hollow.ToString(); | 511 | s += "\nhollow...............: " + this.hollow.ToString(); |
512 | s += "\ntwistBegin...........: " + this.twistBegin.ToString(); | 512 | s += "\ntwistBegin...........: " + this.twistBegin.ToString(); |
513 | s += "\ntwistEnd.............: " + this.twistEnd.ToString(); | 513 | s += "\ntwistEnd.............: " + this.twistEnd.ToString(); |
514 | s += "\ntopShearX............: " + this.topShearX.ToString(); | 514 | s += "\ntopShearX............: " + this.topShearX.ToString(); |
515 | s += "\ntopShearY............: " + this.topShearY.ToString(); | 515 | s += "\ntopShearY............: " + this.topShearY.ToString(); |
516 | s += "\npathCutBegin.........: " + this.pathCutBegin.ToString(); | 516 | s += "\npathCutBegin.........: " + this.pathCutBegin.ToString(); |
517 | s += "\npathCutEnd...........: " + this.pathCutEnd.ToString(); | 517 | s += "\npathCutEnd...........: " + this.pathCutEnd.ToString(); |
518 | s += "\ndimpleBegin..........: " + this.dimpleBegin.ToString(); | 518 | s += "\ndimpleBegin..........: " + this.dimpleBegin.ToString(); |
519 | s += "\ndimpleEnd............: " + this.dimpleEnd.ToString(); | 519 | s += "\ndimpleEnd............: " + this.dimpleEnd.ToString(); |
520 | s += "\nskew.................: " + this.skew.ToString(); | 520 | s += "\nskew.................: " + this.skew.ToString(); |
521 | s += "\nholeSizeX............: " + this.holeSizeX.ToString(); | 521 | s += "\nholeSizeX............: " + this.holeSizeX.ToString(); |
522 | s += "\nholeSizeY............: " + this.holeSizeY.ToString(); | 522 | s += "\nholeSizeY............: " + this.holeSizeY.ToString(); |
523 | s += "\ntaperX...............: " + this.taperX.ToString(); | 523 | s += "\ntaperX...............: " + this.taperX.ToString(); |
524 | s += "\ntaperY...............: " + this.taperY.ToString(); | 524 | s += "\ntaperY...............: " + this.taperY.ToString(); |
525 | s += "\nradius...............: " + this.radius.ToString(); | 525 | s += "\nradius...............: " + this.radius.ToString(); |
526 | s += "\nrevolutions..........: " + this.revolutions.ToString(); | 526 | s += "\nrevolutions..........: " + this.revolutions.ToString(); |
527 | s += "\nstepsPerRevolution...: " + this.stepsPerRevolution.ToString(); | 527 | s += "\nstepsPerRevolution...: " + this.stepsPerRevolution.ToString(); |
528 | 528 | ||
529 | return s; | 529 | return s; |
@@ -542,20 +542,20 @@ namespace OpenSim.Region.Physics.Meshing | |||
542 | this.hollowSides = hollowSides; | 542 | this.hollowSides = hollowSides; |
543 | 543 | ||
544 | if (sides < 3) | 544 | if (sides < 3) |
545 | this.sides = 3; | 545 | this.sides = 3; |
546 | if ( hollowSides < 3) | 546 | if ( hollowSides < 3) |
547 | this.hollowSides = 3; | 547 | this.hollowSides = 3; |
548 | if (profileStart < 0.0f) | 548 | if (profileStart < 0.0f) |
549 | this.profileStart = 0.0f; | 549 | this.profileStart = 0.0f; |
550 | if (profileEnd > 1.0f) | 550 | if (profileEnd > 1.0f) |
551 | this.profileEnd = 1.0f; | 551 | this.profileEnd = 1.0f; |
552 | if (profileEnd < 0.02f) | 552 | if (profileEnd < 0.02f) |
553 | this.profileEnd = 0.02f; | 553 | this.profileEnd = 0.02f; |
554 | if (profileStart >= profileEnd) | 554 | if (profileStart >= profileEnd) |
555 | this.profileStart = profileEnd - 0.02f; | 555 | this.profileStart = profileEnd - 0.02f; |
556 | if (hollow > 1.0f) | 556 | if (hollow > 1.0f) |
557 | this.hollow = 1.0f; | 557 | this.hollow = 1.0f; |
558 | if (hollow < 0.0f) | 558 | if (hollow < 0.0f) |
559 | this.hollow = 0.0f; | 559 | this.hollow = 0.0f; |
560 | } | 560 | } |
561 | 561 | ||
@@ -578,7 +578,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
578 | steps = (int)(steps * 4.5 * length); | 578 | steps = (int)(steps * 4.5 * length); |
579 | } | 579 | } |
580 | #endif | 580 | #endif |
581 | 581 | ||
582 | float twistBegin = this.twistBegin / 360.0f * twoPi; | 582 | float twistBegin = this.twistBegin / 360.0f * twoPi; |
583 | float twistEnd = this.twistEnd / 360.0f * twoPi; | 583 | float twistEnd = this.twistEnd / 360.0f * twoPi; |
584 | float twistTotal = twistEnd - twistBegin; | 584 | float twistTotal = twistEnd - twistBegin; |
@@ -661,7 +661,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
661 | newLayer.AddValue2Faces(coordsLen); | 661 | newLayer.AddValue2Faces(coordsLen); |
662 | 662 | ||
663 | this.coords.AddRange(newLayer.coords); | 663 | this.coords.AddRange(newLayer.coords); |
664 | this.faces.AddRange(newLayer.faces); | 664 | this.faces.AddRange(newLayer.faces); |
665 | 665 | ||
666 | // fill faces between layers | 666 | // fill faces between layers |
667 | 667 | ||
@@ -707,7 +707,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
707 | else done = true; | 707 | else done = true; |
708 | } | 708 | } |
709 | } | 709 | } |
710 | |||
711 | 710 | ||
712 | public void ExtrudeCircular() | 711 | public void ExtrudeCircular() |
713 | { | 712 | { |
@@ -721,9 +720,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
721 | float twistEnd = this.twistEnd / 360.0f * twoPi; | 720 | float twistEnd = this.twistEnd / 360.0f * twoPi; |
722 | float twistTotal = twistEnd - twistBegin; | 721 | float twistTotal = twistEnd - twistBegin; |
723 | 722 | ||
724 | // if the profile has a lot of twist, add more layers otherwise the layers may overlap | 723 | // if the profile has a lot of twist, add more layers otherwise the layers may overlap |
725 | // and the resulting mesh may be quite inaccurate. This method is arbitrary and doesn't | 724 | // and the resulting mesh may be quite inaccurate. This method is arbitrary and doesn't |
726 | // accurately match the viewer | 725 | // accurately match the viewer |
727 | float twistTotalAbs = Math.Abs(twistTotal); | 726 | float twistTotalAbs = Math.Abs(twistTotal); |
728 | if (twistTotalAbs > 0.01f) | 727 | if (twistTotalAbs > 0.01f) |
729 | { | 728 | { |
@@ -732,19 +731,19 @@ namespace OpenSim.Region.Physics.Meshing | |||
732 | if (twistTotalAbs > Math.PI * 3.0f) | 731 | if (twistTotalAbs > Math.PI * 3.0f) |
733 | steps *= 2; | 732 | steps *= 2; |
734 | } | 733 | } |
735 | 734 | ||
736 | float yPathScale = this.holeSizeY * 0.5f; | 735 | float yPathScale = this.holeSizeY * 0.5f; |
737 | float pathLength = this.pathCutEnd - this.pathCutBegin; | 736 | float pathLength = this.pathCutEnd - this.pathCutBegin; |
738 | float totalSkew = this.skew * 2.0f * pathLength; | 737 | float totalSkew = this.skew * 2.0f * pathLength; |
739 | float skewStart = this.pathCutBegin * 2.0f * this.skew - this.skew; | 738 | float skewStart = this.pathCutBegin * 2.0f * this.skew - this.skew; |
740 | 739 | ||
741 | // It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end | 740 | // It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end |
742 | // angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used | 741 | // angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used |
743 | // to calculate the sine for generating the path radius appears to approximate it's effects there | 742 | // to calculate the sine for generating the path radius appears to approximate it's effects there |
744 | // too, but there are some subtle differences in the radius which are noticeable as the prim size | 743 | // too, but there are some subtle differences in the radius which are noticeable as the prim size |
745 | // increases and it may affect megaprims quite a bit. The effect of the Y top shear parameter on | 744 | // increases and it may affect megaprims quite a bit. The effect of the Y top shear parameter on |
746 | // the meshes generated with this technique appear nearly identical in shape to the same prims when | 745 | // the meshes generated with this technique appear nearly identical in shape to the same prims when |
747 | // displayed by the viewer. | 746 | // displayed by the viewer. |
748 | 747 | ||
749 | float startAngle = (twoPi * this.pathCutBegin * this.revolutions) - this.topShearY * 0.9f; | 748 | float startAngle = (twoPi * this.pathCutBegin * this.revolutions) - this.topShearY * 0.9f; |
750 | float endAngle = (twoPi * this.pathCutEnd * this.revolutions) - this.topShearY * 0.9f; | 749 | float endAngle = (twoPi * this.pathCutEnd * this.revolutions) - this.topShearY * 0.9f; |
@@ -784,7 +783,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
784 | hollow /= 0.7f; | 783 | hollow /= 0.7f; |
785 | } | 784 | } |
786 | } | 785 | } |
787 | 786 | ||
788 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides); | 787 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides); |
789 | 788 | ||
790 | if (initialProfileRot != 0.0f) | 789 | if (initialProfileRot != 0.0f) |
@@ -834,7 +833,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
834 | newLayer.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist)); | 833 | newLayer.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist)); |
835 | 834 | ||
836 | // now orient the rotation of the profile layer relative to it's position on the path | 835 | // now orient the rotation of the profile layer relative to it's position on the path |
837 | // adding taperY to the angle used to generate the quat appears to approximate the viewer | 836 | // adding taperY to the angle used to generate the quat appears to approximate the viewer |
838 | newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY * 0.9f)); | 837 | newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY * 0.9f)); |
839 | newLayer.AddPos(xOffset, yOffset, zOffset); | 838 | newLayer.AddPos(xOffset, yOffset, zOffset); |
840 | 839 | ||
@@ -959,7 +958,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
959 | 958 | ||
960 | sw.WriteLine(s); | 959 | sw.WriteLine(s); |
961 | } | 960 | } |
962 | 961 | ||
963 | sw.Close(); | 962 | sw.Close(); |
964 | } | 963 | } |
965 | } | 964 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 9fdf3ce..f10a854 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -2296,7 +2296,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2296 | bool found = false; | 2296 | bool found = false; |
2297 | 2297 | ||
2298 | float dist = (float)llVecDist(llGetPos(), pos); | 2298 | float dist = (float)llVecDist(llGetPos(), pos); |
2299 | if(dist > m_distanceFactor * 10.0f) | 2299 | if (dist > m_distanceFactor * 10.0f) |
2300 | return; | 2300 | return; |
2301 | 2301 | ||
2302 | // Instead of using return;, I'm using continue; because in our TaskInventory implementation | 2302 | // Instead of using return;, I'm using continue; because in our TaskInventory implementation |
@@ -6247,7 +6247,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6247 | switch (primType) | 6247 | switch (primType) |
6248 | { | 6248 | { |
6249 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX: | 6249 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX: |
6250 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER: | 6250 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER: |
6251 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM: | 6251 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM: |
6252 | res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); | 6252 | res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); |
6253 | res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); | 6253 | res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); |
@@ -6298,10 +6298,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6298 | // vector tapera | 6298 | // vector tapera |
6299 | res.Add(new LSL_Types.Vector3(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); | 6299 | res.Add(new LSL_Types.Vector3(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); |
6300 | 6300 | ||
6301 | // float revolutions, | 6301 | // float revolutions, |
6302 | res.Add(new LSL_Types.LSLFloat(Shape.PathRevolutions / 50.0)); // needs fixing :( | 6302 | res.Add(new LSL_Types.LSLFloat(Shape.PathRevolutions / 50.0)); // needs fixing :( |
6303 | 6303 | ||
6304 | // float radiusoffset, | 6304 | // float radiusoffset, |
6305 | res.Add(new LSL_Types.LSLFloat(Shape.PathRadiusOffset / 100.0)); | 6305 | res.Add(new LSL_Types.LSLFloat(Shape.PathRadiusOffset / 100.0)); |
6306 | 6306 | ||
6307 | // float skew | 6307 | // float skew |
@@ -7014,10 +7014,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7014 | { | 7014 | { |
7015 | case 5: // DATA_SIM_POS | 7015 | case 5: // DATA_SIM_POS |
7016 | if (info == null) | 7016 | if (info == null) |
7017 | { | 7017 | { |
7018 | // ScriptSleep(1000); | 7018 | // ScriptSleep(1000); |
7019 | return LLUUID.Zero.ToString(); | 7019 | return LLUUID.Zero.ToString(); |
7020 | } | 7020 | } |
7021 | reply = new LSL_Types.Vector3( | 7021 | reply = new LSL_Types.Vector3( |
7022 | info.RegionLocX * Constants.RegionSize, | 7022 | info.RegionLocX * Constants.RegionSize, |
7023 | info.RegionLocY * Constants.RegionSize, | 7023 | info.RegionLocY * Constants.RegionSize, |
@@ -7031,10 +7031,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7031 | break; | 7031 | break; |
7032 | case 7: // DATA_SIM_RATING | 7032 | case 7: // DATA_SIM_RATING |
7033 | if (info == null) | 7033 | if (info == null) |
7034 | { | 7034 | { |
7035 | // ScriptSleep(1000); | 7035 | // ScriptSleep(1000); |
7036 | return LLUUID.Zero.ToString(); | 7036 | return LLUUID.Zero.ToString(); |
7037 | } | 7037 | } |
7038 | int access = info.RegionSettings.Maturity; | 7038 | int access = info.RegionSettings.Maturity; |
7039 | if (access == 0) | 7039 | if (access == 0) |
7040 | reply = "PG"; | 7040 | reply = "PG"; |
@@ -7047,18 +7047,18 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7047 | reply = m_ScriptEngine.World.GetSimulatorVersion(); | 7047 | reply = m_ScriptEngine.World.GetSimulatorVersion(); |
7048 | break; | 7048 | break; |
7049 | default: | 7049 | default: |
7050 | // ScriptSleep(1000); | 7050 | // ScriptSleep(1000); |
7051 | return LLUUID.Zero.ToString(); // Raise no event | 7051 | return LLUUID.Zero.ToString(); // Raise no event |
7052 | } | 7052 | } |
7053 | LLUUID rq = LLUUID.Random(); | 7053 | LLUUID rq = LLUUID.Random(); |
7054 | 7054 | ||
7055 | LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager. | 7055 | LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager. |
7056 | m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString()); | 7056 | m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString()); |
7057 | 7057 | ||
7058 | m_ScriptEngine.m_ASYNCLSLCommandManager. | 7058 | m_ScriptEngine.m_ASYNCLSLCommandManager. |
7059 | m_Dataserver.DataserverReply(rq.ToString(), reply); | 7059 | m_Dataserver.DataserverReply(rq.ToString(), reply); |
7060 | 7060 | ||
7061 | // ScriptSleep(1000); | 7061 | // ScriptSleep(1000); |
7062 | return tid.ToString(); | 7062 | return tid.ToString(); |
7063 | } | 7063 | } |
7064 | catch(Exception e) | 7064 | catch(Exception e) |
@@ -8041,12 +8041,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
8041 | (line >= 0) && | 8041 | (line >= 0) && |
8042 | (line < notecardLines.Length)) | 8042 | (line < notecardLines.Length)) |
8043 | { | 8043 | { |
8044 | // ScriptSleep(100); | 8044 | // ScriptSleep(100); |
8045 | return notecardLines[line]; | 8045 | return notecardLines[line]; |
8046 | } | 8046 | } |
8047 | else | 8047 | else |
8048 | { | 8048 | { |
8049 | // ScriptSleep(100); | 8049 | // ScriptSleep(100); |
8050 | return String.Empty; | 8050 | return String.Empty; |
8051 | } | 8051 | } |
8052 | } | 8052 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b48edfb..b5ca167 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2130,7 +2130,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2130 | { | 2130 | { |
2131 | float dist = (float)llVecMag(llGetPos() - pos); | 2131 | float dist = (float)llVecMag(llGetPos() - pos); |
2132 | 2132 | ||
2133 | if(dist > m_ScriptDistanceFactor * 10.0f) | 2133 | if (dist > m_ScriptDistanceFactor * 10.0f) |
2134 | return; | 2134 | return; |
2135 | 2135 | ||
2136 | m_host.AddScriptLPS(1); | 2136 | m_host.AddScriptLPS(1); |
@@ -5735,8 +5735,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5735 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: | 5735 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: |
5736 | if (remain < 5) | 5736 | if (remain < 5) |
5737 | return; | 5737 | return; |
5738 | LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString()); | 5738 | LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString()); |
5739 | LSL_Types.Vector3 lightcolor =new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5739 | LSL_Types.Vector3 lightcolor = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5740 | float intensity = (float)Convert.ToDouble(rules.Data[idx++]); | 5740 | float intensity = (float)Convert.ToDouble(rules.Data[idx++]); |
5741 | float radius = (float)Convert.ToDouble(rules.Data[idx++]); | 5741 | float radius = (float)Convert.ToDouble(rules.Data[idx++]); |
5742 | float falloff = (float)Convert.ToDouble(rules.Data[idx++]); | 5742 | float falloff = (float)Convert.ToDouble(rules.Data[idx++]); |
@@ -6895,10 +6895,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6895 | { | 6895 | { |
6896 | case 5: // DATA_SIM_POS | 6896 | case 5: // DATA_SIM_POS |
6897 | if (info == null) | 6897 | if (info == null) |
6898 | { | 6898 | { |
6899 | // ScriptSleep(1000); | 6899 | // ScriptSleep(1000); |
6900 | return LLUUID.Zero.ToString(); | 6900 | return LLUUID.Zero.ToString(); |
6901 | } | 6901 | } |
6902 | reply = new LSL_Types.Vector3( | 6902 | reply = new LSL_Types.Vector3( |
6903 | info.RegionLocX * Constants.RegionSize, | 6903 | info.RegionLocX * Constants.RegionSize, |
6904 | info.RegionLocY * Constants.RegionSize, | 6904 | info.RegionLocY * Constants.RegionSize, |
@@ -6912,10 +6912,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6912 | break; | 6912 | break; |
6913 | case 7: // DATA_SIM_RATING | 6913 | case 7: // DATA_SIM_RATING |
6914 | if (info == null) | 6914 | if (info == null) |
6915 | { | 6915 | { |
6916 | // ScriptSleep(1000); | 6916 | // ScriptSleep(1000); |
6917 | return LLUUID.Zero.ToString(); | 6917 | return LLUUID.Zero.ToString(); |
6918 | } | 6918 | } |
6919 | int access = info.RegionSettings.Maturity; | 6919 | int access = info.RegionSettings.Maturity; |
6920 | if (access == 0) | 6920 | if (access == 0) |
6921 | reply = "PG"; | 6921 | reply = "PG"; |
@@ -6928,7 +6928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6928 | reply = m_ScriptEngine.World.GetSimulatorVersion(); | 6928 | reply = m_ScriptEngine.World.GetSimulatorVersion(); |
6929 | break; | 6929 | break; |
6930 | default: | 6930 | default: |
6931 | // ScriptSleep(1000); | 6931 | // ScriptSleep(1000); |
6932 | return LLUUID.Zero.ToString(); // Raise no event | 6932 | return LLUUID.Zero.ToString(); // Raise no event |
6933 | } | 6933 | } |
6934 | LLUUID rq = LLUUID.Random(); | 6934 | LLUUID rq = LLUUID.Random(); |
@@ -6939,7 +6939,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6939 | AsyncCommands. | 6939 | AsyncCommands. |
6940 | DataserverPlugin.DataserverReply(rq.ToString(), reply); | 6940 | DataserverPlugin.DataserverReply(rq.ToString(), reply); |
6941 | 6941 | ||
6942 | // ScriptSleep(1000); | 6942 | // ScriptSleep(1000); |
6943 | return tid.ToString(); | 6943 | return tid.ToString(); |
6944 | } | 6944 | } |
6945 | catch(Exception e) | 6945 | catch(Exception e) |
@@ -7910,7 +7910,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7910 | AsyncCommands. | 7910 | AsyncCommands. |
7911 | DataserverPlugin.DataserverReply(item.AssetID.ToString(), | 7911 | DataserverPlugin.DataserverReply(item.AssetID.ToString(), |
7912 | NotecardCache.GetLines(item.AssetID).ToString()); | 7912 | NotecardCache.GetLines(item.AssetID).ToString()); |
7913 | // ScriptSleep(100); | 7913 | // ScriptSleep(100); |
7914 | return tid.ToString(); | 7914 | return tid.ToString(); |
7915 | } | 7915 | } |
7916 | WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) | 7916 | WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) |
@@ -7924,7 +7924,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7924 | DataserverPlugin.DataserverReply(id.ToString(), | 7924 | DataserverPlugin.DataserverReply(id.ToString(), |
7925 | NotecardCache.GetLines(id).ToString()); | 7925 | NotecardCache.GetLines(id).ToString()); |
7926 | }); | 7926 | }); |
7927 | // ScriptSleep(100); | 7927 | // ScriptSleep(100); |
7928 | return tid.ToString(); | 7928 | return tid.ToString(); |
7929 | } | 7929 | } |
7930 | } | 7930 | } |
@@ -7948,7 +7948,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7948 | AsyncCommands. | 7948 | AsyncCommands. |
7949 | DataserverPlugin.DataserverReply(item.AssetID.ToString(), | 7949 | DataserverPlugin.DataserverReply(item.AssetID.ToString(), |
7950 | NotecardCache.GetLine(item.AssetID, line)); | 7950 | NotecardCache.GetLine(item.AssetID, line)); |
7951 | // ScriptSleep(100); | 7951 | // ScriptSleep(100); |
7952 | return tid.ToString(); | 7952 | return tid.ToString(); |
7953 | } | 7953 | } |
7954 | WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) | 7954 | WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) |
@@ -7963,7 +7963,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7963 | NotecardCache.GetLine(id, line)); | 7963 | NotecardCache.GetLine(id, line)); |
7964 | }); | 7964 | }); |
7965 | 7965 | ||
7966 | // ScriptSleep(100); | 7966 | // ScriptSleep(100); |
7967 | return tid.ToString(); | 7967 | return tid.ToString(); |
7968 | } | 7968 | } |
7969 | } | 7969 | } |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 3a01dc6..d431286 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -89,7 +89,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
89 | det[0].Key = remoteClient.AgentId; | 89 | det[0].Key = remoteClient.AgentId; |
90 | det[0].Populate(myScriptEngine.World); | 90 | det[0].Populate(myScriptEngine.World); |
91 | 91 | ||
92 | |||
93 | if (originalID == 0) | 92 | if (originalID == 0) |
94 | { | 93 | { |
95 | SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart(localID); | 94 | SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart(localID); |
@@ -103,7 +102,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
103 | SceneObjectPart originalPart = myScriptEngine.World.GetSceneObjectPart(originalID); | 102 | SceneObjectPart originalPart = myScriptEngine.World.GetSceneObjectPart(originalID); |
104 | det[0].LinkNum = originalPart.LinkNum; | 103 | det[0].LinkNum = originalPart.LinkNum; |
105 | } | 104 | } |
106 | 105 | ||
107 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 106 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
108 | "touch_start", new Object[] { new LSL_Types.LSLInteger(1) }, | 107 | "touch_start", new Object[] { new LSL_Types.LSLInteger(1) }, |
109 | det)); | 108 | det)); |