Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
ubit 2012-09-07 19:17:21 +02:00
commit a99026691b
4 changed files with 45 additions and 20 deletions

View File

@ -401,11 +401,14 @@ namespace OpenSim.Region.CoreModules.World.Land
public void SendLandUpdate(ScenePresence avatar, bool force)
{
/* stop sendind same data twice
ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))),
(int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y))));
if (over != null)
{
if (force)
{
if (!avatar.IsChildAgent)
@ -426,6 +429,24 @@ namespace OpenSim.Region.CoreModules.World.Land
m_scene.RegionInfo.RegionID);
}
}
*/
if (avatar.IsChildAgent)
return;
ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))),
(int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y))));
if (over != null)
{
bool NotsameID = (avatar.currentParcelUUID != over.LandData.GlobalID);
if (force || NotsameID)
{
over.SendLandUpdateToClient(avatar.ControllingClient);
if (NotsameID)
avatar.currentParcelUUID = over.LandData.GlobalID;
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
m_scene.RegionInfo.RegionID);
}
}
}

View File

@ -2890,9 +2890,11 @@ namespace OpenSim.Region.Framework.Scenes
{
EventManager.TriggerOnClientLogin(client);
// Send initial parcel data
/* this is done on TriggerOnNewClient by landmanegement respective event handler
Vector3 pos = sp.AbsolutePosition;
ILandObject land = LandChannel.GetLandObject(pos.X, pos.Y);
land.SendLandUpdateToClient(client);
*/
}
return sp;

View File

@ -1315,13 +1315,15 @@ namespace OpenSim.Region.Framework.Scenes
// Create child agents in neighbouring regions
if (openChildAgents && !IsChildAgent)
{
IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
if (m_agentTransfer != null)
Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); });
m_agentTransfer.EnableChildAgents(this);
IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
if (friendsModule != null)
friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
}
// m_log.DebugFormat(

View File

@ -129,7 +129,7 @@ namespace OpenSim.Services.Connectors
string ret = serverUri.Uri.AbsoluteUri;
if (ret.EndsWith("/"))
ret = ret.Substring(0, ret.Length - 1);
return serverUri.Uri.AbsoluteUri;
return ret;
}
protected void retryCheck(object source, ElapsedEventArgs e)