*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;
|
m_scene = scene;
|
||||||
landIDList.Initialize();
|
landIDList.Initialize();
|
||||||
|
|
||||||
m_scene.EventManager.OnNewPresence += handleNewPresence;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleNewPresence(ScenePresence avatar)
|
|
||||||
{
|
|
||||||
if (avatar.IsChildAgent)
|
|
||||||
{
|
|
||||||
avatar.OnSignificantClientMovement += handleSignificantClientMovement;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Land Object From Storage Functions
|
#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.OnValidateLandBuy += landChannel.handleLandValidationRequest;
|
||||||
m_scene.EventManager.OnLandBuy += landChannel.handleLandBuyRequest;
|
m_scene.EventManager.OnLandBuy += landChannel.handleLandBuyRequest;
|
||||||
m_scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient);
|
m_scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient);
|
||||||
|
m_scene.EventManager.OnSignificantClientMovement += landChannel.handleSignificantClientMovement;
|
||||||
|
|
||||||
lock (m_scene)
|
lock (m_scene)
|
||||||
{
|
{
|
||||||
|
|
|
@ -121,6 +121,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
|
public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
|
||||||
|
|
||||||
|
|
||||||
|
public delegate void SignificantClientMovement(IClientAPI remote_client);
|
||||||
|
|
||||||
|
public event SignificantClientMovement OnSignificantClientMovement;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public delegate void NewGridInstantMessage(GridInstantMessage message);
|
public delegate void NewGridInstantMessage(GridInstantMessage message);
|
||||||
|
|
||||||
public event NewGridInstantMessage OnGridInstantMessageToIMModule;
|
public event NewGridInstantMessage OnGridInstantMessageToIMModule;
|
||||||
|
@ -279,6 +285,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
|
private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
|
||||||
private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight
|
private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight
|
||||||
private ScriptControlEvent handlerScriptControlEvent = null;
|
private ScriptControlEvent handlerScriptControlEvent = null;
|
||||||
|
private SignificantClientMovement handlerSignificantClientMovement = null;
|
||||||
|
|
||||||
private LandBuy handlerLandBuy = null;
|
private LandBuy handlerLandBuy = null;
|
||||||
private LandBuy handlerValidateLandBuy = 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)
|
internal void TriggerControlEvent(uint p, LLUUID scriptUUID, LLUUID avatarID, uint held, uint _changed)
|
||||||
{
|
{
|
||||||
handlerScriptControlEvent = OnScriptControlEvent;
|
handlerScriptControlEvent = OnScriptControlEvent;
|
||||||
|
|
|
@ -153,7 +153,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
//neighbouring regions we have enabled a child agent in
|
//neighbouring regions we have enabled a child agent in
|
||||||
private readonly List<ulong> m_knownChildRegions = new List<ulong>();
|
private readonly List<ulong> m_knownChildRegions = new List<ulong>();
|
||||||
|
|
||||||
private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implemented Control Flags
|
/// Implemented Control Flags
|
||||||
|
@ -174,10 +173,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private LLVector3 posLastSignificantMove = new LLVector3();
|
private LLVector3 posLastSignificantMove = new LLVector3();
|
||||||
|
|
||||||
public delegate void SignificantClientMovement(IClientAPI remote_client);
|
|
||||||
|
|
||||||
public event SignificantClientMovement OnSignificantClientMovement;
|
|
||||||
|
|
||||||
private UpdateQueue m_partsUpdateQueue = new UpdateQueue();
|
private UpdateQueue m_partsUpdateQueue = new UpdateQueue();
|
||||||
private Dictionary<LLUUID, ScenePartUpdate> m_updateTimes = new Dictionary<LLUUID, ScenePartUpdate>();
|
private Dictionary<LLUUID, ScenePartUpdate> m_updateTimes = new Dictionary<LLUUID, ScenePartUpdate>();
|
||||||
|
|
||||||
|
@ -1617,12 +1612,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5)
|
if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5)
|
||||||
{
|
{
|
||||||
posLastSignificantMove = AbsolutePosition;
|
posLastSignificantMove = AbsolutePosition;
|
||||||
handlerSignificantClientMovement = OnSignificantClientMovement;
|
m_scene.EventManager.TriggerSignificantClientMovement(m_controllingClient);
|
||||||
if (handlerSignificantClientMovement != null)
|
m_scene.NotifyMyCoarseLocationChange();
|
||||||
{
|
|
||||||
handlerSignificantClientMovement(m_controllingClient);
|
|
||||||
m_scene.NotifyMyCoarseLocationChange();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m
|
// Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m
|
||||||
|
|
Loading…
Reference in New Issue