* If the position that comes in on Scene.SetHomeRezPoint has a component that is 255.5, replace the component with the user's position in the simulator.

* Fixes mantis 4414: http://opensimulator.org/mantis/view.php?id=4414
mysql-performance
Teravus Ovares (Dan Olivares) 2009-12-03 01:50:54 -05:00
parent c58d30616b
commit af04cd1ae0
1 changed files with 19 additions and 0 deletions

View File

@ -3034,6 +3034,25 @@ namespace OpenSim.Region.Framework.Scenes
// TODO: The next line can be removed, as soon as only homeRegionID based UserServers are around. // TODO: The next line can be removed, as soon as only homeRegionID based UserServers are around.
// TODO: The HomeRegion property can be removed then, too // TODO: The HomeRegion property can be removed then, too
UserProfile.HomeRegion = RegionInfo.RegionHandle; UserProfile.HomeRegion = RegionInfo.RegionHandle;
// Linden Client limitation..
if (position.X == 255.5f || position.Y == 255.5f)
{
ScenePresence avatar = null;
if (TryGetAvatar(remoteClient.AgentId, out avatar))
{
if (position.X == 255.5f)
{
position.X = avatar.AbsolutePosition.X;
}
if (position.Y == 255.5f)
{
position.Y = avatar.AbsolutePosition.Y;
}
}
}
UserProfile.HomeLocation = position; UserProfile.HomeLocation = position;
UserProfile.HomeLookAt = lookAt; UserProfile.HomeLookAt = lookAt;
CommsManager.UserService.UpdateUserProfile(UserProfile); CommsManager.UserService.UpdateUserProfile(UserProfile);