diff options
author | Jeff Ames | 2008-08-28 14:41:54 +0000 |
---|---|---|
committer | Jeff Ames | 2008-08-28 14:41:54 +0000 |
commit | 3bf88587277b83c0b6f058fabba7d46a3b5a6a00 (patch) | |
tree | ed4ad9dc27e649a6f52661665fb681984251f480 /OpenSim/Region/Environment | |
parent | Thannk you, Ralphos, for a patch the corrects an improper cast in (diff) | |
download | opensim-SC-3bf88587277b83c0b6f058fabba7d46a3b5a6a00.zip opensim-SC-3bf88587277b83c0b6f058fabba7d46a3b5a6a00.tar.gz opensim-SC-3bf88587277b83c0b6f058fabba7d46a3b5a6a00.tar.bz2 opensim-SC-3bf88587277b83c0b6f058fabba7d46a3b5a6a00.tar.xz |
Update svn properties, formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment')
11 files changed, 100 insertions, 168 deletions
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 | ||