aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land/LandObject.cs
diff options
context:
space:
mode:
authorMelanie2012-06-07 23:34:22 +0100
committerMelanie2012-06-07 23:34:22 +0100
commit69dd5b855adb8178cc1057a645a2a6d433c2dc0f (patch)
tree392a996bd1aeab76743288fcfd7300a1a58faac1 /OpenSim/Region/CoreModules/World/Land/LandObject.cs
parentMerge branch 'master' into careminster (diff)
parentImplement playing of the real collision sounds, change scaling for avatar (diff)
downloadopensim-SC_OLD-69dd5b855adb8178cc1057a645a2a6d433c2dc0f.zip
opensim-SC_OLD-69dd5b855adb8178cc1057a645a2a6d433c2dc0f.tar.gz
opensim-SC_OLD-69dd5b855adb8178cc1057a645a2a6d433c2dc0f.tar.bz2
opensim-SC_OLD-69dd5b855adb8178cc1057a645a2a6d433c2dc0f.tar.xz
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandObject.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 16792b3..f32e4d8 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -50,6 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Land
50 private bool[,] m_landBitmap = new bool[landArrayMax,landArrayMax]; 50 private bool[,] m_landBitmap = new bool[landArrayMax,landArrayMax];
51 51
52 private int m_lastSeqId = 0; 52 private int m_lastSeqId = 0;
53 private int m_expiryCounter = 0;
53 54
54 protected LandData m_landData = new LandData(); 55 protected LandData m_landData = new LandData();
55 protected Scene m_scene; 56 protected Scene m_scene;
@@ -135,6 +136,8 @@ namespace OpenSim.Region.CoreModules.World.Land
135 else 136 else
136 LandData.GroupID = UUID.Zero; 137 LandData.GroupID = UUID.Zero;
137 LandData.IsGroupOwned = is_group_owned; 138 LandData.IsGroupOwned = is_group_owned;
139
140 m_scene.EventManager.OnFrame += OnFrame;
138 } 141 }
139 142
140 #endregion 143 #endregion
@@ -1199,6 +1202,17 @@ namespace OpenSim.Region.CoreModules.World.Land
1199 1202
1200 #endregion 1203 #endregion
1201 1204
1205 private void OnFrame()
1206 {
1207 m_expiryCounter++;
1208
1209 if (m_expiryCounter >= 50)
1210 {
1211 ExpireAccessList();
1212 m_expiryCounter = 0;
1213 }
1214 }
1215
1202 private void ExpireAccessList() 1216 private void ExpireAccessList()
1203 { 1217 {
1204 List<LandAccessEntry> delete = new List<LandAccessEntry>(); 1218 List<LandAccessEntry> delete = new List<LandAccessEntry>();
@@ -1209,7 +1223,22 @@ namespace OpenSim.Region.CoreModules.World.Land
1209 delete.Add(entry); 1223 delete.Add(entry);
1210 } 1224 }
1211 foreach (LandAccessEntry entry in delete) 1225 foreach (LandAccessEntry entry in delete)
1226 {
1212 LandData.ParcelAccessList.Remove(entry); 1227 LandData.ParcelAccessList.Remove(entry);
1228 ScenePresence presence;
1229
1230 if (m_scene.TryGetScenePresence(entry.AgentID, out presence) && (!presence.IsChildAgent))
1231 {
1232 ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
1233 if (land.LandData.LocalID == LandData.LocalID)
1234 {
1235 Vector3 pos = m_scene.GetNearestAllowedPosition(presence, land);
1236 presence.TeleportWithMomentum(pos);
1237 presence.ControllingClient.SendAlertMessage("You have been ejected from this land");
1238 }
1239 }
1240 m_log.DebugFormat("[LAND]: Removing entry {0} because it has expired", entry.AgentID);
1241 }
1213 1242
1214 if (delete.Count > 0) 1243 if (delete.Count > 0)
1215 m_scene.EventManager.TriggerLandObjectUpdated((uint)LandData.LocalID, this); 1244 m_scene.EventManager.TriggerLandObjectUpdated((uint)LandData.LocalID, this);