aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserManager.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-17 05:07:14 +0000
committerTeravus Ovares2008-04-17 05:07:14 +0000
commit244bfcde5b86180981e99ac9e88eb394f20bcd09 (patch)
treea163db049045c03e475779ce082a3cdfe74aea20 /OpenSim/Grid/UserServer/UserManager.cs
parentmoved the Thread.Sleep(500), to the correct side of the ar.AsyncWaitHandle.... (diff)
downloadopensim-SC_OLD-244bfcde5b86180981e99ac9e88eb394f20bcd09.zip
opensim-SC_OLD-244bfcde5b86180981e99ac9e88eb394f20bcd09.tar.gz
opensim-SC_OLD-244bfcde5b86180981e99ac9e88eb394f20bcd09.tar.bz2
opensim-SC_OLD-244bfcde5b86180981e99ac9e88eb394f20bcd09.tar.xz
* Implements 'Set Home to Here'
* Implements 'Teleport Home' * User Server has to be updated for it to save your home in grid mode * home position accuracy is in int because the grid comms ExpectUser method tries to convert to Uint and crashes if it gets a float. Added a convert to decimal in ExpectUser but to avoid a breaking change with old revisions, kept the save value in int for now. Eventually it needs to be a float, but lets release another incremental version before doing that.
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs87
1 files changed, 87 insertions, 0 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index cf3f8d8..2a53d7b 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -363,6 +363,93 @@ namespace OpenSim.Grid.UserServer
363 if (requestData.Contains("ProfileURL")) 363 if (requestData.Contains("ProfileURL"))
364 { 364 {
365 } 365 }
366 if (requestData.Contains("home_region"))
367 {
368 try
369 {
370 userProfile.HomeRegion = Convert.ToUInt64((string)requestData["home_region"]);
371 }
372 catch (ArgumentException)
373 {
374 m_log.Error("[PROFILE]:Failed to set home region, Invalid Argument");
375 }
376 catch (FormatException)
377 {
378 m_log.Error("[PROFILE]:Failed to set home region, Invalid Format");
379 }
380 catch (OverflowException)
381 {
382 m_log.Error("[PROFILE]:Failed to set home region, Value was too large");
383 }
384
385 }
386 if (requestData.Contains("home_pos_x"))
387 {
388 try
389 {
390 userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"]);
391 }
392 catch (System.InvalidCastException)
393 {
394 m_log.Error("[PROFILE]:Failed to set home postion x");
395 }
396
397 }
398 if (requestData.Contains("home_pos_y"))
399 {
400 try
401 {
402 userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"]);
403 }
404 catch (System.InvalidCastException)
405 {
406 m_log.Error("[PROFILE]:Failed to set home postion y");
407 }
408 }
409 if (requestData.Contains("home_pos_z"))
410 {
411 try
412 {
413 userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"]);
414 }
415 catch (System.InvalidCastException)
416 {
417 m_log.Error("[PROFILE]:Failed to set home postion z");
418 }
419 }
420 if (requestData.Contains("home_look_x"))
421 {
422 try
423 {
424 userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"]);
425 }
426 catch (System.InvalidCastException)
427 {
428 m_log.Error("[PROFILE]:Failed to set home lookat x");
429 }
430 }
431 if (requestData.Contains("home_look_y"))
432 {
433 try
434 {
435 userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"]);
436 }
437 catch (System.InvalidCastException)
438 {
439 m_log.Error("[PROFILE]:Failed to set home lookat y");
440 }
441 }
442 if (requestData.Contains("home_look_z"))
443 {
444 try
445 {
446 userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]);
447 }
448 catch (System.InvalidCastException)
449 {
450 m_log.Error("[PROFILE]:Failed to set home lookat z");
451 }
452 }
366 // call plugin! 453 // call plugin!
367 bool ret = UpdateUserProfileProperties(userProfile); 454 bool ret = UpdateUserProfileProperties(userProfile);
368 responseData["returnString"] = ret.ToString(); 455 responseData["returnString"] = ret.ToString();