diff options
author | Robert Adams | 2013-11-08 20:53:37 -0800 |
---|---|---|
committer | Robert Adams | 2013-11-08 20:53:37 -0800 |
commit | beeec1c46726a266edf5c8260f9cf4e4e6f91c8a (patch) | |
tree | ac749f4db4d4ee640bf9091b9684d2a36eedb284 /OpenSim/Services/LLLoginService | |
parent | varregion: Massive work to LandManagementModule and LandObject to (diff) | |
download | opensim-SC-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.zip opensim-SC-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.tar.gz opensim-SC-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.tar.bz2 opensim-SC-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.tar.xz |
varregion: elimination of Constants.RegionSize from all over OpenSimulator.
Routines in Util to compute region world coordinates from region coordinates
as well as the conversion to and from region handles. These routines have
replaced a lot of math scattered throughout the simulator.
Should be no functional changes.
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginResponse.cs | 25 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 2 |
2 files changed, 21 insertions, 6 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index f96480c..ff51f09 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs | |||
@@ -362,7 +362,9 @@ namespace OpenSim.Services.LLLoginService | |||
362 | 362 | ||
363 | private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) | 363 | private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) |
364 | { | 364 | { |
365 | int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize; | 365 | // int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize; |
366 | int x = (int)Util.RegionToWorldLoc(1000); | ||
367 | int y = (int)Util.RegionToWorldLoc(1000); | ||
366 | if (home != null) | 368 | if (home != null) |
367 | { | 369 | { |
368 | x = home.RegionLocX; | 370 | x = home.RegionLocX; |
@@ -436,10 +438,23 @@ namespace OpenSim.Services.LLLoginService | |||
436 | ErrorReason = "key"; | 438 | ErrorReason = "key"; |
437 | welcomeMessage = "Welcome to OpenSim!"; | 439 | welcomeMessage = "Welcome to OpenSim!"; |
438 | seedCapability = String.Empty; | 440 | seedCapability = String.Empty; |
439 | home = "{'region_handle':[r" + (1000*Constants.RegionSize).ToString() + ",r" + (1000*Constants.RegionSize).ToString() + "], 'position':[r" + | 441 | home = "{'region_handle':[r" |
440 | userProfile.homepos.X.ToString() + ",r" + userProfile.homepos.Y.ToString() + ",r" + | 442 | + Util.RegionToWorldLoc(1000).ToString() |
441 | userProfile.homepos.Z.ToString() + "], 'look_at':[r" + userProfile.homelookat.X.ToString() + ",r" + | 443 | + ",r" |
442 | userProfile.homelookat.Y.ToString() + ",r" + userProfile.homelookat.Z.ToString() + "]}"; | 444 | + Util.RegionToWorldLoc(1000).ToString() |
445 | + "], 'position':[r" | ||
446 | + userProfile.homepos.X.ToString() | ||
447 | + ",r" | ||
448 | + userProfile.homepos.Y.ToString() | ||
449 | + ",r" | ||
450 | + userProfile.homepos.Z.ToString() | ||
451 | + "], 'look_at':[r" | ||
452 | + userProfile.homelookat.X.ToString() | ||
453 | + ",r" | ||
454 | + userProfile.homelookat.Y.ToString() | ||
455 | + ",r" | ||
456 | + userProfile.homelookat.Z.ToString() | ||
457 | + "]}"; | ||
443 | lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; | 458 | lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; |
444 | RegionX = (uint) 255232; | 459 | RegionX = (uint) 255232; |
445 | RegionY = (uint) 254976; | 460 | RegionY = (uint) 254976; |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index e2f9966..150c2c0 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -684,7 +684,7 @@ namespace OpenSim.Services.LLLoginService | |||
684 | private GridRegion FindAlternativeRegion(UUID scopeID) | 684 | private GridRegion FindAlternativeRegion(UUID scopeID) |
685 | { | 685 | { |
686 | List<GridRegion> hyperlinks = null; | 686 | List<GridRegion> hyperlinks = null; |
687 | List<GridRegion> regions = m_GridService.GetFallbackRegions(scopeID, 1000 * (int)Constants.RegionSize, 1000 * (int)Constants.RegionSize); | 687 | List<GridRegion> regions = m_GridService.GetFallbackRegions(scopeID, (int)Util.RegionToWorldLoc(1000), (int)Util.RegionToWorldLoc(1000)); |
688 | if (regions != null && regions.Count > 0) | 688 | if (regions != null && regions.Count > 0) |
689 | { | 689 | { |
690 | hyperlinks = m_GridService.GetHyperlinks(scopeID); | 690 | hyperlinks = m_GridService.GetHyperlinks(scopeID); |