aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authormingchen2007-12-20 02:36:27 +0000
committermingchen2007-12-20 02:36:27 +0000
commita596b7696a0d880cd322fcad864fc92b85a6a3b7 (patch)
tree4f8d26fcbf2f73b1560a5584d59c2703b2026664 /OpenSim/Region/Environment/Scenes
parentAdded null check back into ModuleLoader.cs (diff)
downloadopensim-SC-a596b7696a0d880cd322fcad864fc92b85a6a3b7.zip
opensim-SC-a596b7696a0d880cd322fcad864fc92b85a6a3b7.tar.gz
opensim-SC-a596b7696a0d880cd322fcad864fc92b85a6a3b7.tar.bz2
opensim-SC-a596b7696a0d880cd322fcad864fc92b85a6a3b7.tar.xz
*Made a much more network friendly method of ban and pass line sending
*Added an event that is triggered when an agent enters a new parcel
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs42
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs7
3 files changed, 50 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index eec07fc..474d8d5 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -230,8 +230,8 @@ namespace OpenSim.Region.Environment.Scenes
230 m_LandManager = new LandManager(this, m_regInfo); 230 m_LandManager = new LandManager(this, m_regInfo);
231 231
232 //Bind Storage Manager functions to some land manager functions for this scene 232 //Bind Storage Manager functions to some land manager functions for this scene
233 m_LandManager.OnLandObjectAdded += new LandManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject); 233 EventManager.OnLandObjectAdded += new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject);
234 m_LandManager.OnLandObjectRemoved += new LandManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject); 234 EventManager.OnLandObjectRemoved += new EventManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject);
235 235
236 m_estateManager = new EstateManager(this, m_regInfo); 236 m_estateManager = new EstateManager(this, m_regInfo);
237 237
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index e058745..694c548 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -29,6 +29,7 @@
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
32using OpenSim.Region.Environment.LandManagement;
32 33
33namespace OpenSim.Region.Environment.Scenes 34namespace OpenSim.Region.Environment.Scenes
34{ 35{
@@ -78,6 +79,7 @@ namespace OpenSim.Region.Environment.Scenes
78 public delegate void OnPermissionErrorDelegate(LLUUID user, string reason); 79 public delegate void OnPermissionErrorDelegate(LLUUID user, string reason);
79 80
80 public event ObjectGrabDelegate OnObjectGrab; 81 public event ObjectGrabDelegate OnObjectGrab;
82
81 public event OnPermissionErrorDelegate OnPermissionError; 83 public event OnPermissionErrorDelegate OnPermissionError;
82 84
83 public delegate void NewRezScript(uint localID, LLUUID itemID, string script); 85 public delegate void NewRezScript(uint localID, LLUUID itemID, string script);
@@ -96,6 +98,18 @@ namespace OpenSim.Region.Environment.Scenes
96 98
97 public event SceneGroupGrabed OnSceneGroupGrab; 99 public event SceneGroupGrabed OnSceneGroupGrab;
98 100
101 public delegate void LandObjectAdded(Land newParcel, LLUUID regionUUID);
102
103 public event LandObjectAdded OnLandObjectAdded;
104
105 public delegate void LandObjectRemoved(LLUUID globalID);
106
107 public event LandObjectRemoved OnLandObjectRemoved;
108
109 public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, LLUUID regionID);
110
111 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
112
99 public void TriggerPermissionError(LLUUID user, string reason) 113 public void TriggerPermissionError(LLUUID user, string reason)
100 { 114 {
101 if (OnPermissionError != null) 115 if (OnPermissionError != null)
@@ -210,5 +224,33 @@ namespace OpenSim.Region.Environment.Scenes
210 OnSceneGroupGrab(groupID, offset, userID); 224 OnSceneGroupGrab(groupID, offset, userID);
211 } 225 }
212 } 226 }
227
228 public void TriggerLandObjectAdded(Land newParcel,LLUUID regionID)
229 {
230 if (OnLandObjectAdded != null)
231 {
232 OnLandObjectAdded(newParcel, regionID);
233 }
234 }
235 public void TriggerLandObjectRemoved(LLUUID globalID)
236 {
237 if (OnLandObjectRemoved != null)
238 {
239 OnLandObjectRemoved(globalID);
240 }
241 }
242 public void TriggerLandObjectUpdated(uint localParcelID, Land newParcel)
243 {
244 //triggerLandObjectRemoved(localParcelID);
245 TriggerLandObjectAdded(newParcel,newParcel.m_scene.RegionInfo.RegionID);
246 }
247
248 public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, LLUUID regionID)
249 {
250 if (OnAvatarEnteringNewParcel != null)
251 {
252 OnAvatarEnteringNewParcel(avatar, localLandID, regionID);
253 }
254 }
213 } 255 }
214} \ No newline at end of file 256} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 89701d7..2f074d0 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Scenes
42 { 42 {
43 public static AvatarAnimations Animations; 43 public static AvatarAnimations Animations;
44 public static byte[] DefaultTexture; 44 public static byte[] DefaultTexture;
45 45 public LLUUID currentParcelUUID = LLUUID.Zero;
46 private List<LLUUID> m_animations = new List<LLUUID>(); 46 private List<LLUUID> m_animations = new List<LLUUID>();
47 private List<int> m_animationSeqs = new List<int>(); 47 private List<int> m_animationSeqs = new List<int>();
48 48
@@ -448,6 +448,11 @@ namespace OpenSim.Region.Environment.Scenes
448 } 448 }
449 } 449 }
450 450
451 public void forceAvatarMovement(Vector3 position, Quaternion rotation)
452 {
453 AddNewMovement(position, rotation);
454 }
455
451 #region Status Methods 456 #region Status Methods
452 /// <summary> 457 /// <summary>
453 /// This turns a child agent, into a root agent 458 /// This turns a child agent, into a root agent