diff options
author | mingchen | 2007-07-05 15:15:28 +0000 |
---|---|---|
committer | mingchen | 2007-07-05 15:15:28 +0000 |
commit | 583f2a9de8e503773a427facd5f81a82b40bd585 (patch) | |
tree | 35d434db32056e7d0b231f56f2732c031c130a1d /OpenSim/Grid/UserServer | |
parent | * Tweaks to Java engine (uses less threads). Added support for OnFrame and On... (diff) | |
download | opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.zip opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.tar.gz opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.tar.bz2 opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.tar.xz |
*Removed SimProfile.cs as it is no longer needed (in favor of SimProfileData)
*Added simulator_data_request XMLRPC method to request data from the grid server about a sim instead of faking its login
*Login is progressing, now just getting an XML error (http://pastebin.com/942515) -- if you can fix this, throw MingChen in IRC a Private Message
Diffstat (limited to 'OpenSim/Grid/UserServer')
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 4610a9d..4216515 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -29,7 +29,6 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using Nwc.XmlRpc; | 30 | using Nwc.XmlRpc; |
31 | using OpenSim.Framework.Data; | 31 | using OpenSim.Framework.Data; |
32 | using OpenSim.Framework.Sims; | ||
33 | using OpenSim.Framework.UserManagement; | 32 | using OpenSim.Framework.UserManagement; |
34 | 33 | ||
35 | namespace OpenSim.Grid.UserServer | 34 | namespace OpenSim.Grid.UserServer |
@@ -48,23 +47,23 @@ namespace OpenSim.Grid.UserServer | |||
48 | public override void CustomiseResponse( LoginResponse response, UserProfileData theUser) | 47 | public override void CustomiseResponse( LoginResponse response, UserProfileData theUser) |
49 | { | 48 | { |
50 | // Load information from the gridserver | 49 | // Load information from the gridserver |
51 | SimProfile SimInfo = new SimProfile(); | 50 | SimProfileData SimInfo = new SimProfileData(); |
52 | SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey); | 51 | SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey); |
53 | 52 | ||
54 | // Customise the response | 53 | // Customise the response |
55 | // Home Location | 54 | // Home Location |
56 | response.Home = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " + | 55 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " + |
57 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | 56 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + |
58 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 57 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; |
59 | 58 | ||
60 | // Destination | 59 | // Destination |
61 | response.SimAddress = SimInfo.sim_ip; | 60 | response.SimAddress = SimInfo.serverIP; |
62 | response.SimPort = (Int32)SimInfo.sim_port; | 61 | response.SimPort = (Int32)SimInfo.serverPort; |
63 | response.RegionX = SimInfo.RegionLocY ; | 62 | response.RegionX = SimInfo.regionLocX; |
64 | response.RegionY = SimInfo.RegionLocX ; | 63 | response.RegionY = SimInfo.regionLocX; |
65 | 64 | ||
66 | // Notify the target of an incoming user | 65 | // Notify the target of an incoming user |
67 | Console.WriteLine("Notifying " + SimInfo.regionname + " (" + SimInfo.caps_url + ")"); | 66 | Console.WriteLine("Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI+ ")"); |
68 | 67 | ||
69 | // Prepare notification | 68 | // Prepare notification |
70 | Hashtable SimParams = new Hashtable(); | 69 | Hashtable SimParams = new Hashtable(); |
@@ -83,11 +82,11 @@ namespace OpenSim.Grid.UserServer | |||
83 | 82 | ||
84 | // Update agent with target sim | 83 | // Update agent with target sim |
85 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 84 | theUser.currentAgent.currentRegion = SimInfo.UUID; |
86 | theUser.currentAgent.currentHandle = SimInfo.regionhandle; | 85 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; |
87 | 86 | ||
88 | // Send | 87 | // Send |
89 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); | 88 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); |
90 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000); | 89 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.serverURI, 3000); |
91 | } | 90 | } |
92 | } | 91 | } |
93 | } | 92 | } |