diff options
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginResponse.cs | 34 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 5 |
2 files changed, 32 insertions, 7 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 6ab5258..e67ecf0 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs | |||
@@ -254,11 +254,11 @@ namespace OpenSim.Services.LLLoginService | |||
254 | Currency = currency; | 254 | Currency = currency; |
255 | ClassifiedFee = classifiedFee; | 255 | ClassifiedFee = classifiedFee; |
256 | 256 | ||
257 | |||
258 | FillOutHomeData(pinfo, home); | 257 | FillOutHomeData(pinfo, home); |
259 | LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); | 258 | LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); |
260 | 259 | ||
261 | FillOutRegionData(destination); | 260 | FillOutRegionData(destination); |
261 | m_log.DebugFormat("[LOGIN RESPONSE] LLLoginResponse create. sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY); | ||
262 | 262 | ||
263 | FillOutSeedCap(aCircuit, destination, clientIP); | 263 | FillOutSeedCap(aCircuit, destination, clientIP); |
264 | 264 | ||
@@ -361,7 +361,8 @@ namespace OpenSim.Services.LLLoginService | |||
361 | 361 | ||
362 | private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) | 362 | private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) |
363 | { | 363 | { |
364 | int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize; | 364 | int x = (int)Util.RegionToWorldLoc(1000); |
365 | int y = (int)Util.RegionToWorldLoc(1000); | ||
365 | if (home != null) | 366 | if (home != null) |
366 | { | 367 | { |
367 | x = home.RegionLocX; | 368 | x = home.RegionLocX; |
@@ -384,6 +385,8 @@ namespace OpenSim.Services.LLLoginService | |||
384 | SimPort = (uint)endPoint.Port; | 385 | SimPort = (uint)endPoint.Port; |
385 | RegionX = (uint)destination.RegionLocX; | 386 | RegionX = (uint)destination.RegionLocX; |
386 | RegionY = (uint)destination.RegionLocY; | 387 | RegionY = (uint)destination.RegionLocY; |
388 | RegionSizeX = destination.RegionSizeX; | ||
389 | RegionSizeY = destination.RegionSizeY; | ||
387 | } | 390 | } |
388 | 391 | ||
389 | private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient) | 392 | private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient) |
@@ -433,10 +436,23 @@ namespace OpenSim.Services.LLLoginService | |||
433 | ErrorReason = "key"; | 436 | ErrorReason = "key"; |
434 | welcomeMessage = "Welcome to OpenSim!"; | 437 | welcomeMessage = "Welcome to OpenSim!"; |
435 | seedCapability = String.Empty; | 438 | seedCapability = String.Empty; |
436 | home = "{'region_handle':[r" + (1000*Constants.RegionSize).ToString() + ",r" + (1000*Constants.RegionSize).ToString() + "], 'position':[r" + | 439 | home = "{'region_handle':[" |
437 | userProfile.homepos.X.ToString() + ",r" + userProfile.homepos.Y.ToString() + ",r" + | 440 | + "r" + Util.RegionToWorldLoc(1000).ToString() |
438 | userProfile.homepos.Z.ToString() + "], 'look_at':[r" + userProfile.homelookat.X.ToString() + ",r" + | 441 | + "," |
439 | userProfile.homelookat.Y.ToString() + ",r" + userProfile.homelookat.Z.ToString() + "]}"; | 442 | + "r" + Util.RegionToWorldLoc(1000).ToString() |
443 | + "], 'position':[" | ||
444 | + "r" + userProfile.homepos.X.ToString() | ||
445 | + "," | ||
446 | + "r" + userProfile.homepos.Y.ToString() | ||
447 | + "," | ||
448 | + "r" + userProfile.homepos.Z.ToString() | ||
449 | + "], 'look_at':[" | ||
450 | + "r" + userProfile.homelookat.X.ToString() | ||
451 | + "," | ||
452 | + "r" + userProfile.homelookat.Y.ToString() | ||
453 | + "," | ||
454 | + "r" + userProfile.homelookat.Z.ToString() | ||
455 | + "]}"; | ||
440 | lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; | 456 | lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; |
441 | RegionX = (uint) 255232; | 457 | RegionX = (uint) 255232; |
442 | RegionY = (uint) 254976; | 458 | RegionY = (uint) 254976; |
@@ -529,6 +545,9 @@ namespace OpenSim.Services.LLLoginService | |||
529 | responseData["message"] = welcomeMessage; | 545 | responseData["message"] = welcomeMessage; |
530 | responseData["region_x"] = (Int32)(RegionX); | 546 | responseData["region_x"] = (Int32)(RegionX); |
531 | responseData["region_y"] = (Int32)(RegionY); | 547 | responseData["region_y"] = (Int32)(RegionY); |
548 | responseData["region_size_x"] = (Int32)RegionSizeX; | ||
549 | responseData["region_size_y"] = (Int32)RegionSizeY; | ||
550 | m_log.DebugFormat("[LOGIN RESPONSE] returning sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY); | ||
532 | 551 | ||
533 | if (searchURL != String.Empty) | 552 | if (searchURL != String.Empty) |
534 | responseData["search"] = searchURL; | 553 | responseData["search"] = searchURL; |
@@ -918,6 +937,9 @@ namespace OpenSim.Services.LLLoginService | |||
918 | set { regionY = value; } | 937 | set { regionY = value; } |
919 | } | 938 | } |
920 | 939 | ||
940 | public int RegionSizeX { get; private set; } | ||
941 | public int RegionSizeY { get; private set; } | ||
942 | |||
921 | public string SunTexture | 943 | public string SunTexture |
922 | { | 944 | { |
923 | get { return sunTexture; } | 945 | get { return sunTexture; } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 6a748fe..46a5c18 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -50,6 +50,8 @@ namespace OpenSim.Services.LLLoginService | |||
50 | public class LLLoginService : ILoginService | 50 | public class LLLoginService : ILoginService |
51 | { | 51 | { |
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | private static readonly string LogHeader = "[LLOGIN SERVICE]"; | ||
54 | |||
53 | private static bool Initialized = false; | 55 | private static bool Initialized = false; |
54 | 56 | ||
55 | protected IUserAccountService m_UserAccountService; | 57 | protected IUserAccountService m_UserAccountService; |
@@ -408,6 +410,7 @@ namespace OpenSim.Services.LLLoginService | |||
408 | else | 410 | else |
409 | { | 411 | { |
410 | // something went wrong, make something up, so that we don't have to test this anywhere else | 412 | // something went wrong, make something up, so that we don't have to test this anywhere else |
413 | m_log.DebugFormat("{0} Failed to fetch GridUserInfo. Creating empty GridUserInfo as home", LogHeader); | ||
411 | guinfo = new GridUserInfo(); | 414 | guinfo = new GridUserInfo(); |
412 | guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); | 415 | guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); |
413 | } | 416 | } |
@@ -696,7 +699,7 @@ namespace OpenSim.Services.LLLoginService | |||
696 | private GridRegion FindAlternativeRegion(UUID scopeID) | 699 | private GridRegion FindAlternativeRegion(UUID scopeID) |
697 | { | 700 | { |
698 | List<GridRegion> hyperlinks = null; | 701 | List<GridRegion> hyperlinks = null; |
699 | List<GridRegion> regions = m_GridService.GetFallbackRegions(scopeID, 1000 * (int)Constants.RegionSize, 1000 * (int)Constants.RegionSize); | 702 | List<GridRegion> regions = m_GridService.GetFallbackRegions(scopeID, (int)Util.RegionToWorldLoc(1000), (int)Util.RegionToWorldLoc(1000)); |
700 | if (regions != null && regions.Count > 0) | 703 | if (regions != null && regions.Count > 0) |
701 | { | 704 | { |
702 | hyperlinks = m_GridService.GetHyperlinks(scopeID); | 705 | hyperlinks = m_GridService.GetHyperlinks(scopeID); |