From beeec1c46726a266edf5c8260f9cf4e4e6f91c8a Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 8 Nov 2013 20:53:37 -0800 Subject: 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. --- OpenSim/Services/LLLoginService/LLLoginResponse.cs | 25 +++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'OpenSim/Services/LLLoginService/LLLoginResponse.cs') 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 private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) { - int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize; + // int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize; + int x = (int)Util.RegionToWorldLoc(1000); + int y = (int)Util.RegionToWorldLoc(1000); if (home != null) { x = home.RegionLocX; @@ -436,10 +438,23 @@ namespace OpenSim.Services.LLLoginService ErrorReason = "key"; welcomeMessage = "Welcome to OpenSim!"; seedCapability = String.Empty; - home = "{'region_handle':[r" + (1000*Constants.RegionSize).ToString() + ",r" + (1000*Constants.RegionSize).ToString() + "], 'position':[r" + - userProfile.homepos.X.ToString() + ",r" + userProfile.homepos.Y.ToString() + ",r" + - userProfile.homepos.Z.ToString() + "], 'look_at':[r" + userProfile.homelookat.X.ToString() + ",r" + - userProfile.homelookat.Y.ToString() + ",r" + userProfile.homelookat.Z.ToString() + "]}"; + home = "{'region_handle':[r" + + Util.RegionToWorldLoc(1000).ToString() + + ",r" + + Util.RegionToWorldLoc(1000).ToString() + + "], 'position':[r" + + userProfile.homepos.X.ToString() + + ",r" + + userProfile.homepos.Y.ToString() + + ",r" + + userProfile.homepos.Z.ToString() + + "], 'look_at':[r" + + userProfile.homelookat.X.ToString() + + ",r" + + userProfile.homelookat.Y.ToString() + + ",r" + + userProfile.homelookat.Z.ToString() + + "]}"; lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; RegionX = (uint) 255232; RegionY = (uint) 254976; -- cgit v1.1