MESS: changes in MakeRootAgent and CompleteMovement reordering things.

Added sending of land overlay and parcel information. This in order to
only send avatar related information after having its position well
defined and on the right parcel. THIS MAY STILL BE BAD :)
This commit is contained in:
UbitUmarov
2014-07-31 03:10:50 +01:00
parent 30f00bfb14
commit a5e9429f2b
6 changed files with 151 additions and 30 deletions

View File

@@ -213,7 +213,13 @@ namespace OpenSim.Region.CoreModules.World.Land
m_landManagementModule.setParcelOtherCleanTime(remoteClient, localID, otherCleanTime);
}
}
public void sendClientInitialLandInfo(IClientAPI remoteClient)
{
if (m_landManagementModule != null)
{
m_landManagementModule.sendClientInitialLandInfo(remoteClient);
}
}
#endregion
}
}

View File

@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.World.Land
m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
lock (m_scene)
{
m_scene.LandChannel = (ILandChannel)landChannel;
@@ -194,13 +194,14 @@ namespace OpenSim.Region.CoreModules.World.Land
client.OnParcelEjectUser += ClientOnParcelEjectUser;
client.OnParcelFreezeUser += ClientOnParcelFreezeUser;
client.OnSetStartLocationRequest += ClientOnSetHome;
/* avatar is still a child here position is unknow
EntityBase presenceEntity;
if (m_scene.Entities.TryGetValue(client.AgentId, out presenceEntity) && presenceEntity is ScenePresence)
{
SendParcelOverlay(client);
SendLandUpdate((ScenePresence)presenceEntity, true);
}
*/
}
public void EventMakeChildAgent(ScenePresence avatar)
@@ -385,12 +386,29 @@ namespace OpenSim.Region.CoreModules.World.Land
return;
}
public void sendClientInitialLandInfo(IClientAPI remoteClient)
{
SendParcelOverlay(remoteClient);
ScenePresence avatar;
if (!m_scene.TryGetScenePresence(remoteClient.AgentId, out avatar))
return;
if (avatar.IsChildAgent)
return;
ILandObject over = GetLandObject(avatar.AbsolutePosition.X,avatar.AbsolutePosition.Y);
if (over == null)
return;
avatar.currentParcelUUID = over.LandData.GlobalID;
over.SendLandUpdateToClient(avatar.ControllingClient);
}
public void SendLandUpdate(ScenePresence avatar, bool force)
{
if (avatar.IsChildAgent)
return;
ILandObject over = GetLandObjectClipedXY(avatar.AbsolutePosition.X,avatar.AbsolutePosition.Y);
ILandObject over = GetLandObjectClipedXY(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if (over != null)
{