*Land/Parcel upates are now correct with a significant movement by the Client
*Moved OnSignificantClientMovement to where it is supposed to be - SceneEvents and not ScenePresence0.6.0-stable
parent
87a519837e
commit
3900a165bc
|
@ -79,16 +79,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
{
|
||||
m_scene = scene;
|
||||
landIDList.Initialize();
|
||||
|
||||
m_scene.EventManager.OnNewPresence += handleNewPresence;
|
||||
}
|
||||
|
||||
private void handleNewPresence(ScenePresence avatar)
|
||||
{
|
||||
if (avatar.IsChildAgent)
|
||||
{
|
||||
avatar.OnSignificantClientMovement += handleSignificantClientMovement;
|
||||
}
|
||||
}
|
||||
|
||||
#region Land Object From Storage Functions
|
||||
|
|
|
@ -51,6 +51,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
m_scene.EventManager.OnValidateLandBuy += landChannel.handleLandValidationRequest;
|
||||
m_scene.EventManager.OnLandBuy += landChannel.handleLandBuyRequest;
|
||||
m_scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient);
|
||||
m_scene.EventManager.OnSignificantClientMovement += landChannel.handleSignificantClientMovement;
|
||||
|
||||
lock (m_scene)
|
||||
{
|
||||
|
|
|
@ -121,6 +121,12 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
|
||||
|
||||
|
||||
public delegate void SignificantClientMovement(IClientAPI remote_client);
|
||||
|
||||
public event SignificantClientMovement OnSignificantClientMovement;
|
||||
|
||||
|
||||
|
||||
public delegate void NewGridInstantMessage(GridInstantMessage message);
|
||||
|
||||
public event NewGridInstantMessage OnGridInstantMessageToIMModule;
|
||||
|
@ -279,6 +285,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
|
||||
private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight
|
||||
private ScriptControlEvent handlerScriptControlEvent = null;
|
||||
private SignificantClientMovement handlerSignificantClientMovement = null;
|
||||
|
||||
private LandBuy handlerLandBuy = null;
|
||||
private LandBuy handlerValidateLandBuy = null;
|
||||
|
@ -608,6 +615,15 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void TriggerSignificantClientMovement(IClientAPI client)
|
||||
{
|
||||
handlerSignificantClientMovement = OnSignificantClientMovement;
|
||||
if (handlerSignificantClientMovement != null)
|
||||
{
|
||||
handlerSignificantClientMovement(client);
|
||||
|
||||
}
|
||||
}
|
||||
internal void TriggerControlEvent(uint p, LLUUID scriptUUID, LLUUID avatarID, uint held, uint _changed)
|
||||
{
|
||||
handlerScriptControlEvent = OnScriptControlEvent;
|
||||
|
|
|
@ -153,7 +153,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
//neighbouring regions we have enabled a child agent in
|
||||
private readonly List<ulong> m_knownChildRegions = new List<ulong>();
|
||||
|
||||
private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement;
|
||||
|
||||
/// <summary>
|
||||
/// Implemented Control Flags
|
||||
|
@ -174,10 +173,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// </summary>
|
||||
private LLVector3 posLastSignificantMove = new LLVector3();
|
||||
|
||||
public delegate void SignificantClientMovement(IClientAPI remote_client);
|
||||
|
||||
public event SignificantClientMovement OnSignificantClientMovement;
|
||||
|
||||
private UpdateQueue m_partsUpdateQueue = new UpdateQueue();
|
||||
private Dictionary<LLUUID, ScenePartUpdate> m_updateTimes = new Dictionary<LLUUID, ScenePartUpdate>();
|
||||
|
||||
|
@ -1617,13 +1612,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5)
|
||||
{
|
||||
posLastSignificantMove = AbsolutePosition;
|
||||
handlerSignificantClientMovement = OnSignificantClientMovement;
|
||||
if (handlerSignificantClientMovement != null)
|
||||
{
|
||||
handlerSignificantClientMovement(m_controllingClient);
|
||||
m_scene.EventManager.TriggerSignificantClientMovement(m_controllingClient);
|
||||
m_scene.NotifyMyCoarseLocationChange();
|
||||
}
|
||||
}
|
||||
|
||||
// Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m
|
||||
if (Util.GetDistanceTo(AbsolutePosition,m_LastChildAgentUpdatePosition) > 32)
|
||||
|
|
Loading…
Reference in New Issue