*Added event called after any movement is handled (OnClientMovement) - will be used for parcel banning goodness

afrisby
mingchen 2007-12-20 03:24:34 +00:00
parent a596b7696a
commit 8d84156551
3 changed files with 20 additions and 1 deletions

View File

@ -100,7 +100,7 @@ namespace OpenSim.Region.Environment.LandManagement
m_regInfo = reginfo; m_regInfo = reginfo;
landIDList.Initialize(); landIDList.Initialize();
scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(handleAvatarChangingParcel); scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(handleAvatarChangingParcel);
scene.EventManager.OnClientMovement += new EventManager.ClientMovement(this.handleAnyClientMovement);
} }
@ -660,6 +660,11 @@ namespace OpenSim.Region.Environment.LandManagement
} }
} }
public void handleAnyClientMovement(ScenePresence avatar) //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance.
{
}
public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client) public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client)
{ {

View File

@ -42,6 +42,10 @@ namespace OpenSim.Region.Environment.Scenes
public event OnFrameDelegate OnFrame; public event OnFrameDelegate OnFrame;
public delegate void ClientMovement(ScenePresence client);
public event ClientMovement OnClientMovement;
public delegate void OnBackupDelegate(IRegionDataStore datastore); public delegate void OnBackupDelegate(IRegionDataStore datastore);
public event OnBackupDelegate OnBackup; public event OnBackupDelegate OnBackup;
@ -110,6 +114,13 @@ namespace OpenSim.Region.Environment.Scenes
public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
public void TriggerOnClientMovement(ScenePresence avatar)
{
if(OnClientMovement != null)
OnClientMovement(avatar);
}
public void TriggerPermissionError(LLUUID user, string reason) public void TriggerPermissionError(LLUUID user, string reason)
{ {
if (OnPermissionError != null) if (OnPermissionError != null)

View File

@ -583,6 +583,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdatePacket agentData) public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdatePacket agentData)
{ {
//if (m_isChildAgent) //if (m_isChildAgent)
//{ //{
// // Console.WriteLine("DEBUG: HandleAgentUpdate: child agent"); // // Console.WriteLine("DEBUG: HandleAgentUpdate: child agent");
@ -689,6 +690,8 @@ namespace OpenSim.Region.Environment.Scenes
UpdateMovementAnimations(update_movementflag); UpdateMovementAnimations(update_movementflag);
} }
} }
m_scene.EventManager.TriggerOnClientMovement(this);
} }
/// <summary> /// <summary>