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,30 +401,51 @@ namespace OpenSim.Region.CoreModules.World.Land
public void SendLandUpdate(ScenePresence avatar, bool force) 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)
{
over.SendLandUpdateToClient(avatar.ControllingClient);
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
m_scene.RegionInfo.RegionID);
}
}
if (avatar.currentParcelUUID != over.LandData.GlobalID)
{
if (!avatar.IsChildAgent)
{
over.SendLandUpdateToClient(avatar.ControllingClient);
avatar.currentParcelUUID = over.LandData.GlobalID;
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
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))), 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)))); (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y))));
if (over != null) if (over != null)
{ {
if (force) bool NotsameID = (avatar.currentParcelUUID != over.LandData.GlobalID);
if (force || NotsameID)
{ {
if (!avatar.IsChildAgent) over.SendLandUpdateToClient(avatar.ControllingClient);
{ if (NotsameID)
over.SendLandUpdateToClient(avatar.ControllingClient);
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
m_scene.RegionInfo.RegionID);
}
}
if (avatar.currentParcelUUID != over.LandData.GlobalID)
{
if (!avatar.IsChildAgent)
{
over.SendLandUpdateToClient(avatar.ControllingClient);
avatar.currentParcelUUID = over.LandData.GlobalID; avatar.currentParcelUUID = over.LandData.GlobalID;
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
m_scene.RegionInfo.RegionID); m_scene.RegionInfo.RegionID);
}
} }
} }
} }

View File

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

View File

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

View File

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