aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authormingchen2007-12-20 03:24:34 +0000
committermingchen2007-12-20 03:24:34 +0000
commit8d841565518a29c7081212684c392bd1917dbe3e (patch)
tree9e9b112b202b0d030db2798480228f5e832e4e11 /OpenSim/Region/Environment
parent*Made a much more network friendly method of ban and pass line sending (diff)
downloadopensim-SC_OLD-8d841565518a29c7081212684c392bd1917dbe3e.zip
opensim-SC_OLD-8d841565518a29c7081212684c392bd1917dbe3e.tar.gz
opensim-SC_OLD-8d841565518a29c7081212684c392bd1917dbe3e.tar.bz2
opensim-SC_OLD-8d841565518a29c7081212684c392bd1917dbe3e.tar.xz
*Added event called after any movement is handled (OnClientMovement) - will be used for parcel banning goodness
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/LandManagement/LandManager.cs7
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs3
3 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs
index 5e243d1..72c449b 100644
--- a/OpenSim/Region/Environment/LandManagement/LandManager.cs
+++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs
@@ -100,7 +100,7 @@ namespace OpenSim.Region.Environment.LandManagement
100 m_regInfo = reginfo; 100 m_regInfo = reginfo;
101 landIDList.Initialize(); 101 landIDList.Initialize();
102 scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(handleAvatarChangingParcel); 102 scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(handleAvatarChangingParcel);
103 103 scene.EventManager.OnClientMovement += new EventManager.ClientMovement(this.handleAnyClientMovement);
104 } 104 }
105 105
106 106
@@ -660,6 +660,11 @@ namespace OpenSim.Region.Environment.LandManagement
660 } 660 }
661 } 661 }
662 662
663 public void handleAnyClientMovement(ScenePresence avatar) //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance.
664 {
665
666 }
667
663 668
664 public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client) 669 public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client)
665 { 670 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 694c548..9c8c62b 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -42,6 +42,10 @@ namespace OpenSim.Region.Environment.Scenes
42 42
43 public event OnFrameDelegate OnFrame; 43 public event OnFrameDelegate OnFrame;
44 44
45 public delegate void ClientMovement(ScenePresence client);
46
47 public event ClientMovement OnClientMovement;
48
45 public delegate void OnBackupDelegate(IRegionDataStore datastore); 49 public delegate void OnBackupDelegate(IRegionDataStore datastore);
46 50
47 public event OnBackupDelegate OnBackup; 51 public event OnBackupDelegate OnBackup;
@@ -110,6 +114,13 @@ namespace OpenSim.Region.Environment.Scenes
110 114
111 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; 115 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
112 116
117
118 public void TriggerOnClientMovement(ScenePresence avatar)
119 {
120 if(OnClientMovement != null)
121 OnClientMovement(avatar);
122 }
123
113 public void TriggerPermissionError(LLUUID user, string reason) 124 public void TriggerPermissionError(LLUUID user, string reason)
114 { 125 {
115 if (OnPermissionError != null) 126 if (OnPermissionError != null)
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 2f074d0..62abefc 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -583,6 +583,7 @@ namespace OpenSim.Region.Environment.Scenes
583 /// </summary> 583 /// </summary>
584 public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdatePacket agentData) 584 public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdatePacket agentData)
585 { 585 {
586
586 //if (m_isChildAgent) 587 //if (m_isChildAgent)
587 //{ 588 //{
588 // // Console.WriteLine("DEBUG: HandleAgentUpdate: child agent"); 589 // // Console.WriteLine("DEBUG: HandleAgentUpdate: child agent");
@@ -689,6 +690,8 @@ namespace OpenSim.Region.Environment.Scenes
689 UpdateMovementAnimations(update_movementflag); 690 UpdateMovementAnimations(update_movementflag);
690 } 691 }
691 } 692 }
693
694 m_scene.EventManager.TriggerOnClientMovement(this);
692 } 695 }
693 696
694 /// <summary> 697 /// <summary>