diff options
author | Melanie | 2012-06-07 23:34:22 +0100 |
---|---|---|
committer | Melanie | 2012-06-07 23:34:22 +0100 |
commit | 69dd5b855adb8178cc1057a645a2a6d433c2dc0f (patch) | |
tree | 392a996bd1aeab76743288fcfd7300a1a58faac1 /OpenSim/Region/CoreModules/World/Land | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Implement playing of the real collision sounds, change scaling for avatar (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 29 |
2 files changed, 34 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 2fa0b3f..51dcb67 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1101,8 +1101,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1101 | { | 1101 | { |
1102 | if (!temp.Contains(currentParcel)) | 1102 | if (!temp.Contains(currentParcel)) |
1103 | { | 1103 | { |
1104 | currentParcel.ForceUpdateLandInfo(); | 1104 | if (!currentParcel.IsEitherBannedOrRestricted(remote_client.AgentId)) |
1105 | temp.Add(currentParcel); | 1105 | { |
1106 | currentParcel.ForceUpdateLandInfo(); | ||
1107 | temp.Add(currentParcel); | ||
1108 | } | ||
1106 | } | 1109 | } |
1107 | } | 1110 | } |
1108 | } | 1111 | } |
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); |