diff options
author | diva | 2009-01-03 08:51:54 +0000 |
---|---|---|
committer | diva | 2009-01-03 08:51:54 +0000 |
commit | dd2a82f81c893a202b906a41b5ad6318d88cdfd3 (patch) | |
tree | 05e5cee29762cefa27a3e214f9e91e555a328ae1 /OpenSim/Region | |
parent | Undoing the bump up of MajorInterfaceVersion number back to 2. This just does... (diff) | |
download | opensim-SC_OLD-dd2a82f81c893a202b906a41b5ad6318d88cdfd3.zip opensim-SC_OLD-dd2a82f81c893a202b906a41b5ad6318d88cdfd3.tar.gz opensim-SC_OLD-dd2a82f81c893a202b906a41b5ad6318d88cdfd3.tar.bz2 opensim-SC_OLD-dd2a82f81c893a202b906a41b5ad6318d88cdfd3.tar.xz |
Extra check to avoid client crashes on HG home teleports.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.cs | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.cs index da1d3a7..ca644a6 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.cs | |||
@@ -52,26 +52,32 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
52 | m_log.Debug("[HGScene]: TeleportClientHome " + client.FirstName + " " + client.LastName); | 52 | m_log.Debug("[HGScene]: TeleportClientHome " + client.FirstName + " " + client.LastName); |
53 | 53 | ||
54 | CachedUserInfo uinfo = CommsManager.UserProfileCacheService.GetUserDetails(agentId); | 54 | CachedUserInfo uinfo = CommsManager.UserProfileCacheService.GetUserDetails(agentId); |
55 | UserProfileData UserProfile = uinfo.UserProfile; | 55 | if (uinfo != null) |
56 | |||
57 | if (UserProfile != null) | ||
58 | { | 56 | { |
59 | RegionInfo regionInfo = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); | 57 | UserProfileData UserProfile = uinfo.UserProfile; |
58 | |||
59 | if (UserProfile != null) | ||
60 | { | ||
61 | RegionInfo regionInfo = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); | ||
60 | //if (regionInfo != null) | 62 | //if (regionInfo != null) |
61 | //{ | 63 | //{ |
62 | // UserProfile.HomeRegionID = regionInfo.RegionID; | 64 | // UserProfile.HomeRegionID = regionInfo.RegionID; |
63 | // //CommsManager.UserService.UpdateUserProfile(UserProfile); | 65 | // //CommsManager.UserService.UpdateUserProfile(UserProfile); |
64 | //} | 66 | //} |
65 | if (regionInfo == null) | 67 | if (regionInfo == null) |
66 | { | 68 | { |
67 | // can't find the Home region: Tell viewer and abort | 69 | // can't find the Home region: Tell viewer and abort |
68 | client.SendTeleportFailed("Your home-region could not be found."); | 70 | client.SendTeleportFailed("Your home-region could not be found."); |
69 | return; | 71 | return; |
72 | } | ||
73 | RequestTeleportLocation( | ||
74 | client, regionInfo.RegionHandle, UserProfile.HomeLocation, UserProfile.HomeLookAt, | ||
75 | (uint)(TPFlags.SetLastToTarget | TPFlags.ViaHome)); | ||
70 | } | 76 | } |
71 | RequestTeleportLocation( | ||
72 | client, regionInfo.RegionHandle, UserProfile.HomeLocation, UserProfile.HomeLookAt, | ||
73 | (uint)(TPFlags.SetLastToTarget | TPFlags.ViaHome)); | ||
74 | } | 77 | } |
78 | else | ||
79 | client.SendTeleportFailed("Sorry! I lost your home-region information."); | ||
80 | |||
75 | } | 81 | } |
76 | 82 | ||
77 | } | 83 | } |