diff options
Diffstat (limited to 'OpenSim')
8 files changed, 112 insertions, 122 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index ddc2a07..fdef9d8 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -61,6 +61,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
61 | public event ChangeDelegate OnEstateInfoChange; | 61 | public event ChangeDelegate OnEstateInfoChange; |
62 | public event MessageDelegate OnEstateMessage; | 62 | public event MessageDelegate OnEstateMessage; |
63 | 63 | ||
64 | private int m_delayCount = 0; | ||
65 | |||
64 | #region Packet Data Responders | 66 | #region Packet Data Responders |
65 | 67 | ||
66 | private void clientSendDetailedEstateData(IClientAPI remote_client, UUID invoice) | 68 | private void clientSendDetailedEstateData(IClientAPI remote_client, UUID invoice) |
@@ -270,7 +272,11 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
270 | { | 272 | { |
271 | if (timeInSeconds == -1) | 273 | if (timeInSeconds == -1) |
272 | { | 274 | { |
273 | restartModule.AbortRestart("Restart aborted by region manager"); | 275 | m_delayCount++; |
276 | if (m_delayCount > 3) | ||
277 | return; | ||
278 | |||
279 | restartModule.DelayRestart(3600, "Restart delayed by region manager"); | ||
274 | return; | 280 | return; |
275 | } | 281 | } |
276 | 282 | ||
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); |
diff --git a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs index 65180b5a..287738a 100644 --- a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs +++ b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs | |||
@@ -59,6 +59,7 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
59 | protected bool m_Notice = false; | 59 | protected bool m_Notice = false; |
60 | protected IDialogModule m_DialogModule = null; | 60 | protected IDialogModule m_DialogModule = null; |
61 | protected string m_MarkerPath = String.Empty; | 61 | protected string m_MarkerPath = String.Empty; |
62 | private int[] m_CurrentAlerts = null; | ||
62 | 63 | ||
63 | public void Initialise(IConfigSource config) | 64 | public void Initialise(IConfigSource config) |
64 | { | 65 | { |
@@ -141,6 +142,7 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
141 | m_Message = message; | 142 | m_Message = message; |
142 | m_Initiator = initiator; | 143 | m_Initiator = initiator; |
143 | m_Notice = notice; | 144 | m_Notice = notice; |
145 | m_CurrentAlerts = alerts; | ||
144 | m_Alerts = new List<int>(alerts); | 146 | m_Alerts = new List<int>(alerts); |
145 | m_Alerts.Sort(); | 147 | m_Alerts.Sort(); |
146 | m_Alerts.Reverse(); | 148 | m_Alerts.Reverse(); |
@@ -152,12 +154,12 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
152 | return; | 154 | return; |
153 | } | 155 | } |
154 | 156 | ||
155 | int nextInterval = DoOneNotice(); | 157 | int nextInterval = DoOneNotice(true); |
156 | 158 | ||
157 | SetTimer(nextInterval); | 159 | SetTimer(nextInterval); |
158 | } | 160 | } |
159 | 161 | ||
160 | public int DoOneNotice() | 162 | public int DoOneNotice(bool sendOut) |
161 | { | 163 | { |
162 | if (m_Alerts.Count == 0 || m_Alerts[0] == 0) | 164 | if (m_Alerts.Count == 0 || m_Alerts[0] == 0) |
163 | { | 165 | { |
@@ -182,34 +184,37 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
182 | 184 | ||
183 | m_Alerts.RemoveAt(0); | 185 | m_Alerts.RemoveAt(0); |
184 | 186 | ||
185 | int minutes = currentAlert / 60; | 187 | if (sendOut) |
186 | string currentAlertString = String.Empty; | ||
187 | if (minutes > 0) | ||
188 | { | 188 | { |
189 | if (minutes == 1) | 189 | int minutes = currentAlert / 60; |
190 | currentAlertString += "1 minute"; | 190 | string currentAlertString = String.Empty; |
191 | else | 191 | if (minutes > 0) |
192 | currentAlertString += String.Format("{0} minutes", minutes); | 192 | { |
193 | if (minutes == 1) | ||
194 | currentAlertString += "1 minute"; | ||
195 | else | ||
196 | currentAlertString += String.Format("{0} minutes", minutes); | ||
197 | if ((currentAlert % 60) != 0) | ||
198 | currentAlertString += " and "; | ||
199 | } | ||
193 | if ((currentAlert % 60) != 0) | 200 | if ((currentAlert % 60) != 0) |
194 | currentAlertString += " and "; | 201 | { |
195 | } | 202 | int seconds = currentAlert % 60; |
196 | if ((currentAlert % 60) != 0) | 203 | if (seconds == 1) |
197 | { | 204 | currentAlertString += "1 second"; |
198 | int seconds = currentAlert % 60; | 205 | else |
199 | if (seconds == 1) | 206 | currentAlertString += String.Format("{0} seconds", seconds); |
200 | currentAlertString += "1 second"; | 207 | } |
201 | else | ||
202 | currentAlertString += String.Format("{0} seconds", seconds); | ||
203 | } | ||
204 | 208 | ||
205 | string msg = String.Format(m_Message, currentAlertString); | 209 | string msg = String.Format(m_Message, currentAlertString); |
206 | 210 | ||
207 | if (m_DialogModule != null && msg != String.Empty) | 211 | if (m_DialogModule != null && msg != String.Empty) |
208 | { | 212 | { |
209 | if (m_Notice) | 213 | if (m_Notice) |
210 | m_DialogModule.SendGeneralAlert(msg); | 214 | m_DialogModule.SendGeneralAlert(msg); |
211 | else | 215 | else |
212 | m_DialogModule.SendNotificationToUsersInRegion(m_Initiator, "System", msg); | 216 | m_DialogModule.SendNotificationToUsersInRegion(m_Initiator, "System", msg); |
217 | } | ||
213 | } | 218 | } |
214 | 219 | ||
215 | return currentAlert - nextAlert; | 220 | return currentAlert - nextAlert; |
@@ -226,7 +231,25 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
226 | 231 | ||
227 | private void OnTimer(object source, ElapsedEventArgs e) | 232 | private void OnTimer(object source, ElapsedEventArgs e) |
228 | { | 233 | { |
229 | int nextInterval = DoOneNotice(); | 234 | int nextInterval = DoOneNotice(true); |
235 | |||
236 | SetTimer(nextInterval); | ||
237 | } | ||
238 | |||
239 | public void DelayRestart(int seconds, string message) | ||
240 | { | ||
241 | if (m_CountdownTimer == null) | ||
242 | return; | ||
243 | |||
244 | m_CountdownTimer.Stop(); | ||
245 | m_CountdownTimer = null; | ||
246 | |||
247 | m_Alerts = new List<int>(m_CurrentAlerts); | ||
248 | m_Alerts.Add(seconds); | ||
249 | m_Alerts.Sort(); | ||
250 | m_Alerts.Reverse(); | ||
251 | |||
252 | int nextInterval = DoOneNotice(false); | ||
230 | 253 | ||
231 | SetTimer(nextInterval); | 254 | SetTimer(nextInterval); |
232 | } | 255 | } |
@@ -240,9 +263,9 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
240 | if (m_DialogModule != null && message != String.Empty) | 263 | if (m_DialogModule != null && message != String.Empty) |
241 | m_DialogModule.SendGeneralAlert(message); | 264 | m_DialogModule.SendGeneralAlert(message); |
242 | } | 265 | } |
243 | if (m_MarkerPath != String.Empty) | 266 | if (m_MarkerPath != String.Empty) |
244 | File.Delete(Path.Combine(m_MarkerPath, | 267 | File.Delete(Path.Combine(m_MarkerPath, |
245 | m_Scene.RegionInfo.RegionID.ToString())); | 268 | m_Scene.RegionInfo.RegionID.ToString())); |
246 | } | 269 | } |
247 | 270 | ||
248 | private void HandleRegionRestart(string module, string[] args) | 271 | private void HandleRegionRestart(string module, string[] args) |
diff --git a/OpenSim/Region/Framework/Interfaces/IRestartModule.cs b/OpenSim/Region/Framework/Interfaces/IRestartModule.cs index c68550f..9b25beb 100644 --- a/OpenSim/Region/Framework/Interfaces/IRestartModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRestartModule.cs | |||
@@ -35,5 +35,6 @@ namespace OpenSim.Region.Framework.Interfaces | |||
35 | TimeSpan TimeUntilRestart { get; } | 35 | TimeSpan TimeUntilRestart { get; } |
36 | void ScheduleRestart(UUID initiator, string message, int[] alerts, bool notice); | 36 | void ScheduleRestart(UUID initiator, string message, int[] alerts, bool notice); |
37 | void AbortRestart(string message); | 37 | void AbortRestart(string message); |
38 | void DelayRestart(int seconds, string message); | ||
38 | } | 39 | } |
39 | } | 40 | } |
diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs index de82ddc..a95e75a 100644 --- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs +++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs | |||
@@ -27,9 +27,11 @@ | |||
27 | // Ubit 2012 | 27 | // Ubit 2012 |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Reflection; | ||
30 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using log4net; | ||
33 | 35 | ||
34 | namespace OpenSim.Region.Framework.Scenes | 36 | namespace OpenSim.Region.Framework.Scenes |
35 | { | 37 | { |
@@ -42,9 +44,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
42 | 44 | ||
43 | public static class CollisionSounds | 45 | public static class CollisionSounds |
44 | { | 46 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
45 | private const int MaxMaterials = 7; | 49 | private const int MaxMaterials = 7; |
46 | // part part | 50 | // part part |
47 | /* | 51 | |
48 | private static UUID snd_StoneStone = new UUID("be7295c0-a158-11e1-b3dd-0800200c9a66"); | 52 | private static UUID snd_StoneStone = new UUID("be7295c0-a158-11e1-b3dd-0800200c9a66"); |
49 | private static UUID snd_StoneMetal = new UUID("be7295c0-a158-11e1-b3dd-0800201c9a66"); | 53 | private static UUID snd_StoneMetal = new UUID("be7295c0-a158-11e1-b3dd-0800201c9a66"); |
50 | private static UUID snd_StoneGlass = new UUID("be7295c0-a158-11e1-b3dd-0800202c9a66"); | 54 | private static UUID snd_StoneGlass = new UUID("be7295c0-a158-11e1-b3dd-0800202c9a66"); |
@@ -53,7 +57,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
53 | private static UUID snd_StonePlastic = new UUID("be7295c0-a158-11e1-b3dd-0800205c9a66"); | 57 | private static UUID snd_StonePlastic = new UUID("be7295c0-a158-11e1-b3dd-0800205c9a66"); |
54 | private static UUID snd_StoneRubber = new UUID("be7295c0-a158-11e1-b3dd-0800206c9a66"); | 58 | private static UUID snd_StoneRubber = new UUID("be7295c0-a158-11e1-b3dd-0800206c9a66"); |
55 | 59 | ||
56 | private static UUID snd_MetalStone = new UUID("be7295c0-a158-11e1-b3dd-0801200c9a66"); | ||
57 | private static UUID snd_MetalMetal = new UUID("be7295c0-a158-11e1-b3dd-0801201c9a66"); | 60 | private static UUID snd_MetalMetal = new UUID("be7295c0-a158-11e1-b3dd-0801201c9a66"); |
58 | private static UUID snd_MetalGlass = new UUID("be7295c0-a158-11e1-b3dd-0801202c9a66"); | 61 | private static UUID snd_MetalGlass = new UUID("be7295c0-a158-11e1-b3dd-0801202c9a66"); |
59 | private static UUID snd_MetalWood = new UUID("be7295c0-a158-11e1-b3dd-0801203c9a66"); | 62 | private static UUID snd_MetalWood = new UUID("be7295c0-a158-11e1-b3dd-0801203c9a66"); |
@@ -61,44 +64,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
61 | private static UUID snd_MetalPlastic = new UUID("be7295c0-a158-11e1-b3dd-0801205c9a66"); | 64 | private static UUID snd_MetalPlastic = new UUID("be7295c0-a158-11e1-b3dd-0801205c9a66"); |
62 | private static UUID snd_MetalRubber = new UUID("be7295c0-a158-11e1-b3dd-0801206c9a66"); | 65 | private static UUID snd_MetalRubber = new UUID("be7295c0-a158-11e1-b3dd-0801206c9a66"); |
63 | 66 | ||
64 | private static UUID snd_GlassStone = new UUID("be7295c0-a158-11e1-b3dd-0802200c9a66"); | ||
65 | private static UUID snd_GlassMetal = new UUID("be7295c0-a158-11e1-b3dd-0802201c9a66"); | ||
66 | private static UUID snd_GlassGlass = new UUID("be7295c0-a158-11e1-b3dd-0802202c9a66"); | 67 | private static UUID snd_GlassGlass = new UUID("be7295c0-a158-11e1-b3dd-0802202c9a66"); |
67 | private static UUID snd_GlassWood = new UUID("be7295c0-a158-11e1-b3dd-0802203c9a66"); | 68 | private static UUID snd_GlassWood = new UUID("be7295c0-a158-11e1-b3dd-0802203c9a66"); |
68 | private static UUID snd_GlassFlesh = new UUID("be7295c0-a158-11e1-b3dd-0802204c9a66"); | 69 | private static UUID snd_GlassFlesh = new UUID("be7295c0-a158-11e1-b3dd-0802204c9a66"); |
69 | private static UUID snd_GlassPlastic = new UUID("be7295c0-a158-11e1-b3dd-0802205c9a66"); | 70 | private static UUID snd_GlassPlastic = new UUID("be7295c0-a158-11e1-b3dd-0802205c9a66"); |
70 | private static UUID snd_GlassRubber = new UUID("be7295c0-a158-11e1-b3dd-0802206c9a66"); | 71 | private static UUID snd_GlassRubber = new UUID("be7295c0-a158-11e1-b3dd-0802206c9a66"); |
71 | 72 | ||
72 | private static UUID snd_WoodStone = new UUID("be7295c0-a158-11e1-b3dd-0803200c9a66"); | ||
73 | private static UUID snd_WoodMetal = new UUID("be7295c0-a158-11e1-b3dd-0803201c9a66"); | ||
74 | private static UUID snd_WoodGlass = new UUID("be7295c0-a158-11e1-b3dd-0803202c9a66"); | ||
75 | private static UUID snd_WoodWood = new UUID("be7295c0-a158-11e1-b3dd-0803203c9a66"); | 73 | private static UUID snd_WoodWood = new UUID("be7295c0-a158-11e1-b3dd-0803203c9a66"); |
76 | private static UUID snd_WoodFlesh = new UUID("be7295c0-a158-11e1-b3dd-0803204c9a66"); | 74 | private static UUID snd_WoodFlesh = new UUID("be7295c0-a158-11e1-b3dd-0803204c9a66"); |
77 | private static UUID snd_WoodPlastic = new UUID("be7295c0-a158-11e1-b3dd-0803205c9a66"); | 75 | private static UUID snd_WoodPlastic = new UUID("be7295c0-a158-11e1-b3dd-0803205c9a66"); |
78 | private static UUID snd_WoodRubber = new UUID("be7295c0-a158-11e1-b3dd-0803206c9a66"); | 76 | private static UUID snd_WoodRubber = new UUID("be7295c0-a158-11e1-b3dd-0803206c9a66"); |
79 | 77 | ||
80 | private static UUID snd_FleshStone = new UUID("be7295c0-a158-11e1-b3dd-0804200c9a66"); | ||
81 | private static UUID snd_FleshMetal = new UUID("be7295c0-a158-11e1-b3dd-0804201c9a66"); | ||
82 | private static UUID snd_FleshGlass = new UUID("be7295c0-a158-11e1-b3dd-0804202c9a66"); | ||
83 | private static UUID snd_FleshWood = new UUID("be7295c0-a158-11e1-b3dd-0804203c9a66"); | ||
84 | private static UUID snd_FleshFlesh = new UUID("be7295c0-a158-11e1-b3dd-0804204c9a66"); | 78 | private static UUID snd_FleshFlesh = new UUID("be7295c0-a158-11e1-b3dd-0804204c9a66"); |
85 | private static UUID snd_FleshPlastic = new UUID("be7295c0-a158-11e1-b3dd-0804205c9a66"); | 79 | private static UUID snd_FleshPlastic = new UUID("be7295c0-a158-11e1-b3dd-0804205c9a66"); |
86 | private static UUID snd_FleshRubber = new UUID("be7295c0-a158-11e1-b3dd-0804206c9a66"); | 80 | private static UUID snd_FleshRubber = new UUID("be7295c0-a158-11e1-b3dd-0804206c9a66"); |
87 | 81 | ||
88 | private static UUID snd_PlasticStone = new UUID("be7295c0-a158-11e1-b3dd-0805200c9a66"); | ||
89 | private static UUID snd_PlasticMetal = new UUID("be7295c0-a158-11e1-b3dd-0805201c9a66"); | ||
90 | private static UUID snd_PlasticGlass = new UUID("be7295c0-a158-11e1-b3dd-0805202c9a66"); | ||
91 | private static UUID snd_PlasticWood = new UUID("be7295c0-a158-11e1-b3dd-0805203c9a66"); | ||
92 | private static UUID snd_PlasticFlesh = new UUID("be7295c0-a158-11e1-b3dd-0805204c9a66"); | ||
93 | private static UUID snd_PlasticPlastic = new UUID("be7295c0-a158-11e1-b3dd-0805205c9a66"); | 82 | private static UUID snd_PlasticPlastic = new UUID("be7295c0-a158-11e1-b3dd-0805205c9a66"); |
94 | private static UUID snd_PlasticRubber = new UUID("be7295c0-a158-11e1-b3dd-0805206c9a66"); | 83 | private static UUID snd_PlasticRubber = new UUID("be7295c0-a158-11e1-b3dd-0805206c9a66"); |
95 | 84 | ||
96 | private static UUID snd_RubberStone = new UUID("be7295c0-a158-11e1-b3dd-0806200c9a66"); | ||
97 | private static UUID snd_RubberMetal = new UUID("be7295c0-a158-11e1-b3dd-0806201c9a66"); | ||
98 | private static UUID snd_RubberGlass = new UUID("be7295c0-a158-11e1-b3dd-0806202c9a66"); | ||
99 | private static UUID snd_RubberWood = new UUID("be7295c0-a158-11e1-b3dd-0806203c9a66"); | ||
100 | private static UUID snd_RubberFlesh = new UUID("be7295c0-a158-11e1-b3dd-0806204c9a66"); | ||
101 | private static UUID snd_RubberPlastic = new UUID("be7295c0-a158-11e1-b3dd-0806205c9a66"); | ||
102 | private static UUID snd_RubberRubber = new UUID("be7295c0-a158-11e1-b3dd-0806206c9a66"); | 85 | private static UUID snd_RubberRubber = new UUID("be7295c0-a158-11e1-b3dd-0806206c9a66"); |
103 | 86 | ||
104 | // terrain part | 87 | // terrain part |
@@ -109,50 +92,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
109 | private static UUID snd_TerrainFlesh = new UUID("be7295c0-a158-11e1-b3dd-0807200c9a66"); | 92 | private static UUID snd_TerrainFlesh = new UUID("be7295c0-a158-11e1-b3dd-0807200c9a66"); |
110 | private static UUID snd_TerrainPlastic = new UUID("be7295c0-a158-11e1-b3dd-0807200c9a66"); | 93 | private static UUID snd_TerrainPlastic = new UUID("be7295c0-a158-11e1-b3dd-0807200c9a66"); |
111 | private static UUID snd_TerrainRubber = new UUID("be7295c0-a158-11e1-b3dd-0807200c9a66"); | 94 | private static UUID snd_TerrainRubber = new UUID("be7295c0-a158-11e1-b3dd-0807200c9a66"); |
112 | */ | ||
113 | private static UUID snd_StoneStone = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
114 | private static UUID snd_StoneMetal = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
115 | private static UUID snd_StoneGlass = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
116 | private static UUID snd_StoneWood = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
117 | private static UUID snd_StoneFlesh = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
118 | private static UUID snd_StonePlastic = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
119 | private static UUID snd_StoneRubber = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
120 | |||
121 | private static UUID snd_MetalMetal = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
122 | private static UUID snd_MetalGlass = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
123 | private static UUID snd_MetalWood = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
124 | private static UUID snd_MetalFlesh = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
125 | private static UUID snd_MetalPlastic = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
126 | private static UUID snd_MetalRubber = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
127 | |||
128 | private static UUID snd_GlassGlass = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
129 | private static UUID snd_GlassWood = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
130 | private static UUID snd_GlassFlesh = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
131 | private static UUID snd_GlassPlastic = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
132 | private static UUID snd_GlassRubber = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
133 | |||
134 | private static UUID snd_WoodWood = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
135 | private static UUID snd_WoodFlesh = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
136 | private static UUID snd_WoodPlastic = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
137 | private static UUID snd_WoodRubber = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
138 | |||
139 | private static UUID snd_FleshFlesh = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
140 | private static UUID snd_FleshPlastic = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
141 | private static UUID snd_FleshRubber = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
142 | |||
143 | private static UUID snd_PlasticPlastic = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
144 | private static UUID snd_PlasticRubber = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
145 | |||
146 | private static UUID snd_RubberRubber = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
147 | |||
148 | // terrain part | ||
149 | private static UUID snd_TerrainStone = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
150 | private static UUID snd_TerrainMetal = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
151 | private static UUID snd_TerrainGlass = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
152 | private static UUID snd_TerrainWood = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
153 | private static UUID snd_TerrainFlesh = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
154 | private static UUID snd_TerrainPlastic = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
155 | private static UUID snd_TerrainRubber = new UUID("c80260ba-41fd-8a46-768a-6bf236360e3a"); | ||
156 | 95 | ||
157 | public static UUID[] m_TerrainPart = { | 96 | public static UUID[] m_TerrainPart = { |
158 | snd_TerrainStone, | 97 | snd_TerrainStone, |
@@ -163,18 +102,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
163 | snd_TerrainPlastic, | 102 | snd_TerrainPlastic, |
164 | snd_TerrainRubber | 103 | snd_TerrainRubber |
165 | }; | 104 | }; |
166 | /* | 105 | |
167 | //full assimetric sounds | ||
168 | public static UUID[] m_PartPart = { | ||
169 | snd_StoneStone, snd_StoneMetal, snd_StoneGlass, snd_StoneWood, snd_StoneFlesh, snd_StonePlastic, snd_StoneRubber, | ||
170 | snd_MetalStone, snd_MetalMetal, snd_MetalGlass, snd_MetalWood, snd_MetalFlesh, snd_MetalPlastic, snd_MetalRubber, | ||
171 | snd_GlassStone, snd_GlassMetal, snd_GlassGlass, snd_GlassWood, snd_GlassFlesh, snd_GlassPlastic, snd_GlassRubber, | ||
172 | snd_WoodStone, snd_WoodMetal, snd_WoodGlass, snd_WoodWood, snd_WoodFlesh, snd_WoodPlastic, snd_WoodRubber, | ||
173 | snd_FleshStone, snd_FleshMetal, snd_FleshGlass, snd_FleshWood, snd_FleshFlesh, snd_FleshPlastic, snd_FleshRubber, | ||
174 | snd_PlasticStone, snd_PlasticMetal, snd_PlasticGlass, snd_PlasticWood, snd_PlasticFlesh, snd_PlasticPlastic, snd_PlasticRubber, | ||
175 | snd_RubberStone, snd_RubberMetal, snd_RubberGlass, snd_RubberWood, snd_RubberFlesh, snd_RubberPlastic, snd_RubberRubber | ||
176 | }; | ||
177 | */ | ||
178 | // simetric sounds | 106 | // simetric sounds |
179 | public static UUID[] m_PartPart = { | 107 | public static UUID[] m_PartPart = { |
180 | snd_StoneStone, snd_StoneMetal, snd_StoneGlass, snd_StoneWood, snd_StoneFlesh, snd_StonePlastic, snd_StoneRubber, | 108 | snd_StoneStone, snd_StoneMetal, snd_StoneGlass, snd_StoneWood, snd_StoneFlesh, snd_StonePlastic, snd_StoneRubber, |
@@ -188,9 +116,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
188 | 116 | ||
189 | public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist) | 117 | public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist) |
190 | { | 118 | { |
191 | // disable for now | ||
192 | return; | ||
193 | |||
194 | if (collidersinfolist.Count == 0 || part == null) | 119 | if (collidersinfolist.Count == 0 || part == null) |
195 | return; | 120 | return; |
196 | 121 | ||
@@ -300,9 +225,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
300 | 225 | ||
301 | public static void AvatarCollisionSound(ScenePresence av, List<CollisionForSoundInfo> collidersinfolist) | 226 | public static void AvatarCollisionSound(ScenePresence av, List<CollisionForSoundInfo> collidersinfolist) |
302 | { | 227 | { |
303 | // disable for now | ||
304 | return; | ||
305 | |||
306 | if (collidersinfolist.Count == 0 || av == null) | 228 | if (collidersinfolist.Count == 0 || av == null) |
307 | return; | 229 | return; |
308 | 230 | ||
@@ -346,10 +268,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
346 | volume = Math.Abs(colInfo.relativeVel); | 268 | volume = Math.Abs(colInfo.relativeVel); |
347 | if (volume < 0.2f) | 269 | if (volume < 0.2f) |
348 | continue; | 270 | continue; |
271 | m_log.DebugFormat("Collision speed was {0}", volume); | ||
349 | 272 | ||
350 | volume *= volume * .0625f; // 4m/s == full volume | 273 | // Cap to 0.2 times volume because climbing stairs should not be noisy |
351 | if (volume > 1.0f) | 274 | // Also changed scaling |
352 | volume = 1.0f; | 275 | volume *= volume * .0125f; // 4m/s == volume 0.2 |
276 | if (volume > 0.2f) | ||
277 | volume = 0.2f; | ||
353 | otherMaterial = (int)otherPart.Material; | 278 | otherMaterial = (int)otherPart.Material; |
354 | if (otherMaterial >= MaxMaterials) | 279 | if (otherMaterial >= MaxMaterials) |
355 | otherMaterial = 3; | 280 | otherMaterial = 3; |
@@ -374,4 +299,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
374 | } | 299 | } |
375 | } | 300 | } |
376 | } | 301 | } |
377 | } \ No newline at end of file | 302 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 46a7e3d..904c896 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -3948,10 +3948,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3948 | scriptPosTarget target = m_targets[idx]; | 3948 | scriptPosTarget target = m_targets[idx]; |
3949 | if (Util.GetDistanceTo(target.targetPos, m_rootPart.GroupPosition) <= target.tolerance) | 3949 | if (Util.GetDistanceTo(target.targetPos, m_rootPart.GroupPosition) <= target.tolerance) |
3950 | { | 3950 | { |
3951 | at_target = true; | ||
3952 | |||
3951 | // trigger at_target | 3953 | // trigger at_target |
3952 | if (m_scriptListens_atTarget) | 3954 | if (m_scriptListens_atTarget) |
3953 | { | 3955 | { |
3954 | at_target = true; | ||
3955 | scriptPosTarget att = new scriptPosTarget(); | 3956 | scriptPosTarget att = new scriptPosTarget(); |
3956 | att.targetPos = target.targetPos; | 3957 | att.targetPos = target.targetPos; |
3957 | att.tolerance = target.tolerance; | 3958 | att.tolerance = target.tolerance; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e0b24dc..6af3c1e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4644,6 +4644,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4644 | { | 4644 | { |
4645 | m_host.CollisionSoundVolume = (float)impact_volume; | 4645 | m_host.CollisionSoundVolume = (float)impact_volume; |
4646 | m_host.CollisionSound = m_host.invalidCollisionSoundUUID; | 4646 | m_host.CollisionSound = m_host.invalidCollisionSoundUUID; |
4647 | m_host.CollisionSoundType = 0; | ||
4647 | return; | 4648 | return; |
4648 | } | 4649 | } |
4649 | // TODO: Parameter check logic required. | 4650 | // TODO: Parameter check logic required. |
@@ -4663,6 +4664,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4663 | } | 4664 | } |
4664 | m_host.CollisionSoundVolume = (float)impact_volume; | 4665 | m_host.CollisionSoundVolume = (float)impact_volume; |
4665 | m_host.CollisionSound = soundId; | 4666 | m_host.CollisionSound = soundId; |
4667 | m_host.CollisionSoundType = 1; | ||
4666 | } | 4668 | } |
4667 | 4669 | ||
4668 | public LSL_String llGetAnimation(string id) | 4670 | public LSL_String llGetAnimation(string id) |