diff options
author | Homer Horwitz | 2008-09-24 21:12:21 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-09-24 21:12:21 +0000 |
commit | fe9aea258ff4142e718b4916ccefeeedef229768 (patch) | |
tree | f60c40697833392b35788fbc5cd97a5014bb29b7 /OpenSim/Grid/UserServer | |
parent | light the mysql region tests (diff) | |
download | opensim-SC_OLD-fe9aea258ff4142e718b4916ccefeeedef229768.zip opensim-SC_OLD-fe9aea258ff4142e718b4916ccefeeedef229768.tar.gz opensim-SC_OLD-fe9aea258ff4142e718b4916ccefeeedef229768.tar.bz2 opensim-SC_OLD-fe9aea258ff4142e718b4916ccefeeedef229768.tar.xz |
Add persistence of active gestures. This needs an UGAIM update to work.
Active gestures are sent as part of the login-response. Added
fetchActiveGestures to SQLite and MySQL; added an empty one for MSSQL and
NHibernate. Using the empty ones won't cause errors, but doesn't provide
persistence either, of course.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 8ab9af1..573e546 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -131,6 +131,9 @@ namespace OpenSim.Grid.UserServer | |||
131 | /// <param name="startLocationRequest">The requested start location</param> | 131 | /// <param name="startLocationRequest">The requested start location</param> |
132 | public override bool CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest) | 132 | public override bool CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest) |
133 | { | 133 | { |
134 | // add active gestures to login-response | ||
135 | AddActiveGestures(response, theUser); | ||
136 | |||
134 | // HomeLocation | 137 | // HomeLocation |
135 | RegionProfileData homeInfo = null; | 138 | RegionProfileData homeInfo = null; |
136 | // use the homeRegionID if it is stored already. If not, use the regionHandle as before | 139 | // use the homeRegionID if it is stored already. If not, use the regionHandle as before |
@@ -243,10 +246,37 @@ namespace OpenSim.Grid.UserServer | |||
243 | // theUser.HomeLookAt.X, theUser.HomeLookAt.Y, theUser.HomeLookAt.Z); | 246 | // theUser.HomeLookAt.X, theUser.HomeLookAt.Y, theUser.HomeLookAt.Z); |
244 | theUser.CurrentAgent.Position = new Vector3(128,128,0); | 247 | theUser.CurrentAgent.Position = new Vector3(128,128,0); |
245 | response.StartLocation = "safe"; | 248 | response.StartLocation = "safe"; |
246 | 249 | ||
247 | return PrepareLoginToRegion(regionInfo, theUser, response); | 250 | return PrepareLoginToRegion(regionInfo, theUser, response); |
248 | } | 251 | } |
249 | 252 | ||
253 | /// <summary> | ||
254 | /// Add active gestures of the user to the login response. | ||
255 | /// </summary> | ||
256 | /// <param name="response"> | ||
257 | /// A <see cref="LoginResponse"/> | ||
258 | /// </param> | ||
259 | /// <param name="theUser"> | ||
260 | /// A <see cref="UserProfileData"/> | ||
261 | /// </param> | ||
262 | private void AddActiveGestures(LoginResponse response, UserProfileData theUser) | ||
263 | { | ||
264 | List<InventoryItemBase> gestures = m_inventoryService.GetActiveGestures(theUser.ID); | ||
265 | m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count); | ||
266 | ArrayList list = new ArrayList(); | ||
267 | if (gestures != null) | ||
268 | { | ||
269 | foreach (InventoryItemBase gesture in gestures) | ||
270 | { | ||
271 | Hashtable item = new Hashtable(); | ||
272 | item["item_id"] = gesture.ID.ToString(); | ||
273 | item["asset_id"] = gesture.AssetID.ToString(); | ||
274 | list.Add(item); | ||
275 | } | ||
276 | } | ||
277 | response.ActiveGestures = list; | ||
278 | } | ||
279 | |||
250 | /// <summary> | 280 | /// <summary> |
251 | /// Prepare a login to the given region. This involves both telling the region to expect a connection | 281 | /// Prepare a login to the given region. This involves both telling the region to expect a connection |
252 | /// and appropriately customising the response to the user. | 282 | /// and appropriately customising the response to the user. |