diff options
author | Kitto Flora | 2010-02-08 14:29:06 -0500 |
---|---|---|
committer | Kitto Flora | 2010-02-08 14:29:06 -0500 |
commit | 59851ceee6a52e8ad3a1da973dd07257422a16fc (patch) | |
tree | 42be9abb3090014bba1cbb0ddb4d1f617c0cc358 | |
parent | Motor angular decay fix. (diff) | |
parent | Fix two inconsistencies with LightShare (diff) | |
download | opensim-SC-59851ceee6a52e8ad3a1da973dd07257422a16fc.zip opensim-SC-59851ceee6a52e8ad3a1da973dd07257422a16fc.tar.gz opensim-SC-59851ceee6a52e8ad3a1da973dd07257422a16fc.tar.bz2 opensim-SC-59851ceee6a52e8ad3a1da973dd07257422a16fc.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
13 files changed, 1237 insertions, 416 deletions
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs index 7d71f18..daf1fb0 100644 --- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs +++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Client.MXP.PacketHandler | |||
55 | private readonly Dictionary<UUID, Scene> m_scenes; | 55 | private readonly Dictionary<UUID, Scene> m_scenes; |
56 | private readonly Transmitter m_transmitter; | 56 | private readonly Transmitter m_transmitter; |
57 | 57 | ||
58 | private readonly Thread m_clientThread; | 58 | // private readonly Thread m_clientThread; |
59 | 59 | ||
60 | private readonly IList<Session> m_sessions = new List<Session>(); | 60 | private readonly IList<Session> m_sessions = new List<Session>(); |
61 | private readonly IList<Session> m_sessionsToClient = new List<Session>(); | 61 | private readonly IList<Session> m_sessionsToClient = new List<Session>(); |
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 23642b3..c52f60b 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Data.SQLite | |||
41 | /// </summary> | 41 | /// </summary> |
42 | public class SQLiteAssetData : AssetDataBase | 42 | public class SQLiteAssetData : AssetDataBase |
43 | { | 43 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; | 46 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; |
47 | private const string SelectAssetMetadataSQL = "select Name, Description, Type, Temporary, UUID from assets limit :start, :count"; | 47 | private const string SelectAssetMetadataSQL = "select Name, Description, Type, Temporary, UUID from assets limit :start, :count"; |
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs index 6b67ec6..8e91693 100644 --- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs +++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs | |||
@@ -39,9 +39,7 @@ namespace OpenSim.Data.SQLite | |||
39 | { | 39 | { |
40 | public class SQLiteGenericTableHandler<T> : SQLiteFramework where T: class, new() | 40 | public class SQLiteGenericTableHandler<T> : SQLiteFramework where T: class, new() |
41 | { | 41 | { |
42 | private static readonly ILog m_log = | 42 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
45 | 43 | ||
46 | protected Dictionary<string, FieldInfo> m_Fields = | 44 | protected Dictionary<string, FieldInfo> m_Fields = |
47 | new Dictionary<string, FieldInfo>(); | 45 | new Dictionary<string, FieldInfo>(); |
diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs index 97625a7..5c93f88 100644 --- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs +++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs | |||
@@ -41,8 +41,7 @@ namespace OpenSim.Data.SQLite | |||
41 | /// </summary> | 41 | /// </summary> |
42 | public class SQLiteXInventoryData : IXInventoryData | 42 | public class SQLiteXInventoryData : IXInventoryData |
43 | { | 43 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger( | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | 45 | ||
47 | private SQLiteGenericTableHandler<XInventoryFolder> m_Folders; | 46 | private SQLiteGenericTableHandler<XInventoryFolder> m_Folders; |
48 | private SqliteItemHandler m_Items; | 47 | private SqliteItemHandler m_Items; |
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs index 6941e00..13f58bd 100644 --- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs | |||
@@ -174,18 +174,16 @@ namespace OpenSim.Region.CoreModules.Framework.Library | |||
174 | { | 174 | { |
175 | m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.Message); | 175 | m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.Message); |
176 | } | 176 | } |
177 | |||
178 | } | 177 | } |
179 | |||
180 | } | ||
181 | |||
182 | private void DumpLibrary() | ||
183 | { | ||
184 | InventoryFolderImpl lib = m_Scene.CommsManager.UserProfileCacheService.LibraryRoot; | ||
185 | |||
186 | m_log.DebugFormat(" - folder {0}", lib.Name); | ||
187 | DumpFolder(lib); | ||
188 | } | 178 | } |
179 | // | ||
180 | // private void DumpLibrary() | ||
181 | // { | ||
182 | // InventoryFolderImpl lib = m_Scene.CommsManager.UserProfileCacheService.LibraryRoot; | ||
183 | // | ||
184 | // m_log.DebugFormat(" - folder {0}", lib.Name); | ||
185 | // DumpFolder(lib); | ||
186 | // } | ||
189 | 187 | ||
190 | private void DumpFolder(InventoryFolderImpl folder) | 188 | private void DumpFolder(InventoryFolderImpl folder) |
191 | { | 189 | { |
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index 60df2e7..d647e71 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -262,44 +262,34 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
262 | { | 262 | { |
263 | case ChatTypeEnum.Whisper: | 263 | case ChatTypeEnum.Whisper: |
264 | if (dis < m_whisperdistance) | 264 | if (dis < m_whisperdistance) |
265 | { | 265 | QueueMessage(new ListenerInfo(li, name, id, msg)); |
266 | lock (m_pending.SyncRoot) | ||
267 | { | ||
268 | m_pending.Enqueue(new ListenerInfo(li,name,id,msg)); | ||
269 | } | ||
270 | } | ||
271 | break; | 266 | break; |
272 | 267 | ||
273 | case ChatTypeEnum.Say: | 268 | case ChatTypeEnum.Say: |
274 | if (dis < m_saydistance) | 269 | if (dis < m_saydistance) |
275 | { | 270 | QueueMessage(new ListenerInfo(li, name, id, msg)); |
276 | lock (m_pending.SyncRoot) | ||
277 | { | ||
278 | m_pending.Enqueue(new ListenerInfo(li,name,id,msg)); | ||
279 | } | ||
280 | } | ||
281 | break; | 271 | break; |
282 | 272 | ||
283 | case ChatTypeEnum.Shout: | 273 | case ChatTypeEnum.Shout: |
284 | if (dis < m_shoutdistance) | 274 | if (dis < m_shoutdistance) |
285 | { | 275 | QueueMessage(new ListenerInfo(li, name, id, msg)); |
286 | lock (m_pending.SyncRoot) | ||
287 | { | ||
288 | m_pending.Enqueue(new ListenerInfo(li,name,id,msg)); | ||
289 | } | ||
290 | } | ||
291 | break; | 276 | break; |
292 | 277 | ||
293 | case ChatTypeEnum.Region: | 278 | case ChatTypeEnum.Region: |
294 | lock (m_pending.SyncRoot) | 279 | QueueMessage(new ListenerInfo(li, name, id, msg)); |
295 | { | ||
296 | m_pending.Enqueue(new ListenerInfo(li,name,id,msg)); | ||
297 | } | ||
298 | break; | 280 | break; |
299 | } | 281 | } |
300 | } | 282 | } |
301 | } | 283 | } |
302 | 284 | ||
285 | protected void QueueMessage(ListenerInfo li) | ||
286 | { | ||
287 | lock (m_pending.SyncRoot) | ||
288 | { | ||
289 | m_pending.Enqueue(li); | ||
290 | } | ||
291 | } | ||
292 | |||
303 | /// <summary> | 293 | /// <summary> |
304 | /// Are there any listen events ready to be dispatched? | 294 | /// Are there any listen events ready to be dispatched? |
305 | /// </summary> | 295 | /// </summary> |
@@ -319,7 +309,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
319 | 309 | ||
320 | lock (m_pending.SyncRoot) | 310 | lock (m_pending.SyncRoot) |
321 | { | 311 | { |
322 | li = (ListenerInfo) m_pending.Dequeue(); | 312 | li = (ListenerInfo)m_pending.Dequeue(); |
323 | } | 313 | } |
324 | 314 | ||
325 | return li; | 315 | return li; |
diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs index dfa8df6..73f7ae3 100644 --- a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs +++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs | |||
@@ -42,9 +42,7 @@ namespace OpenSim.Region.CoreModules.World | |||
42 | { | 42 | { |
43 | public class AccessModule : ISharedRegionModule | 43 | public class AccessModule : ISharedRegionModule |
44 | { | 44 | { |
45 | private static readonly ILog m_log = | 45 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | LogManager.GetLogger( | ||
47 | MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | 46 | ||
49 | private List<Scene> m_SceneList = new List<Scene>(); | 47 | private List<Scene> m_SceneList = new List<Scene>(); |
50 | 48 | ||
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index fe40f52..cabb5f9 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -27,11 +27,13 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | ||
31 | using log4net; | ||
30 | using OpenMetaverse; | 32 | using OpenMetaverse; |
31 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Client; | 34 | using OpenSim.Framework.Client; |
33 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
34 | using Caps=OpenSim.Framework.Capabilities.Caps; | 36 | using Caps = OpenSim.Framework.Capabilities.Caps; |
35 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
36 | 38 | ||
37 | namespace OpenSim.Region.Framework.Scenes | 39 | namespace OpenSim.Region.Framework.Scenes |
@@ -41,6 +43,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
41 | /// </summary> | 43 | /// </summary> |
42 | public class EventManager | 44 | public class EventManager |
43 | { | 45 | { |
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
44 | public delegate void OnFrameDelegate(); | 48 | public delegate void OnFrameDelegate(); |
45 | 49 | ||
46 | public event OnFrameDelegate OnFrame; | 50 | public event OnFrameDelegate OnFrame; |
@@ -212,14 +216,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
212 | public delegate void RequestChangeWaterHeight(float height); | 216 | public delegate void RequestChangeWaterHeight(float height); |
213 | 217 | ||
214 | public event RequestChangeWaterHeight OnRequestChangeWaterHeight; | 218 | public event RequestChangeWaterHeight OnRequestChangeWaterHeight; |
215 | 219 | ||
216 | public delegate void AvatarKillData(uint KillerLocalID, ScenePresence avatar); | 220 | /// <summary> |
217 | 221 | /// Fired if any avatar is 'killed' due to its health falling to zero | |
222 | /// </summary> | ||
218 | public event AvatarKillData OnAvatarKilled; | 223 | public event AvatarKillData OnAvatarKilled; |
224 | public delegate void AvatarKillData(uint KillerLocalID, ScenePresence avatar); | ||
219 | 225 | ||
220 | public delegate void ScriptTimerEvent(uint localID, double timerinterval); | 226 | // public delegate void ScriptTimerEvent(uint localID, double timerinterval); |
221 | 227 | ||
222 | public event ScriptTimerEvent OnScriptTimerEvent; | 228 | // public event ScriptTimerEvent OnScriptTimerEvent; |
223 | 229 | ||
224 | public delegate void EstateToolsSunUpdate(ulong regionHandle, bool FixedTime, bool EstateSun, float LindenHour); | 230 | public delegate void EstateToolsSunUpdate(ulong regionHandle, bool FixedTime, bool EstateSun, float LindenHour); |
225 | public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); | 231 | public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); |
@@ -386,423 +392,806 @@ namespace OpenSim.Region.Framework.Scenes | |||
386 | public event LandBuy OnLandBuy; | 392 | public event LandBuy OnLandBuy; |
387 | public event LandBuy OnValidateLandBuy; | 393 | public event LandBuy OnValidateLandBuy; |
388 | 394 | ||
389 | /* Designated Event Deletage Instances */ | ||
390 | |||
391 | private ScriptChangedEvent handlerScriptChangedEvent = null; //OnScriptChangedEvent; | ||
392 | private ScriptAtTargetEvent handlerScriptAtTargetEvent = null; | ||
393 | private ScriptNotAtTargetEvent handlerScriptNotAtTargetEvent = null; | ||
394 | private ScriptAtRotTargetEvent handlerScriptAtRotTargetEvent = null; | ||
395 | private ScriptNotAtRotTargetEvent handlerScriptNotAtRotTargetEvent = null; | ||
396 | private ClientMovement handlerClientMovement = null; //OnClientMovement; | ||
397 | private OnPermissionErrorDelegate handlerPermissionError = null; //OnPermissionError; | ||
398 | private OnPluginConsoleDelegate handlerPluginConsole = null; //OnPluginConsole; | ||
399 | private OnFrameDelegate handlerFrame = null; //OnFrame; | ||
400 | private OnNewClientDelegate handlerNewClient = null; //OnNewClient; | ||
401 | private OnClientConnectCoreDelegate handlerClientConnect = null; //OnClientConnect | ||
402 | private OnNewPresenceDelegate handlerNewPresence = null; //OnNewPresence; | ||
403 | private OnRemovePresenceDelegate handlerRemovePresence = null; //OnRemovePresence; | ||
404 | private OnBackupDelegate handlerBackup = null; //OnBackup; | ||
405 | private OnParcelPrimCountUpdateDelegate handlerParcelPrimCountUpdate = null; //OnParcelPrimCountUpdate; | ||
406 | private MoneyTransferEvent handlerMoneyTransfer = null; //OnMoneyTransfer; | ||
407 | private OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = null; //OnParcelPrimCountAdd; | ||
408 | private OnShutdownDelegate handlerShutdown = null; //OnShutdown; | ||
409 | private ObjectGrabDelegate handlerObjectGrab = null; //OnObjectGrab; | ||
410 | private ObjectGrabDelegate handlerObjectGrabbing = null; //OnObjectGrabbing; | ||
411 | private ObjectDeGrabDelegate handlerObjectDeGrab = null; //OnObjectDeGrab; | ||
412 | private ScriptResetDelegate handlerScriptReset = null; // OnScriptReset | ||
413 | private NewRezScript handlerRezScript = null; //OnRezScript; | ||
414 | private RemoveScript handlerRemoveScript = null; //OnRemoveScript; | ||
415 | private StartScript handlerStartScript = null; //OnStartScript; | ||
416 | private StopScript handlerStopScript = null; //OnStopScript; | ||
417 | private SceneGroupMoved handlerSceneGroupMove = null; //OnSceneGroupMove; | ||
418 | private SceneGroupGrabed handlerSceneGroupGrab = null; //OnSceneGroupGrab; | ||
419 | private SceneGroupSpinStarted handlerSceneGroupSpinStarted = null; //OnSceneGroupSpinStart; | ||
420 | private SceneGroupSpun handlerSceneGroupSpin = null; //OnSceneGroupSpin; | ||
421 | private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded; | ||
422 | private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved; | ||
423 | private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel; | ||
424 | private IncomingInstantMessage handlerIncomingInstantMessage = null; //OnIncomingInstantMessage; | ||
425 | private IncomingInstantMessage handlerUnhandledInstantMessage = null; //OnUnhandledInstantMessage; | ||
426 | private ClientClosed handlerClientClosed = null; //OnClientClosed; | ||
427 | private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; | ||
428 | private OnSaveNewWindlightProfileDelegate handlerSaveNewWindlightProfile = null; //OnSaveNewWindlightProfile; | ||
429 | private OnSendNewWindlightProfileTargetedDelegate handlerSendNewWindlightProfileTargeted = null; //OnSendNewWindlightProfileTargeted; | ||
430 | private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent; | ||
431 | private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; | ||
432 | private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; | ||
433 | private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps; | ||
434 | private ChatFromWorldEvent handlerChatFromWorld = null; // OnChatFromWorld; | ||
435 | private ChatFromClientEvent handlerChatFromClient = null; // OnChatFromClient; | ||
436 | private ChatBroadcastEvent handlerChatBroadcast = null; // OnChatBroadcast; | ||
437 | private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null; | ||
438 | private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight | ||
439 | private ScriptControlEvent handlerScriptControlEvent = null; | ||
440 | private SignificantClientMovement handlerSignificantClientMovement = null; | ||
441 | |||
442 | private LandBuy handlerLandBuy = null; | ||
443 | private LandBuy handlerValidateLandBuy = null; | ||
444 | private AvatarKillData handlerAvatarKill = null; | ||
445 | |||
446 | private NoticeNoLandDataFromStorage handlerNoticeNoLandDataFromStorage = null; | ||
447 | private IncomingLandDataFromStorage handlerIncomingLandDataFromStorage = null; | ||
448 | private SetAllowForcefulBan handlerSetAllowForcefulBan = null; | ||
449 | private RequestParcelPrimCountUpdate handlerRequestParcelPrimCountUpdate = null; | ||
450 | private ParcelPrimCountTainted handlerParcelPrimCountTainted = null; | ||
451 | private ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = null; | ||
452 | // TODO: unused: private ScriptTimerEvent handlerScriptTimerEvent = null; | ||
453 | private EstateToolsSunUpdate handlerEstateToolsSunUpdate = null; | ||
454 | |||
455 | private ScriptColliding handlerCollidingStart = null; | ||
456 | private ScriptColliding handlerColliding = null; | ||
457 | private ScriptColliding handlerCollidingEnd = null; | ||
458 | private ScriptColliding handlerLandCollidingStart = null; | ||
459 | private ScriptColliding handlerLandColliding = null; | ||
460 | private ScriptColliding handlerLandCollidingEnd = null; | ||
461 | private GetScriptRunning handlerGetScriptRunning = null; | ||
462 | |||
463 | private SunLindenHour handlerCurrentTimeAsLindenSunHour = null; | ||
464 | private OnSetRootAgentSceneDelegate handlerSetRootAgentScene = null; | ||
465 | |||
466 | private OarFileLoaded handlerOarFileLoaded = null; | ||
467 | private OarFileSaved handlerOarFileSaved = null; | ||
468 | |||
469 | private EmptyScriptCompileQueue handlerEmptyScriptCompileQueue = null; | ||
470 | |||
471 | private Attach handlerOnAttach = null; | ||
472 | private RegionUp handlerOnRegionUp = null; | ||
473 | |||
474 | public void TriggerOnAttach(uint localID, UUID itemID, UUID avatarID) | 395 | public void TriggerOnAttach(uint localID, UUID itemID, UUID avatarID) |
475 | { | 396 | { |
476 | handlerOnAttach = OnAttach; | 397 | Attach handlerOnAttach = OnAttach; |
477 | if (handlerOnAttach != null) | 398 | if (handlerOnAttach != null) |
478 | handlerOnAttach(localID, itemID, avatarID); | 399 | { |
400 | foreach (Attach d in handlerOnAttach.GetInvocationList()) | ||
401 | { | ||
402 | try | ||
403 | { | ||
404 | d(localID, itemID, avatarID); | ||
405 | } | ||
406 | catch (Exception e) | ||
407 | { | ||
408 | m_log.ErrorFormat( | ||
409 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", | ||
410 | e.Message, e.StackTrace); | ||
411 | } | ||
412 | } | ||
413 | } | ||
479 | } | 414 | } |
480 | 415 | ||
481 | public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) | 416 | public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) |
482 | { | 417 | { |
483 | handlerGetScriptRunning = OnGetScriptRunning; | 418 | GetScriptRunning handlerGetScriptRunning = OnGetScriptRunning; |
484 | if (handlerGetScriptRunning != null) | 419 | if (handlerGetScriptRunning != null) |
485 | handlerGetScriptRunning(controllingClient, objectID, itemID); | 420 | { |
421 | foreach (GetScriptRunning d in handlerGetScriptRunning.GetInvocationList()) | ||
422 | { | ||
423 | try | ||
424 | { | ||
425 | d(controllingClient, objectID, itemID); | ||
426 | } | ||
427 | catch (Exception e) | ||
428 | { | ||
429 | m_log.ErrorFormat( | ||
430 | "[EVENT MANAGER]: Delegate for TriggerGetScriptRunning failed - continuing. {0} {1}", | ||
431 | e.Message, e.StackTrace); | ||
432 | } | ||
433 | } | ||
434 | } | ||
486 | } | 435 | } |
487 | 436 | ||
488 | public void TriggerOnScriptChangedEvent(uint localID, uint change) | 437 | public void TriggerOnScriptChangedEvent(uint localID, uint change) |
489 | { | 438 | { |
490 | handlerScriptChangedEvent = OnScriptChangedEvent; | 439 | ScriptChangedEvent handlerScriptChangedEvent = OnScriptChangedEvent; |
491 | if (handlerScriptChangedEvent != null) | 440 | if (handlerScriptChangedEvent != null) |
492 | handlerScriptChangedEvent(localID, change); | 441 | { |
442 | foreach (ScriptChangedEvent d in handlerScriptChangedEvent.GetInvocationList()) | ||
443 | { | ||
444 | try | ||
445 | { | ||
446 | d(localID, change); | ||
447 | } | ||
448 | catch (Exception e) | ||
449 | { | ||
450 | m_log.ErrorFormat( | ||
451 | "[EVENT MANAGER]: Delegate for TriggerOnScriptChangedEvent failed - continuing. {0} {1}", | ||
452 | e.Message, e.StackTrace); | ||
453 | } | ||
454 | } | ||
455 | } | ||
493 | } | 456 | } |
494 | 457 | ||
495 | public void TriggerOnClientMovement(ScenePresence avatar) | 458 | public void TriggerOnClientMovement(ScenePresence avatar) |
496 | { | 459 | { |
497 | handlerClientMovement = OnClientMovement; | 460 | ClientMovement handlerClientMovement = OnClientMovement; |
498 | if (handlerClientMovement != null) | 461 | if (handlerClientMovement != null) |
499 | handlerClientMovement(avatar); | 462 | { |
463 | foreach (ClientMovement d in handlerClientMovement.GetInvocationList()) | ||
464 | { | ||
465 | try | ||
466 | { | ||
467 | d(avatar); | ||
468 | } | ||
469 | catch (Exception e) | ||
470 | { | ||
471 | m_log.ErrorFormat( | ||
472 | "[EVENT MANAGER]: Delegate for TriggerOnClientMovement failed - continuing. {0} {1}", | ||
473 | e.Message, e.StackTrace); | ||
474 | } | ||
475 | } | ||
476 | } | ||
500 | } | 477 | } |
501 | 478 | ||
502 | public void TriggerPermissionError(UUID user, string reason) | 479 | public void TriggerPermissionError(UUID user, string reason) |
503 | { | 480 | { |
504 | handlerPermissionError = OnPermissionError; | 481 | OnPermissionErrorDelegate handlerPermissionError = OnPermissionError; |
505 | if (handlerPermissionError != null) | 482 | if (handlerPermissionError != null) |
506 | handlerPermissionError(user, reason); | 483 | { |
484 | foreach (OnPermissionErrorDelegate d in handlerPermissionError.GetInvocationList()) | ||
485 | { | ||
486 | try | ||
487 | { | ||
488 | d(user, reason); | ||
489 | } | ||
490 | catch (Exception e) | ||
491 | { | ||
492 | m_log.ErrorFormat( | ||
493 | "[EVENT MANAGER]: Delegate for TriggerPermissionError failed - continuing. {0} {1}", | ||
494 | e.Message, e.StackTrace); | ||
495 | } | ||
496 | } | ||
497 | } | ||
507 | } | 498 | } |
508 | 499 | ||
509 | public void TriggerOnPluginConsole(string[] args) | 500 | public void TriggerOnPluginConsole(string[] args) |
510 | { | 501 | { |
511 | handlerPluginConsole = OnPluginConsole; | 502 | OnPluginConsoleDelegate handlerPluginConsole = OnPluginConsole; |
512 | if (handlerPluginConsole != null) | 503 | if (handlerPluginConsole != null) |
513 | handlerPluginConsole(args); | 504 | { |
505 | foreach (OnPluginConsoleDelegate d in handlerPluginConsole.GetInvocationList()) | ||
506 | { | ||
507 | try | ||
508 | { | ||
509 | d(args); | ||
510 | } | ||
511 | catch (Exception e) | ||
512 | { | ||
513 | m_log.ErrorFormat( | ||
514 | "[EVENT MANAGER]: Delegate for TriggerOnPluginConsole failed - continuing. {0} {1}", | ||
515 | e.Message, e.StackTrace); | ||
516 | } | ||
517 | } | ||
518 | } | ||
514 | } | 519 | } |
515 | 520 | ||
516 | public void TriggerOnFrame() | 521 | public void TriggerOnFrame() |
517 | { | 522 | { |
518 | handlerFrame = OnFrame; | 523 | OnFrameDelegate handlerFrame = OnFrame; |
519 | if (handlerFrame != null) | 524 | if (handlerFrame != null) |
520 | { | 525 | { |
521 | handlerFrame(); | 526 | foreach (OnFrameDelegate d in handlerFrame.GetInvocationList()) |
522 | } | 527 | { |
528 | try | ||
529 | { | ||
530 | d(); | ||
531 | } | ||
532 | catch (Exception e) | ||
533 | { | ||
534 | m_log.ErrorFormat( | ||
535 | "[EVENT MANAGER]: Delegate for TriggerOnFrame failed - continuing. {0} {1}", | ||
536 | e.Message, e.StackTrace); | ||
537 | } | ||
538 | } | ||
539 | } | ||
523 | } | 540 | } |
524 | 541 | ||
525 | public void TriggerOnNewClient(IClientAPI client) | 542 | public void TriggerOnNewClient(IClientAPI client) |
526 | { | 543 | { |
527 | handlerNewClient = OnNewClient; | 544 | OnNewClientDelegate handlerNewClient = OnNewClient; |
528 | if (handlerNewClient != null) | 545 | if (handlerNewClient != null) |
529 | handlerNewClient(client); | 546 | { |
547 | foreach (OnNewClientDelegate d in handlerNewClient.GetInvocationList()) | ||
548 | { | ||
549 | try | ||
550 | { | ||
551 | d(client); | ||
552 | } | ||
553 | catch (Exception e) | ||
554 | { | ||
555 | m_log.ErrorFormat( | ||
556 | "[EVENT MANAGER]: Delegate for TriggerOnNewClient failed - continuing. {0} {1}", | ||
557 | e.Message, e.StackTrace); | ||
558 | } | ||
559 | } | ||
560 | } | ||
530 | 561 | ||
531 | if (client is IClientCore) | 562 | if (client is IClientCore) |
532 | { | 563 | { |
533 | handlerClientConnect = OnClientConnect; | 564 | OnClientConnectCoreDelegate handlerClientConnect = OnClientConnect; |
534 | if (handlerClientConnect != null) | 565 | if (handlerClientConnect != null) |
535 | handlerClientConnect((IClientCore)client); | 566 | { |
567 | foreach (OnClientConnectCoreDelegate d in handlerClientConnect.GetInvocationList()) | ||
568 | { | ||
569 | try | ||
570 | { | ||
571 | d((IClientCore)client); | ||
572 | } | ||
573 | catch (Exception e) | ||
574 | { | ||
575 | m_log.ErrorFormat( | ||
576 | "[EVENT MANAGER]: Delegate for TriggerOnNewClient (IClientCore) failed - continuing. {0} {1}", | ||
577 | e.Message, e.StackTrace); | ||
578 | } | ||
579 | } | ||
580 | } | ||
536 | } | 581 | } |
537 | } | 582 | } |
538 | 583 | ||
539 | public void TriggerOnNewPresence(ScenePresence presence) | 584 | public void TriggerOnNewPresence(ScenePresence presence) |
540 | { | 585 | { |
541 | handlerNewPresence = OnNewPresence; | 586 | OnNewPresenceDelegate handlerNewPresence = OnNewPresence; |
542 | if (handlerNewPresence != null) | 587 | if (handlerNewPresence != null) |
543 | handlerNewPresence(presence); | 588 | { |
589 | foreach (OnNewPresenceDelegate d in handlerNewPresence.GetInvocationList()) | ||
590 | { | ||
591 | try | ||
592 | { | ||
593 | d(presence); | ||
594 | } | ||
595 | catch (Exception e) | ||
596 | { | ||
597 | m_log.ErrorFormat( | ||
598 | "[EVENT MANAGER]: Delegate for TriggerOnNewPresence failed - continuing. {0} {1}", | ||
599 | e.Message, e.StackTrace); | ||
600 | } | ||
601 | } | ||
602 | } | ||
544 | } | 603 | } |
545 | 604 | ||
546 | public void TriggerOnRemovePresence(UUID agentId) | 605 | public void TriggerOnRemovePresence(UUID agentId) |
547 | { | 606 | { |
548 | handlerRemovePresence = OnRemovePresence; | 607 | OnRemovePresenceDelegate handlerRemovePresence = OnRemovePresence; |
549 | if (handlerRemovePresence != null) | 608 | if (handlerRemovePresence != null) |
550 | { | 609 | { |
551 | handlerRemovePresence(agentId); | 610 | foreach (OnRemovePresenceDelegate d in handlerRemovePresence.GetInvocationList()) |
552 | } | 611 | { |
612 | try | ||
613 | { | ||
614 | d(agentId); | ||
615 | } | ||
616 | catch (Exception e) | ||
617 | { | ||
618 | m_log.ErrorFormat( | ||
619 | "[EVENT MANAGER]: Delegate for TriggerOnRemovePresence failed - continuing. {0} {1}", | ||
620 | e.Message, e.StackTrace); | ||
621 | } | ||
622 | } | ||
623 | } | ||
553 | } | 624 | } |
554 | 625 | ||
555 | public void TriggerOnBackup(IRegionDataStore dstore) | 626 | public void TriggerOnBackup(IRegionDataStore dstore) |
556 | { | 627 | { |
557 | handlerBackup = OnBackup; | 628 | OnBackupDelegate handlerOnAttach = OnBackup; |
558 | if (handlerBackup != null) | 629 | if (handlerOnAttach != null) |
559 | { | 630 | { |
560 | handlerBackup(dstore, false); | 631 | foreach (OnBackupDelegate d in handlerOnAttach.GetInvocationList()) |
561 | } | 632 | { |
633 | try | ||
634 | { | ||
635 | d(dstore, false); | ||
636 | } | ||
637 | catch (Exception e) | ||
638 | { | ||
639 | m_log.ErrorFormat( | ||
640 | "[EVENT MANAGER]: Delegate for TriggerOnBackup failed - continuing. {0} {1}", | ||
641 | e.Message, e.StackTrace); | ||
642 | } | ||
643 | } | ||
644 | } | ||
562 | } | 645 | } |
563 | 646 | ||
564 | public void TriggerParcelPrimCountUpdate() | 647 | public void TriggerParcelPrimCountUpdate() |
565 | { | 648 | { |
566 | handlerParcelPrimCountUpdate = OnParcelPrimCountUpdate; | 649 | OnParcelPrimCountUpdateDelegate handlerParcelPrimCountUpdate = OnParcelPrimCountUpdate; |
567 | if (handlerParcelPrimCountUpdate != null) | 650 | if (handlerParcelPrimCountUpdate != null) |
568 | { | 651 | { |
569 | handlerParcelPrimCountUpdate(); | 652 | foreach (OnParcelPrimCountUpdateDelegate d in handlerParcelPrimCountUpdate.GetInvocationList()) |
570 | } | 653 | { |
571 | } | 654 | try |
572 | 655 | { | |
573 | public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e) | 656 | d(); |
574 | { | 657 | } |
575 | handlerMoneyTransfer = OnMoneyTransfer; | 658 | catch (Exception e) |
659 | { | ||
660 | m_log.ErrorFormat( | ||
661 | "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountUpdate failed - continuing. {0} {1}", | ||
662 | e.Message, e.StackTrace); | ||
663 | } | ||
664 | } | ||
665 | } | ||
666 | } | ||
667 | |||
668 | public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs args) | ||
669 | { | ||
670 | MoneyTransferEvent handlerMoneyTransfer = OnMoneyTransfer; | ||
576 | if (handlerMoneyTransfer != null) | 671 | if (handlerMoneyTransfer != null) |
577 | { | 672 | { |
578 | handlerMoneyTransfer(sender, e); | 673 | foreach (MoneyTransferEvent d in handlerMoneyTransfer.GetInvocationList()) |
579 | } | 674 | { |
675 | try | ||
676 | { | ||
677 | d(sender, args); | ||
678 | } | ||
679 | catch (Exception e) | ||
680 | { | ||
681 | m_log.ErrorFormat( | ||
682 | "[EVENT MANAGER]: Delegate for TriggerMoneyTransfer failed - continuing. {0} {1}", | ||
683 | e.Message, e.StackTrace); | ||
684 | } | ||
685 | } | ||
686 | } | ||
580 | } | 687 | } |
581 | 688 | ||
582 | public void TriggerTerrainTick() | 689 | public void TriggerTerrainTick() |
583 | { | 690 | { |
584 | handlerTerrainTick = OnTerrainTick; | 691 | OnTerrainTickDelegate handlerTerrainTick = OnTerrainTick; |
585 | if (handlerTerrainTick != null) | 692 | if (handlerTerrainTick != null) |
586 | { | 693 | { |
587 | handlerTerrainTick(); | 694 | foreach (OnTerrainTickDelegate d in handlerTerrainTick.GetInvocationList()) |
588 | } | 695 | { |
696 | try | ||
697 | { | ||
698 | d(); | ||
699 | } | ||
700 | catch (Exception e) | ||
701 | { | ||
702 | m_log.ErrorFormat( | ||
703 | "[EVENT MANAGER]: Delegate for TriggerTerrainTick failed - continuing. {0} {1}", | ||
704 | e.Message, e.StackTrace); | ||
705 | } | ||
706 | } | ||
707 | } | ||
589 | } | 708 | } |
590 | 709 | ||
591 | public void TriggerParcelPrimCountAdd(SceneObjectGroup obj) | 710 | public void TriggerParcelPrimCountAdd(SceneObjectGroup obj) |
592 | { | 711 | { |
593 | handlerParcelPrimCountAdd = OnParcelPrimCountAdd; | 712 | OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = OnParcelPrimCountAdd; |
594 | if (handlerParcelPrimCountAdd != null) | 713 | if (handlerParcelPrimCountAdd != null) |
595 | { | 714 | { |
596 | handlerParcelPrimCountAdd(obj); | 715 | foreach (OnParcelPrimCountAddDelegate d in handlerParcelPrimCountAdd.GetInvocationList()) |
597 | } | 716 | { |
717 | try | ||
718 | { | ||
719 | d(obj); | ||
720 | } | ||
721 | catch (Exception e) | ||
722 | { | ||
723 | m_log.ErrorFormat( | ||
724 | "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountAdd failed - continuing. {0} {1}", | ||
725 | e.Message, e.StackTrace); | ||
726 | } | ||
727 | } | ||
728 | } | ||
598 | } | 729 | } |
599 | 730 | ||
600 | public void TriggerObjectBeingRemovedFromScene(SceneObjectGroup obj) | 731 | public void TriggerObjectBeingRemovedFromScene(SceneObjectGroup obj) |
601 | { | 732 | { |
602 | handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene; | 733 | ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene; |
603 | if (handlerObjectBeingRemovedFromScene != null) | 734 | if (handlerObjectBeingRemovedFromScene != null) |
604 | { | 735 | { |
605 | handlerObjectBeingRemovedFromScene(obj); | 736 | foreach (ObjectBeingRemovedFromScene d in handlerObjectBeingRemovedFromScene.GetInvocationList()) |
606 | } | 737 | { |
738 | try | ||
739 | { | ||
740 | d(obj); | ||
741 | } | ||
742 | catch (Exception e) | ||
743 | { | ||
744 | m_log.ErrorFormat( | ||
745 | "[EVENT MANAGER]: Delegate for TriggerObjectBeingRemovedFromScene failed - continuing. {0} {1}", | ||
746 | e.Message, e.StackTrace); | ||
747 | } | ||
748 | } | ||
749 | } | ||
607 | } | 750 | } |
608 | 751 | ||
609 | public void TriggerShutdown() | 752 | public void TriggerShutdown() |
610 | { | 753 | { |
611 | handlerShutdown = OnShutdown; | 754 | OnShutdownDelegate handlerShutdown = OnShutdown; |
612 | if (handlerShutdown != null) | 755 | if (handlerShutdown != null) |
613 | handlerShutdown(); | 756 | { |
757 | foreach (OnShutdownDelegate d in handlerShutdown.GetInvocationList()) | ||
758 | { | ||
759 | try | ||
760 | { | ||
761 | d(); | ||
762 | } | ||
763 | catch (Exception e) | ||
764 | { | ||
765 | m_log.ErrorFormat( | ||
766 | "[EVENT MANAGER]: Delegate for TriggerShutdown failed - continuing. {0} {1}", | ||
767 | e.Message, e.StackTrace); | ||
768 | } | ||
769 | } | ||
770 | } | ||
614 | } | 771 | } |
615 | 772 | ||
616 | public void TriggerObjectGrab(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) | 773 | public void TriggerObjectGrab(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) |
617 | { | 774 | { |
618 | handlerObjectGrab = OnObjectGrab; | 775 | ObjectGrabDelegate handlerObjectGrab = OnObjectGrab; |
619 | if (handlerObjectGrab != null) | 776 | if (handlerObjectGrab != null) |
620 | { | 777 | { |
621 | handlerObjectGrab(localID, originalID, offsetPos, remoteClient, surfaceArgs); | 778 | foreach (ObjectGrabDelegate d in handlerObjectGrab.GetInvocationList()) |
622 | } | 779 | { |
780 | try | ||
781 | { | ||
782 | d(localID, originalID, offsetPos, remoteClient, surfaceArgs); | ||
783 | } | ||
784 | catch (Exception e) | ||
785 | { | ||
786 | m_log.ErrorFormat( | ||
787 | "[EVENT MANAGER]: Delegate for TriggerObjectGrab failed - continuing. {0} {1}", | ||
788 | e.Message, e.StackTrace); | ||
789 | } | ||
790 | } | ||
791 | } | ||
623 | } | 792 | } |
624 | 793 | ||
625 | public void TriggerObjectGrabbing(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) | 794 | public void TriggerObjectGrabbing(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) |
626 | { | 795 | { |
627 | handlerObjectGrabbing = OnObjectGrabbing; | 796 | ObjectGrabDelegate handlerObjectGrabbing = OnObjectGrabbing; |
628 | if (handlerObjectGrabbing != null) | 797 | if (handlerObjectGrabbing != null) |
629 | { | 798 | { |
630 | handlerObjectGrabbing(localID, originalID, offsetPos, remoteClient, surfaceArgs); | 799 | foreach (ObjectGrabDelegate d in handlerObjectGrabbing.GetInvocationList()) |
631 | } | 800 | { |
801 | try | ||
802 | { | ||
803 | d(localID, originalID, offsetPos, remoteClient, surfaceArgs); | ||
804 | } | ||
805 | catch (Exception e) | ||
806 | { | ||
807 | m_log.ErrorFormat( | ||
808 | "[EVENT MANAGER]: Delegate for TriggerObjectGrabbing failed - continuing. {0} {1}", | ||
809 | e.Message, e.StackTrace); | ||
810 | } | ||
811 | } | ||
812 | } | ||
632 | } | 813 | } |
633 | 814 | ||
634 | public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) | 815 | public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) |
635 | { | 816 | { |
636 | handlerObjectDeGrab = OnObjectDeGrab; | 817 | ObjectDeGrabDelegate handlerObjectDeGrab = OnObjectDeGrab; |
637 | if (handlerObjectDeGrab != null) | 818 | if (handlerObjectDeGrab != null) |
638 | { | 819 | { |
639 | handlerObjectDeGrab(localID, originalID, remoteClient, surfaceArgs); | 820 | foreach (ObjectDeGrabDelegate d in handlerObjectDeGrab.GetInvocationList()) |
640 | } | 821 | { |
822 | try | ||
823 | { | ||
824 | d(localID, originalID, remoteClient, surfaceArgs); | ||
825 | } | ||
826 | catch (Exception e) | ||
827 | { | ||
828 | m_log.ErrorFormat( | ||
829 | "[EVENT MANAGER]: Delegate for TriggerObjectDeGrab failed - continuing. {0} {1}", | ||
830 | e.Message, e.StackTrace); | ||
831 | } | ||
832 | } | ||
833 | } | ||
641 | } | 834 | } |
642 | 835 | ||
643 | public void TriggerScriptReset(uint localID, UUID itemID) | 836 | public void TriggerScriptReset(uint localID, UUID itemID) |
644 | { | 837 | { |
645 | handlerScriptReset = OnScriptReset; | 838 | ScriptResetDelegate handlerScriptReset = OnScriptReset; |
646 | if (handlerScriptReset != null) | 839 | if (handlerScriptReset != null) |
647 | { | 840 | { |
648 | handlerScriptReset(localID, itemID); | 841 | foreach (ScriptResetDelegate d in handlerScriptReset.GetInvocationList()) |
649 | } | 842 | { |
843 | try | ||
844 | { | ||
845 | d(localID, itemID); | ||
846 | } | ||
847 | catch (Exception e) | ||
848 | { | ||
849 | m_log.ErrorFormat( | ||
850 | "[EVENT MANAGER]: Delegate for TriggerScriptReset failed - continuing. {0} {1}", | ||
851 | e.Message, e.StackTrace); | ||
852 | } | ||
853 | } | ||
854 | } | ||
650 | } | 855 | } |
651 | 856 | ||
652 | public void TriggerRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource) | 857 | public void TriggerRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource) |
653 | { | 858 | { |
654 | handlerRezScript = OnRezScript; | 859 | NewRezScript handlerRezScript = OnRezScript; |
655 | if (handlerRezScript != null) | 860 | if (handlerRezScript != null) |
656 | { | 861 | { |
657 | handlerRezScript(localID, itemID, script, startParam, | 862 | foreach (NewRezScript d in handlerRezScript.GetInvocationList()) |
658 | postOnRez, engine, stateSource); | 863 | { |
659 | } | 864 | try |
865 | { | ||
866 | d(localID, itemID, script, startParam, postOnRez, engine, stateSource); | ||
867 | } | ||
868 | catch (Exception e) | ||
869 | { | ||
870 | m_log.ErrorFormat( | ||
871 | "[EVENT MANAGER]: Delegate for TriggerRezScript failed - continuing. {0} {1}", | ||
872 | e.Message, e.StackTrace); | ||
873 | } | ||
874 | } | ||
875 | } | ||
660 | } | 876 | } |
661 | 877 | ||
662 | public void TriggerStartScript(uint localID, UUID itemID) | 878 | public void TriggerStartScript(uint localID, UUID itemID) |
663 | { | 879 | { |
664 | handlerStartScript = OnStartScript; | 880 | StartScript handlerStartScript = OnStartScript; |
665 | if (handlerStartScript != null) | 881 | if (handlerStartScript != null) |
666 | { | 882 | { |
667 | handlerStartScript(localID, itemID); | 883 | foreach (StartScript d in handlerStartScript.GetInvocationList()) |
668 | } | 884 | { |
885 | try | ||
886 | { | ||
887 | d(localID, itemID); | ||
888 | } | ||
889 | catch (Exception e) | ||
890 | { | ||
891 | m_log.ErrorFormat( | ||
892 | "[EVENT MANAGER]: Delegate for TriggerStartScript failed - continuing. {0} {1}", | ||
893 | e.Message, e.StackTrace); | ||
894 | } | ||
895 | } | ||
896 | } | ||
669 | } | 897 | } |
670 | 898 | ||
671 | public void TriggerStopScript(uint localID, UUID itemID) | 899 | public void TriggerStopScript(uint localID, UUID itemID) |
672 | { | 900 | { |
673 | handlerStopScript = OnStopScript; | 901 | StopScript handlerStopScript = OnStopScript; |
674 | if (handlerStopScript != null) | 902 | if (handlerStopScript != null) |
675 | { | 903 | { |
676 | handlerStopScript(localID, itemID); | 904 | foreach (StopScript d in handlerStopScript.GetInvocationList()) |
677 | } | 905 | { |
906 | try | ||
907 | { | ||
908 | d(localID, itemID); | ||
909 | } | ||
910 | catch (Exception e) | ||
911 | { | ||
912 | m_log.ErrorFormat( | ||
913 | "[EVENT MANAGER]: Delegate for TriggerStopScript failed - continuing. {0} {1}", | ||
914 | e.Message, e.StackTrace); | ||
915 | } | ||
916 | } | ||
917 | } | ||
678 | } | 918 | } |
679 | 919 | ||
680 | public void TriggerRemoveScript(uint localID, UUID itemID) | 920 | public void TriggerRemoveScript(uint localID, UUID itemID) |
681 | { | 921 | { |
682 | handlerRemoveScript = OnRemoveScript; | 922 | RemoveScript handlerRemoveScript = OnRemoveScript; |
683 | if (handlerRemoveScript != null) | 923 | if (handlerRemoveScript != null) |
684 | { | 924 | { |
685 | handlerRemoveScript(localID, itemID); | 925 | foreach (RemoveScript d in handlerRemoveScript.GetInvocationList()) |
686 | } | 926 | { |
927 | try | ||
928 | { | ||
929 | d(localID, itemID); | ||
930 | } | ||
931 | catch (Exception e) | ||
932 | { | ||
933 | m_log.ErrorFormat( | ||
934 | "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", | ||
935 | e.Message, e.StackTrace); | ||
936 | } | ||
937 | } | ||
938 | } | ||
687 | } | 939 | } |
688 | 940 | ||
689 | public bool TriggerGroupMove(UUID groupID, Vector3 delta) | 941 | public bool TriggerGroupMove(UUID groupID, Vector3 delta) |
690 | { | 942 | { |
691 | handlerSceneGroupMove = OnSceneGroupMove; | 943 | bool result = true; |
692 | 944 | ||
945 | SceneGroupMoved handlerSceneGroupMove = OnSceneGroupMove; | ||
693 | if (handlerSceneGroupMove != null) | 946 | if (handlerSceneGroupMove != null) |
694 | { | 947 | { |
695 | return handlerSceneGroupMove(groupID, delta); | 948 | foreach (SceneGroupMoved d in handlerSceneGroupMove.GetInvocationList()) |
949 | { | ||
950 | try | ||
951 | { | ||
952 | if (d(groupID, delta) == false) | ||
953 | result = false; | ||
954 | } | ||
955 | catch (Exception e) | ||
956 | { | ||
957 | m_log.ErrorFormat( | ||
958 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", | ||
959 | e.Message, e.StackTrace); | ||
960 | } | ||
961 | } | ||
696 | } | 962 | } |
697 | return true; | 963 | |
964 | return result; | ||
698 | } | 965 | } |
699 | 966 | ||
700 | public bool TriggerGroupSpinStart(UUID groupID) | 967 | public bool TriggerGroupSpinStart(UUID groupID) |
701 | { | 968 | { |
702 | handlerSceneGroupSpinStarted = OnSceneGroupSpinStart; | 969 | bool result = true; |
703 | 970 | ||
971 | SceneGroupSpinStarted handlerSceneGroupSpinStarted = OnSceneGroupSpinStart; | ||
704 | if (handlerSceneGroupSpinStarted != null) | 972 | if (handlerSceneGroupSpinStarted != null) |
705 | { | 973 | { |
706 | return handlerSceneGroupSpinStarted(groupID); | 974 | foreach (SceneGroupSpinStarted d in handlerSceneGroupSpinStarted.GetInvocationList()) |
975 | { | ||
976 | try | ||
977 | { | ||
978 | if (d(groupID) == false) | ||
979 | result = false; | ||
980 | } | ||
981 | catch (Exception e) | ||
982 | { | ||
983 | m_log.ErrorFormat( | ||
984 | "[EVENT MANAGER]: Delegate for TriggerGroupSpinStart failed - continuing. {0} {1}", | ||
985 | e.Message, e.StackTrace); | ||
986 | } | ||
987 | } | ||
707 | } | 988 | } |
708 | return true; | 989 | |
990 | return result; | ||
709 | } | 991 | } |
710 | 992 | ||
711 | public bool TriggerGroupSpin(UUID groupID, Quaternion rotation) | 993 | public bool TriggerGroupSpin(UUID groupID, Quaternion rotation) |
712 | { | 994 | { |
713 | handlerSceneGroupSpin = OnSceneGroupSpin; | 995 | bool result = true; |
714 | 996 | ||
997 | SceneGroupSpun handlerSceneGroupSpin = OnSceneGroupSpin; | ||
715 | if (handlerSceneGroupSpin != null) | 998 | if (handlerSceneGroupSpin != null) |
716 | { | 999 | { |
717 | return handlerSceneGroupSpin(groupID, rotation); | 1000 | foreach (SceneGroupSpun d in handlerSceneGroupSpin.GetInvocationList()) |
1001 | { | ||
1002 | try | ||
1003 | { | ||
1004 | if (d(groupID, rotation) == false) | ||
1005 | result = false; | ||
1006 | } | ||
1007 | catch (Exception e) | ||
1008 | { | ||
1009 | m_log.ErrorFormat( | ||
1010 | "[EVENT MANAGER]: Delegate for TriggerGroupSpin failed - continuing. {0} {1}", | ||
1011 | e.Message, e.StackTrace); | ||
1012 | } | ||
1013 | } | ||
718 | } | 1014 | } |
719 | return true; | 1015 | |
1016 | return result; | ||
720 | } | 1017 | } |
721 | 1018 | ||
722 | public void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID) | 1019 | public void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID) |
723 | { | 1020 | { |
724 | handlerSceneGroupGrab = OnSceneGroupGrab; | 1021 | SceneGroupGrabed handlerSceneGroupGrab = OnSceneGroupGrab; |
725 | if (handlerSceneGroupGrab != null) | 1022 | if (handlerSceneGroupGrab != null) |
726 | { | 1023 | { |
727 | handlerSceneGroupGrab(groupID, offset, userID); | 1024 | foreach (SceneGroupGrabed d in handlerSceneGroupGrab.GetInvocationList()) |
728 | } | 1025 | { |
1026 | try | ||
1027 | { | ||
1028 | d(groupID, offset, userID); | ||
1029 | } | ||
1030 | catch (Exception e) | ||
1031 | { | ||
1032 | m_log.ErrorFormat( | ||
1033 | "[EVENT MANAGER]: Delegate for TriggerGroupGrab failed - continuing. {0} {1}", | ||
1034 | e.Message, e.StackTrace); | ||
1035 | } | ||
1036 | } | ||
1037 | } | ||
729 | } | 1038 | } |
730 | 1039 | ||
731 | public void TriggerLandObjectAdded(ILandObject newParcel) | 1040 | public void TriggerLandObjectAdded(ILandObject newParcel) |
732 | { | 1041 | { |
733 | handlerLandObjectAdded = OnLandObjectAdded; | 1042 | LandObjectAdded handlerLandObjectAdded = OnLandObjectAdded; |
734 | |||
735 | if (handlerLandObjectAdded != null) | 1043 | if (handlerLandObjectAdded != null) |
736 | { | 1044 | { |
737 | handlerLandObjectAdded(newParcel); | 1045 | foreach (LandObjectAdded d in handlerLandObjectAdded.GetInvocationList()) |
738 | } | 1046 | { |
1047 | try | ||
1048 | { | ||
1049 | d(newParcel); | ||
1050 | } | ||
1051 | catch (Exception e) | ||
1052 | { | ||
1053 | m_log.ErrorFormat( | ||
1054 | "[EVENT MANAGER]: Delegate for TriggerLandObjectAdded failed - continuing. {0} {1}", | ||
1055 | e.Message, e.StackTrace); | ||
1056 | } | ||
1057 | } | ||
1058 | } | ||
739 | } | 1059 | } |
740 | 1060 | ||
741 | public void TriggerLandObjectRemoved(UUID globalID) | 1061 | public void TriggerLandObjectRemoved(UUID globalID) |
742 | { | 1062 | { |
743 | handlerLandObjectRemoved = OnLandObjectRemoved; | 1063 | LandObjectRemoved handlerLandObjectRemoved = OnLandObjectRemoved; |
744 | if (handlerLandObjectRemoved != null) | 1064 | if (handlerLandObjectRemoved != null) |
745 | { | 1065 | { |
746 | handlerLandObjectRemoved(globalID); | 1066 | foreach (LandObjectRemoved d in handlerLandObjectRemoved.GetInvocationList()) |
747 | } | 1067 | { |
1068 | try | ||
1069 | { | ||
1070 | d(globalID); | ||
1071 | } | ||
1072 | catch (Exception e) | ||
1073 | { | ||
1074 | m_log.ErrorFormat( | ||
1075 | "[EVENT MANAGER]: Delegate for TriggerLandObjectRemoved failed - continuing. {0} {1}", | ||
1076 | e.Message, e.StackTrace); | ||
1077 | } | ||
1078 | } | ||
1079 | } | ||
748 | } | 1080 | } |
749 | 1081 | ||
750 | public void TriggerLandObjectUpdated(uint localParcelID, ILandObject newParcel) | 1082 | public void TriggerLandObjectUpdated(uint localParcelID, ILandObject newParcel) |
751 | { | 1083 | { |
752 | //triggerLandObjectRemoved(localParcelID); | ||
753 | |||
754 | TriggerLandObjectAdded(newParcel); | 1084 | TriggerLandObjectAdded(newParcel); |
755 | } | 1085 | } |
756 | 1086 | ||
757 | public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) | 1087 | public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) |
758 | { | 1088 | { |
759 | handlerAvatarEnteringNewParcel = OnAvatarEnteringNewParcel; | 1089 | AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = OnAvatarEnteringNewParcel; |
760 | |||
761 | if (handlerAvatarEnteringNewParcel != null) | 1090 | if (handlerAvatarEnteringNewParcel != null) |
762 | { | 1091 | { |
763 | handlerAvatarEnteringNewParcel(avatar, localLandID, regionID); | 1092 | foreach (AvatarEnteringNewParcel d in handlerAvatarEnteringNewParcel.GetInvocationList()) |
764 | } | 1093 | { |
1094 | try | ||
1095 | { | ||
1096 | d(avatar, localLandID, regionID); | ||
1097 | } | ||
1098 | catch (Exception e) | ||
1099 | { | ||
1100 | m_log.ErrorFormat( | ||
1101 | "[EVENT MANAGER]: Delegate for TriggerAvatarEnteringNewParcel failed - continuing. {0} {1}", | ||
1102 | e.Message, e.StackTrace); | ||
1103 | } | ||
1104 | } | ||
1105 | } | ||
765 | } | 1106 | } |
766 | 1107 | ||
767 | public void TriggerIncomingInstantMessage(GridInstantMessage message) | 1108 | public void TriggerIncomingInstantMessage(GridInstantMessage message) |
768 | { | 1109 | { |
769 | handlerIncomingInstantMessage = OnIncomingInstantMessage; | 1110 | IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage; |
770 | if (handlerIncomingInstantMessage != null) | 1111 | if (handlerIncomingInstantMessage != null) |
771 | { | 1112 | { |
772 | handlerIncomingInstantMessage(message); | 1113 | foreach (IncomingInstantMessage d in handlerIncomingInstantMessage.GetInvocationList()) |
773 | } | 1114 | { |
1115 | try | ||
1116 | { | ||
1117 | d(message); | ||
1118 | } | ||
1119 | catch (Exception e) | ||
1120 | { | ||
1121 | m_log.ErrorFormat( | ||
1122 | "[EVENT MANAGER]: Delegate for TriggerIncomingInstantMessage failed - continuing. {0} {1}", | ||
1123 | e.Message, e.StackTrace); | ||
1124 | } | ||
1125 | } | ||
1126 | } | ||
774 | } | 1127 | } |
775 | 1128 | ||
776 | public void TriggerUnhandledInstantMessage(GridInstantMessage message) | 1129 | public void TriggerUnhandledInstantMessage(GridInstantMessage message) |
777 | { | 1130 | { |
778 | handlerUnhandledInstantMessage = OnUnhandledInstantMessage; | 1131 | IncomingInstantMessage handlerUnhandledInstantMessage = OnUnhandledInstantMessage; |
779 | if (handlerUnhandledInstantMessage != null) | 1132 | if (handlerUnhandledInstantMessage != null) |
780 | { | 1133 | { |
781 | handlerUnhandledInstantMessage(message); | 1134 | foreach (IncomingInstantMessage d in handlerUnhandledInstantMessage.GetInvocationList()) |
782 | } | 1135 | { |
1136 | try | ||
1137 | { | ||
1138 | d(message); | ||
1139 | } | ||
1140 | catch (Exception e) | ||
1141 | { | ||
1142 | m_log.ErrorFormat( | ||
1143 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", | ||
1144 | e.Message, e.StackTrace); | ||
1145 | } | ||
1146 | } | ||
1147 | } | ||
783 | } | 1148 | } |
784 | 1149 | ||
785 | public void TriggerClientClosed(UUID ClientID, Scene scene) | 1150 | public void TriggerClientClosed(UUID ClientID, Scene scene) |
786 | { | 1151 | { |
787 | handlerClientClosed = OnClientClosed; | 1152 | ClientClosed handlerClientClosed = OnClientClosed; |
788 | if (handlerClientClosed != null) | 1153 | if (handlerClientClosed != null) |
789 | { | 1154 | { |
790 | handlerClientClosed(ClientID, scene); | 1155 | foreach (ClientClosed d in handlerClientClosed.GetInvocationList()) |
791 | } | 1156 | { |
1157 | try | ||
1158 | { | ||
1159 | d(ClientID, scene); | ||
1160 | } | ||
1161 | catch (Exception e) | ||
1162 | { | ||
1163 | m_log.ErrorFormat( | ||
1164 | "[EVENT MANAGER]: Delegate for TriggerClientClosed failed - continuing. {0} {1}", | ||
1165 | e.Message, e.StackTrace); | ||
1166 | } | ||
1167 | } | ||
1168 | } | ||
792 | } | 1169 | } |
793 | 1170 | ||
794 | public void TriggerOnMakeChildAgent(ScenePresence presence) | 1171 | public void TriggerOnMakeChildAgent(ScenePresence presence) |
795 | { | 1172 | { |
796 | handlerMakeChildAgent = OnMakeChildAgent; | 1173 | OnMakeChildAgentDelegate handlerMakeChildAgent = OnMakeChildAgent; |
797 | if (handlerMakeChildAgent != null) | 1174 | if (handlerMakeChildAgent != null) |
798 | { | 1175 | { |
799 | handlerMakeChildAgent(presence); | 1176 | foreach (OnMakeChildAgentDelegate d in handlerMakeChildAgent.GetInvocationList()) |
800 | } | 1177 | { |
1178 | try | ||
1179 | { | ||
1180 | d(presence); | ||
1181 | } | ||
1182 | catch (Exception e) | ||
1183 | { | ||
1184 | m_log.ErrorFormat( | ||
1185 | "[EVENT MANAGER]: Delegate for TriggerOnMakeChildAgent failed - continuing. {0} {1}", | ||
1186 | e.Message, e.StackTrace); | ||
1187 | } | ||
1188 | } | ||
1189 | } | ||
801 | } | 1190 | } |
802 | 1191 | ||
803 | public void TriggerOnSendNewWindlightProfileTargeted(RegionMeta7WindlightData wl, UUID user) | 1192 | public void TriggerOnSendNewWindlightProfileTargeted(RegionMeta7WindlightData wl, UUID user) |
804 | { | 1193 | { |
805 | handlerSendNewWindlightProfileTargeted = OnSendNewWindlightProfileTargeted; | 1194 | OnSendNewWindlightProfileTargetedDelegate handlerSendNewWindlightProfileTargeted = OnSendNewWindlightProfileTargeted; |
806 | if (handlerSendNewWindlightProfileTargeted != null) | 1195 | if (handlerSendNewWindlightProfileTargeted != null) |
807 | { | 1196 | { |
808 | handlerSendNewWindlightProfileTargeted(wl, user); | 1197 | handlerSendNewWindlightProfileTargeted(wl, user); |
@@ -811,7 +1200,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
811 | 1200 | ||
812 | public void TriggerOnSaveNewWindlightProfile() | 1201 | public void TriggerOnSaveNewWindlightProfile() |
813 | { | 1202 | { |
814 | handlerSaveNewWindlightProfile = OnSaveNewWindlightProfile; | 1203 | OnSaveNewWindlightProfileDelegate handlerSaveNewWindlightProfile = OnSaveNewWindlightProfile; |
815 | if (handlerSaveNewWindlightProfile != null) | 1204 | if (handlerSaveNewWindlightProfile != null) |
816 | { | 1205 | { |
817 | handlerSaveNewWindlightProfile(); | 1206 | handlerSaveNewWindlightProfile(); |
@@ -820,203 +1209,464 @@ namespace OpenSim.Region.Framework.Scenes | |||
820 | 1209 | ||
821 | public void TriggerOnMakeRootAgent(ScenePresence presence) | 1210 | public void TriggerOnMakeRootAgent(ScenePresence presence) |
822 | { | 1211 | { |
823 | handlerMakeRootAgent = OnMakeRootAgent; | 1212 | OnMakeRootAgentDelegate handlerMakeRootAgent = OnMakeRootAgent; |
824 | if (handlerMakeRootAgent != null) | 1213 | if (handlerMakeRootAgent != null) |
825 | { | 1214 | { |
826 | handlerMakeRootAgent(presence); | 1215 | foreach (OnMakeRootAgentDelegate d in handlerMakeRootAgent.GetInvocationList()) |
827 | } | 1216 | { |
1217 | try | ||
1218 | { | ||
1219 | d(presence); | ||
1220 | } | ||
1221 | catch (Exception e) | ||
1222 | { | ||
1223 | m_log.ErrorFormat( | ||
1224 | "[EVENT MANAGER]: Delegate for TriggerOnMakeRootAgent failed - continuing. {0} {1}", | ||
1225 | e.Message, e.StackTrace); | ||
1226 | } | ||
1227 | } | ||
1228 | } | ||
828 | } | 1229 | } |
829 | 1230 | ||
830 | public void TriggerOnRegisterCaps(UUID agentID, Caps caps) | 1231 | public void TriggerOnRegisterCaps(UUID agentID, Caps caps) |
831 | { | 1232 | { |
832 | handlerRegisterCaps = OnRegisterCaps; | 1233 | RegisterCapsEvent handlerRegisterCaps = OnRegisterCaps; |
833 | if (handlerRegisterCaps != null) | 1234 | if (handlerRegisterCaps != null) |
834 | { | 1235 | { |
835 | handlerRegisterCaps(agentID, caps); | 1236 | foreach (RegisterCapsEvent d in handlerRegisterCaps.GetInvocationList()) |
836 | } | 1237 | { |
1238 | try | ||
1239 | { | ||
1240 | d(agentID, caps); | ||
1241 | } | ||
1242 | catch (Exception e) | ||
1243 | { | ||
1244 | m_log.ErrorFormat( | ||
1245 | "[EVENT MANAGER]: Delegate for TriggerOnRegisterCaps failed - continuing. {0} {1}", | ||
1246 | e.Message, e.StackTrace); | ||
1247 | } | ||
1248 | } | ||
1249 | } | ||
837 | } | 1250 | } |
838 | 1251 | ||
839 | public void TriggerOnDeregisterCaps(UUID agentID, Caps caps) | 1252 | public void TriggerOnDeregisterCaps(UUID agentID, Caps caps) |
840 | { | 1253 | { |
841 | handlerDeregisterCaps = OnDeregisterCaps; | 1254 | DeregisterCapsEvent handlerDeregisterCaps = OnDeregisterCaps; |
842 | if (handlerDeregisterCaps != null) | 1255 | if (handlerDeregisterCaps != null) |
843 | { | 1256 | { |
844 | handlerDeregisterCaps(agentID, caps); | 1257 | foreach (DeregisterCapsEvent d in handlerDeregisterCaps.GetInvocationList()) |
845 | } | 1258 | { |
1259 | try | ||
1260 | { | ||
1261 | d(agentID, caps); | ||
1262 | } | ||
1263 | catch (Exception e) | ||
1264 | { | ||
1265 | m_log.ErrorFormat( | ||
1266 | "[EVENT MANAGER]: Delegate for TriggerOnDeregisterCaps failed - continuing. {0} {1}", | ||
1267 | e.Message, e.StackTrace); | ||
1268 | } | ||
1269 | } | ||
1270 | } | ||
846 | } | 1271 | } |
847 | 1272 | ||
848 | public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, UUID AssetID, String AssetName, int userlevel) | 1273 | public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, UUID AssetID, String AssetName, int userlevel) |
849 | { | 1274 | { |
850 | handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete; | 1275 | NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete; |
851 | if (handlerNewInventoryItemUpdateComplete != null) | 1276 | if (handlerNewInventoryItemUpdateComplete != null) |
852 | { | 1277 | { |
853 | handlerNewInventoryItemUpdateComplete(agentID, AssetID, AssetName, userlevel); | 1278 | foreach (NewInventoryItemUploadComplete d in handlerNewInventoryItemUpdateComplete.GetInvocationList()) |
854 | } | 1279 | { |
855 | } | 1280 | try |
856 | 1281 | { | |
857 | public void TriggerLandBuy(Object sender, LandBuyArgs e) | 1282 | d(agentID, AssetID, AssetName, userlevel); |
858 | { | 1283 | } |
859 | handlerLandBuy = OnLandBuy; | 1284 | catch (Exception e) |
1285 | { | ||
1286 | m_log.ErrorFormat( | ||
1287 | "[EVENT MANAGER]: Delegate for TriggerOnNewInventoryItemUploadComplete failed - continuing. {0} {1}", | ||
1288 | e.Message, e.StackTrace); | ||
1289 | } | ||
1290 | } | ||
1291 | } | ||
1292 | } | ||
1293 | |||
1294 | public void TriggerLandBuy(Object sender, LandBuyArgs args) | ||
1295 | { | ||
1296 | LandBuy handlerLandBuy = OnLandBuy; | ||
860 | if (handlerLandBuy != null) | 1297 | if (handlerLandBuy != null) |
861 | { | 1298 | { |
862 | handlerLandBuy(sender, e); | 1299 | foreach (LandBuy d in handlerLandBuy.GetInvocationList()) |
863 | } | 1300 | { |
864 | } | 1301 | try |
865 | 1302 | { | |
866 | public void TriggerValidateLandBuy(Object sender, LandBuyArgs e) | 1303 | d(sender, args); |
867 | { | 1304 | } |
868 | handlerValidateLandBuy = OnValidateLandBuy; | 1305 | catch (Exception e) |
1306 | { | ||
1307 | m_log.ErrorFormat( | ||
1308 | "[EVENT MANAGER]: Delegate for TriggerLandBuy failed - continuing. {0} {1}", | ||
1309 | e.Message, e.StackTrace); | ||
1310 | } | ||
1311 | } | ||
1312 | } | ||
1313 | } | ||
1314 | |||
1315 | public void TriggerValidateLandBuy(Object sender, LandBuyArgs args) | ||
1316 | { | ||
1317 | LandBuy handlerValidateLandBuy = OnValidateLandBuy; | ||
869 | if (handlerValidateLandBuy != null) | 1318 | if (handlerValidateLandBuy != null) |
870 | { | 1319 | { |
871 | handlerValidateLandBuy(sender, e); | 1320 | foreach (LandBuy d in handlerValidateLandBuy.GetInvocationList()) |
872 | } | 1321 | { |
1322 | try | ||
1323 | { | ||
1324 | d(sender, args); | ||
1325 | } | ||
1326 | catch (Exception e) | ||
1327 | { | ||
1328 | m_log.ErrorFormat( | ||
1329 | "[EVENT MANAGER]: Delegate for TriggerValidateLandBuy failed - continuing. {0} {1}", | ||
1330 | e.Message, e.StackTrace); | ||
1331 | } | ||
1332 | } | ||
1333 | } | ||
873 | } | 1334 | } |
874 | 1335 | ||
875 | public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos) | 1336 | public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos) |
876 | { | 1337 | { |
877 | handlerScriptAtTargetEvent = OnScriptAtTargetEvent; | 1338 | ScriptAtTargetEvent handlerScriptAtTargetEvent = OnScriptAtTargetEvent; |
878 | if (handlerScriptAtTargetEvent != null) | 1339 | if (handlerScriptAtTargetEvent != null) |
879 | { | 1340 | { |
880 | handlerScriptAtTargetEvent(localID, handle, targetpos, currentpos); | 1341 | foreach (ScriptAtTargetEvent d in handlerScriptAtTargetEvent.GetInvocationList()) |
881 | } | 1342 | { |
1343 | try | ||
1344 | { | ||
1345 | d(localID, handle, targetpos, currentpos); | ||
1346 | } | ||
1347 | catch (Exception e) | ||
1348 | { | ||
1349 | m_log.ErrorFormat( | ||
1350 | "[EVENT MANAGER]: Delegate for TriggerAtTargetEvent failed - continuing. {0} {1}", | ||
1351 | e.Message, e.StackTrace); | ||
1352 | } | ||
1353 | } | ||
1354 | } | ||
882 | } | 1355 | } |
883 | 1356 | ||
884 | public void TriggerNotAtTargetEvent(uint localID) | 1357 | public void TriggerNotAtTargetEvent(uint localID) |
885 | { | 1358 | { |
886 | handlerScriptNotAtTargetEvent = OnScriptNotAtTargetEvent; | 1359 | ScriptNotAtTargetEvent handlerScriptNotAtTargetEvent = OnScriptNotAtTargetEvent; |
887 | if (handlerScriptNotAtTargetEvent != null) | 1360 | if (handlerScriptNotAtTargetEvent != null) |
888 | { | 1361 | { |
889 | handlerScriptNotAtTargetEvent(localID); | 1362 | foreach (ScriptNotAtTargetEvent d in handlerScriptNotAtTargetEvent.GetInvocationList()) |
890 | } | 1363 | { |
1364 | try | ||
1365 | { | ||
1366 | d(localID); | ||
1367 | } | ||
1368 | catch (Exception e) | ||
1369 | { | ||
1370 | m_log.ErrorFormat( | ||
1371 | "[EVENT MANAGER]: Delegate for TriggerNotAtTargetEvent failed - continuing. {0} {1}", | ||
1372 | e.Message, e.StackTrace); | ||
1373 | } | ||
1374 | } | ||
1375 | } | ||
891 | } | 1376 | } |
892 | 1377 | ||
893 | public void TriggerAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion currentrot) | 1378 | public void TriggerAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion currentrot) |
894 | { | 1379 | { |
895 | handlerScriptAtRotTargetEvent = OnScriptAtRotTargetEvent; | 1380 | ScriptAtRotTargetEvent handlerScriptAtRotTargetEvent = OnScriptAtRotTargetEvent; |
896 | if (handlerScriptAtRotTargetEvent != null) | 1381 | if (handlerScriptAtRotTargetEvent != null) |
897 | { | 1382 | { |
898 | handlerScriptAtRotTargetEvent(localID, handle, targetrot, currentrot); | 1383 | foreach (ScriptAtRotTargetEvent d in handlerScriptAtRotTargetEvent.GetInvocationList()) |
899 | } | 1384 | { |
1385 | try | ||
1386 | { | ||
1387 | d(localID, handle, targetrot, currentrot); | ||
1388 | } | ||
1389 | catch (Exception e) | ||
1390 | { | ||
1391 | m_log.ErrorFormat( | ||
1392 | "[EVENT MANAGER]: Delegate for TriggerAtRotTargetEvent failed - continuing. {0} {1}", | ||
1393 | e.Message, e.StackTrace); | ||
1394 | } | ||
1395 | } | ||
1396 | } | ||
900 | } | 1397 | } |
901 | 1398 | ||
902 | public void TriggerNotAtRotTargetEvent(uint localID) | 1399 | public void TriggerNotAtRotTargetEvent(uint localID) |
903 | { | 1400 | { |
904 | handlerScriptNotAtRotTargetEvent = OnScriptNotAtRotTargetEvent; | 1401 | ScriptNotAtRotTargetEvent handlerScriptNotAtRotTargetEvent = OnScriptNotAtRotTargetEvent; |
905 | if (handlerScriptNotAtRotTargetEvent != null) | 1402 | if (handlerScriptNotAtRotTargetEvent != null) |
906 | { | 1403 | { |
907 | handlerScriptNotAtRotTargetEvent(localID); | 1404 | foreach (ScriptNotAtRotTargetEvent d in handlerScriptNotAtRotTargetEvent.GetInvocationList()) |
908 | } | 1405 | { |
1406 | try | ||
1407 | { | ||
1408 | d(localID); | ||
1409 | } | ||
1410 | catch (Exception e) | ||
1411 | { | ||
1412 | m_log.ErrorFormat( | ||
1413 | "[EVENT MANAGER]: Delegate for TriggerNotAtRotTargetEvent failed - continuing. {0} {1}", | ||
1414 | e.Message, e.StackTrace); | ||
1415 | } | ||
1416 | } | ||
1417 | } | ||
909 | } | 1418 | } |
910 | 1419 | ||
911 | public void TriggerRequestChangeWaterHeight(float height) | 1420 | public void TriggerRequestChangeWaterHeight(float height) |
912 | { | 1421 | { |
913 | handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight; | 1422 | RequestChangeWaterHeight handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight; |
914 | if (handlerRequestChangeWaterHeight != null) | 1423 | if (handlerRequestChangeWaterHeight != null) |
915 | { | 1424 | { |
916 | handlerRequestChangeWaterHeight(height); | 1425 | foreach (RequestChangeWaterHeight d in handlerRequestChangeWaterHeight.GetInvocationList()) |
917 | } | 1426 | { |
1427 | try | ||
1428 | { | ||
1429 | d(height); | ||
1430 | } | ||
1431 | catch (Exception e) | ||
1432 | { | ||
1433 | m_log.ErrorFormat( | ||
1434 | "[EVENT MANAGER]: Delegate for TriggerRequestChangeWaterHeight failed - continuing. {0} {1}", | ||
1435 | e.Message, e.StackTrace); | ||
1436 | } | ||
1437 | } | ||
1438 | } | ||
918 | } | 1439 | } |
919 | 1440 | ||
920 | public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar) | 1441 | public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar) |
921 | { | 1442 | { |
922 | handlerAvatarKill = OnAvatarKilled; | 1443 | AvatarKillData handlerAvatarKill = OnAvatarKilled; |
923 | if (handlerAvatarKill != null) | 1444 | if (handlerAvatarKill != null) |
924 | { | 1445 | { |
925 | handlerAvatarKill(KillerObjectLocalID, DeadAvatar); | 1446 | foreach (AvatarKillData d in handlerAvatarKill.GetInvocationList()) |
926 | } | 1447 | { |
1448 | try | ||
1449 | { | ||
1450 | d(KillerObjectLocalID, DeadAvatar); | ||
1451 | } | ||
1452 | catch (Exception e) | ||
1453 | { | ||
1454 | m_log.ErrorFormat( | ||
1455 | "[EVENT MANAGER]: Delegate for TriggerAvatarKill failed - continuing. {0} {1}", | ||
1456 | e.Message, e.StackTrace); | ||
1457 | } | ||
1458 | } | ||
1459 | } | ||
927 | } | 1460 | } |
928 | 1461 | ||
929 | public void TriggerSignificantClientMovement(IClientAPI client) | 1462 | public void TriggerSignificantClientMovement(IClientAPI client) |
930 | { | 1463 | { |
931 | handlerSignificantClientMovement = OnSignificantClientMovement; | 1464 | SignificantClientMovement handlerSignificantClientMovement = OnSignificantClientMovement; |
932 | if (handlerSignificantClientMovement != null) | 1465 | if (handlerSignificantClientMovement != null) |
933 | { | 1466 | { |
934 | handlerSignificantClientMovement(client); | 1467 | foreach (SignificantClientMovement d in handlerSignificantClientMovement.GetInvocationList()) |
935 | } | 1468 | { |
1469 | try | ||
1470 | { | ||
1471 | d(client); | ||
1472 | } | ||
1473 | catch (Exception e) | ||
1474 | { | ||
1475 | m_log.ErrorFormat( | ||
1476 | "[EVENT MANAGER]: Delegate for TriggerSignificantClientMovement failed - continuing. {0} {1}", | ||
1477 | e.Message, e.StackTrace); | ||
1478 | } | ||
1479 | } | ||
1480 | } | ||
936 | } | 1481 | } |
937 | 1482 | ||
938 | public void TriggerOnChatFromWorld(Object sender, OSChatMessage chat) | 1483 | public void TriggerOnChatFromWorld(Object sender, OSChatMessage chat) |
939 | { | 1484 | { |
940 | handlerChatFromWorld = OnChatFromWorld; | 1485 | ChatFromWorldEvent handlerChatFromWorld = OnChatFromWorld; |
941 | if (handlerChatFromWorld != null) | 1486 | if (handlerChatFromWorld != null) |
942 | { | 1487 | { |
943 | handlerChatFromWorld(sender, chat); | 1488 | foreach (ChatFromWorldEvent d in handlerChatFromWorld.GetInvocationList()) |
944 | } | 1489 | { |
1490 | try | ||
1491 | { | ||
1492 | d(sender, chat); | ||
1493 | } | ||
1494 | catch (Exception e) | ||
1495 | { | ||
1496 | m_log.ErrorFormat( | ||
1497 | "[EVENT MANAGER]: Delegate for TriggerOnChatFromWorld failed - continuing. {0} {1}", | ||
1498 | e.Message, e.StackTrace); | ||
1499 | } | ||
1500 | } | ||
1501 | } | ||
945 | } | 1502 | } |
946 | 1503 | ||
947 | public void TriggerOnChatFromClient(Object sender, OSChatMessage chat) | 1504 | public void TriggerOnChatFromClient(Object sender, OSChatMessage chat) |
948 | { | 1505 | { |
949 | handlerChatFromClient = OnChatFromClient; | 1506 | ChatFromClientEvent handlerChatFromClient = OnChatFromClient; |
950 | if (handlerChatFromClient != null) | 1507 | if (handlerChatFromClient != null) |
951 | { | 1508 | { |
952 | handlerChatFromClient(sender, chat); | 1509 | foreach (ChatFromClientEvent d in handlerChatFromClient.GetInvocationList()) |
953 | } | 1510 | { |
1511 | try | ||
1512 | { | ||
1513 | d(sender, chat); | ||
1514 | } | ||
1515 | catch (Exception e) | ||
1516 | { | ||
1517 | m_log.ErrorFormat( | ||
1518 | "[EVENT MANAGER]: Delegate for TriggerOnChatFromClient failed - continuing. {0} {1}", | ||
1519 | e.Message, e.StackTrace); | ||
1520 | } | ||
1521 | } | ||
1522 | } | ||
954 | } | 1523 | } |
955 | 1524 | ||
956 | public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat) | 1525 | public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat) |
957 | { | 1526 | { |
958 | handlerChatBroadcast = OnChatBroadcast; | 1527 | ChatBroadcastEvent handlerChatBroadcast = OnChatBroadcast; |
959 | if (handlerChatBroadcast != null) | 1528 | if (handlerChatBroadcast != null) |
960 | { | 1529 | { |
961 | handlerChatBroadcast(sender, chat); | 1530 | foreach (ChatBroadcastEvent d in handlerChatBroadcast.GetInvocationList()) |
962 | } | 1531 | { |
1532 | try | ||
1533 | { | ||
1534 | d(sender, chat); | ||
1535 | } | ||
1536 | catch (Exception e) | ||
1537 | { | ||
1538 | m_log.ErrorFormat( | ||
1539 | "[EVENT MANAGER]: Delegate for TriggerOnChatBroadcast failed - continuing. {0} {1}", | ||
1540 | e.Message, e.StackTrace); | ||
1541 | } | ||
1542 | } | ||
1543 | } | ||
963 | } | 1544 | } |
964 | 1545 | ||
965 | internal void TriggerControlEvent(uint p, UUID scriptUUID, UUID avatarID, uint held, uint _changed) | 1546 | internal void TriggerControlEvent(uint p, UUID scriptUUID, UUID avatarID, uint held, uint _changed) |
966 | { | 1547 | { |
967 | handlerScriptControlEvent = OnScriptControlEvent; | 1548 | ScriptControlEvent handlerScriptControlEvent = OnScriptControlEvent; |
968 | if (handlerScriptControlEvent != null) | 1549 | if (handlerScriptControlEvent != null) |
969 | { | 1550 | { |
970 | handlerScriptControlEvent(p, scriptUUID, avatarID, held, _changed); | 1551 | foreach (ScriptControlEvent d in handlerScriptControlEvent.GetInvocationList()) |
971 | } | 1552 | { |
1553 | try | ||
1554 | { | ||
1555 | d(p, scriptUUID, avatarID, held, _changed); | ||
1556 | } | ||
1557 | catch (Exception e) | ||
1558 | { | ||
1559 | m_log.ErrorFormat( | ||
1560 | "[EVENT MANAGER]: Delegate for TriggerControlEvent failed - continuing. {0} {1}", | ||
1561 | e.Message, e.StackTrace); | ||
1562 | } | ||
1563 | } | ||
1564 | } | ||
972 | } | 1565 | } |
973 | 1566 | ||
974 | public void TriggerNoticeNoLandDataFromStorage() | 1567 | public void TriggerNoticeNoLandDataFromStorage() |
975 | { | 1568 | { |
976 | handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage; | 1569 | NoticeNoLandDataFromStorage handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage; |
977 | if (handlerNoticeNoLandDataFromStorage != null) | 1570 | if (handlerNoticeNoLandDataFromStorage != null) |
978 | { | 1571 | { |
979 | handlerNoticeNoLandDataFromStorage(); | 1572 | foreach (NoticeNoLandDataFromStorage d in handlerNoticeNoLandDataFromStorage.GetInvocationList()) |
980 | 1573 | { | |
981 | } | 1574 | try |
1575 | { | ||
1576 | d(); | ||
1577 | } | ||
1578 | catch (Exception e) | ||
1579 | { | ||
1580 | m_log.ErrorFormat( | ||
1581 | "[EVENT MANAGER]: Delegate for TriggerNoticeNoLandDataFromStorage failed - continuing. {0} {1}", | ||
1582 | e.Message, e.StackTrace); | ||
1583 | } | ||
1584 | } | ||
1585 | } | ||
982 | } | 1586 | } |
983 | 1587 | ||
984 | public void TriggerIncomingLandDataFromStorage(List<LandData> landData) | 1588 | public void TriggerIncomingLandDataFromStorage(List<LandData> landData) |
985 | { | 1589 | { |
986 | handlerIncomingLandDataFromStorage = OnIncomingLandDataFromStorage; | 1590 | IncomingLandDataFromStorage handlerIncomingLandDataFromStorage = OnIncomingLandDataFromStorage; |
987 | if (handlerIncomingLandDataFromStorage != null) | 1591 | if (handlerIncomingLandDataFromStorage != null) |
988 | { | 1592 | { |
989 | handlerIncomingLandDataFromStorage(landData); | 1593 | foreach (IncomingLandDataFromStorage d in handlerIncomingLandDataFromStorage.GetInvocationList()) |
990 | 1594 | { | |
991 | } | 1595 | try |
1596 | { | ||
1597 | d(landData); | ||
1598 | } | ||
1599 | catch (Exception e) | ||
1600 | { | ||
1601 | m_log.ErrorFormat( | ||
1602 | "[EVENT MANAGER]: Delegate for TriggerIncomingLandDataFromStorage failed - continuing. {0} {1}", | ||
1603 | e.Message, e.StackTrace); | ||
1604 | } | ||
1605 | } | ||
1606 | } | ||
992 | } | 1607 | } |
993 | 1608 | ||
994 | public void TriggerSetAllowForcefulBan(bool allow) | 1609 | public void TriggerSetAllowForcefulBan(bool allow) |
995 | { | 1610 | { |
996 | handlerSetAllowForcefulBan = OnSetAllowForcefulBan; | 1611 | SetAllowForcefulBan handlerSetAllowForcefulBan = OnSetAllowForcefulBan; |
997 | if (handlerSetAllowForcefulBan != null) | 1612 | if (handlerSetAllowForcefulBan != null) |
998 | { | 1613 | { |
999 | handlerSetAllowForcefulBan(allow); | 1614 | foreach (SetAllowForcefulBan d in handlerSetAllowForcefulBan.GetInvocationList()) |
1000 | 1615 | { | |
1001 | } | 1616 | try |
1617 | { | ||
1618 | d(allow); | ||
1619 | } | ||
1620 | catch (Exception e) | ||
1621 | { | ||
1622 | m_log.ErrorFormat( | ||
1623 | "[EVENT MANAGER]: Delegate for TriggerSetAllowForcefulBan failed - continuing. {0} {1}", | ||
1624 | e.Message, e.StackTrace); | ||
1625 | } | ||
1626 | } | ||
1627 | } | ||
1002 | } | 1628 | } |
1003 | 1629 | ||
1004 | public void TriggerRequestParcelPrimCountUpdate() | 1630 | public void TriggerRequestParcelPrimCountUpdate() |
1005 | { | 1631 | { |
1006 | handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate; | 1632 | RequestParcelPrimCountUpdate handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate; |
1007 | if (handlerRequestParcelPrimCountUpdate != null) | 1633 | if (handlerRequestParcelPrimCountUpdate != null) |
1008 | { | 1634 | { |
1009 | handlerRequestParcelPrimCountUpdate(); | 1635 | foreach (RequestParcelPrimCountUpdate d in handlerRequestParcelPrimCountUpdate.GetInvocationList()) |
1010 | } | 1636 | { |
1637 | try | ||
1638 | { | ||
1639 | d(); | ||
1640 | } | ||
1641 | catch (Exception e) | ||
1642 | { | ||
1643 | m_log.ErrorFormat( | ||
1644 | "[EVENT MANAGER]: Delegate for TriggerRequestParcelPrimCountUpdate failed - continuing. {0} {1}", | ||
1645 | e.Message, e.StackTrace); | ||
1646 | } | ||
1647 | } | ||
1648 | } | ||
1011 | } | 1649 | } |
1012 | 1650 | ||
1013 | public void TriggerParcelPrimCountTainted() | 1651 | public void TriggerParcelPrimCountTainted() |
1014 | { | 1652 | { |
1015 | handlerParcelPrimCountTainted = OnParcelPrimCountTainted; | 1653 | ParcelPrimCountTainted handlerParcelPrimCountTainted = OnParcelPrimCountTainted; |
1016 | if (handlerParcelPrimCountTainted != null) | 1654 | if (handlerParcelPrimCountTainted != null) |
1017 | { | 1655 | { |
1018 | handlerParcelPrimCountTainted(); | 1656 | foreach (ParcelPrimCountTainted d in handlerParcelPrimCountTainted.GetInvocationList()) |
1019 | } | 1657 | { |
1658 | try | ||
1659 | { | ||
1660 | d(); | ||
1661 | } | ||
1662 | catch (Exception e) | ||
1663 | { | ||
1664 | m_log.ErrorFormat( | ||
1665 | "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountTainted failed - continuing. {0} {1}", | ||
1666 | e.Message, e.StackTrace); | ||
1667 | } | ||
1668 | } | ||
1669 | } | ||
1020 | } | 1670 | } |
1021 | 1671 | ||
1022 | // this lets us keep track of nasty script events like timer, etc. | 1672 | // this lets us keep track of nasty script events like timer, etc. |
@@ -1039,99 +1689,277 @@ namespace OpenSim.Region.Framework.Scenes | |||
1039 | /// <param name="FixedSunHour">The hour 0.0 <= FixedSunHour <= 24.0 at which the sun is fixed at. Sun Hour 0 is sun-rise, when Day/Night ratio is 1:1</param> | 1689 | /// <param name="FixedSunHour">The hour 0.0 <= FixedSunHour <= 24.0 at which the sun is fixed at. Sun Hour 0 is sun-rise, when Day/Night ratio is 1:1</param> |
1040 | public void TriggerEstateToolsSunUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float FixedSunHour) | 1690 | public void TriggerEstateToolsSunUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float FixedSunHour) |
1041 | { | 1691 | { |
1042 | handlerEstateToolsSunUpdate = OnEstateToolsSunUpdate; | 1692 | EstateToolsSunUpdate handlerEstateToolsSunUpdate = OnEstateToolsSunUpdate; |
1043 | if (handlerEstateToolsSunUpdate != null) | 1693 | if (handlerEstateToolsSunUpdate != null) |
1044 | { | 1694 | { |
1045 | handlerEstateToolsSunUpdate(regionHandle, FixedTime, useEstateTime, FixedSunHour); | 1695 | foreach (EstateToolsSunUpdate d in handlerEstateToolsSunUpdate.GetInvocationList()) |
1046 | } | 1696 | { |
1697 | try | ||
1698 | { | ||
1699 | d(regionHandle, FixedTime, useEstateTime, FixedSunHour); | ||
1700 | } | ||
1701 | catch (Exception e) | ||
1702 | { | ||
1703 | m_log.ErrorFormat( | ||
1704 | "[EVENT MANAGER]: Delegate for TriggerEstateToolsSunUpdate failed - continuing. {0} {1}", | ||
1705 | e.Message, e.StackTrace); | ||
1706 | } | ||
1707 | } | ||
1708 | } | ||
1047 | } | 1709 | } |
1048 | 1710 | ||
1049 | public float GetCurrentTimeAsSunLindenHour() | 1711 | public float GetCurrentTimeAsSunLindenHour() |
1050 | { | 1712 | { |
1051 | handlerCurrentTimeAsLindenSunHour = OnGetCurrentTimeAsLindenSunHour; | 1713 | SunLindenHour handlerCurrentTimeAsLindenSunHour = OnGetCurrentTimeAsLindenSunHour; |
1052 | if (handlerCurrentTimeAsLindenSunHour != null) | 1714 | if (handlerCurrentTimeAsLindenSunHour != null) |
1053 | { | 1715 | { |
1054 | return handlerCurrentTimeAsLindenSunHour(); | 1716 | foreach (SunLindenHour d in handlerCurrentTimeAsLindenSunHour.GetInvocationList()) |
1717 | { | ||
1718 | try | ||
1719 | { | ||
1720 | return d(); | ||
1721 | } | ||
1722 | catch (Exception e) | ||
1723 | { | ||
1724 | m_log.ErrorFormat( | ||
1725 | "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", | ||
1726 | e.Message, e.StackTrace); | ||
1727 | } | ||
1728 | } | ||
1055 | } | 1729 | } |
1730 | |||
1056 | return 6; | 1731 | return 6; |
1057 | } | 1732 | } |
1058 | 1733 | ||
1059 | public void TriggerOarFileLoaded(Guid requestId, string message) | 1734 | public void TriggerOarFileLoaded(Guid requestId, string message) |
1060 | { | 1735 | { |
1061 | handlerOarFileLoaded = OnOarFileLoaded; | 1736 | OarFileLoaded handlerOarFileLoaded = OnOarFileLoaded; |
1062 | if (handlerOarFileLoaded != null) | 1737 | if (handlerOarFileLoaded != null) |
1063 | handlerOarFileLoaded(requestId, message); | 1738 | { |
1739 | foreach (OarFileLoaded d in handlerOarFileLoaded.GetInvocationList()) | ||
1740 | { | ||
1741 | try | ||
1742 | { | ||
1743 | d(requestId, message); | ||
1744 | } | ||
1745 | catch (Exception e) | ||
1746 | { | ||
1747 | m_log.ErrorFormat( | ||
1748 | "[EVENT MANAGER]: Delegate for TriggerOarFileLoaded failed - continuing. {0} {1}", | ||
1749 | e.Message, e.StackTrace); | ||
1750 | } | ||
1751 | } | ||
1752 | } | ||
1064 | } | 1753 | } |
1065 | 1754 | ||
1066 | public void TriggerOarFileSaved(Guid requestId, string message) | 1755 | public void TriggerOarFileSaved(Guid requestId, string message) |
1067 | { | 1756 | { |
1068 | handlerOarFileSaved = OnOarFileSaved; | 1757 | OarFileSaved handlerOarFileSaved = OnOarFileSaved; |
1069 | if (handlerOarFileSaved != null) | 1758 | if (handlerOarFileSaved != null) |
1070 | handlerOarFileSaved(requestId, message); | 1759 | { |
1760 | foreach (OarFileSaved d in handlerOarFileSaved.GetInvocationList()) | ||
1761 | { | ||
1762 | try | ||
1763 | { | ||
1764 | d(requestId, message); | ||
1765 | } | ||
1766 | catch (Exception e) | ||
1767 | { | ||
1768 | m_log.ErrorFormat( | ||
1769 | "[EVENT MANAGER]: Delegate for TriggerOarFileSaved failed - continuing. {0} {1}", | ||
1770 | e.Message, e.StackTrace); | ||
1771 | } | ||
1772 | } | ||
1773 | } | ||
1071 | } | 1774 | } |
1072 | 1775 | ||
1073 | public void TriggerEmptyScriptCompileQueue(int numScriptsFailed, string message) | 1776 | public void TriggerEmptyScriptCompileQueue(int numScriptsFailed, string message) |
1074 | { | 1777 | { |
1075 | handlerEmptyScriptCompileQueue = OnEmptyScriptCompileQueue; | 1778 | EmptyScriptCompileQueue handlerEmptyScriptCompileQueue = OnEmptyScriptCompileQueue; |
1076 | if (handlerEmptyScriptCompileQueue != null) | 1779 | if (handlerEmptyScriptCompileQueue != null) |
1077 | handlerEmptyScriptCompileQueue(numScriptsFailed, message); | 1780 | { |
1781 | foreach (EmptyScriptCompileQueue d in handlerEmptyScriptCompileQueue.GetInvocationList()) | ||
1782 | { | ||
1783 | try | ||
1784 | { | ||
1785 | d(numScriptsFailed, message); | ||
1786 | } | ||
1787 | catch (Exception e) | ||
1788 | { | ||
1789 | m_log.ErrorFormat( | ||
1790 | "[EVENT MANAGER]: Delegate for TriggerEmptyScriptCompileQueue failed - continuing. {0} {1}", | ||
1791 | e.Message, e.StackTrace); | ||
1792 | } | ||
1793 | } | ||
1794 | } | ||
1078 | } | 1795 | } |
1079 | 1796 | ||
1080 | public void TriggerScriptCollidingStart(uint localId, ColliderArgs colliders) | 1797 | public void TriggerScriptCollidingStart(uint localId, ColliderArgs colliders) |
1081 | { | 1798 | { |
1082 | handlerCollidingStart = OnScriptColliderStart; | 1799 | ScriptColliding handlerCollidingStart = OnScriptColliderStart; |
1083 | if (handlerCollidingStart != null) | 1800 | if (handlerCollidingStart != null) |
1084 | handlerCollidingStart(localId, colliders); | 1801 | { |
1802 | foreach (ScriptColliding d in handlerCollidingStart.GetInvocationList()) | ||
1803 | { | ||
1804 | try | ||
1805 | { | ||
1806 | d(localId, colliders); | ||
1807 | } | ||
1808 | catch (Exception e) | ||
1809 | { | ||
1810 | m_log.ErrorFormat( | ||
1811 | "[EVENT MANAGER]: Delegate for TriggerScriptCollidingStart failed - continuing. {0} {1}", | ||
1812 | e.Message, e.StackTrace); | ||
1813 | } | ||
1814 | } | ||
1815 | } | ||
1085 | } | 1816 | } |
1086 | 1817 | ||
1087 | public void TriggerScriptColliding(uint localId, ColliderArgs colliders) | 1818 | public void TriggerScriptColliding(uint localId, ColliderArgs colliders) |
1088 | { | 1819 | { |
1089 | handlerColliding = OnScriptColliding; | 1820 | ScriptColliding handlerColliding = OnScriptColliding; |
1090 | if (handlerColliding != null) | 1821 | if (handlerColliding != null) |
1091 | handlerColliding(localId, colliders); | 1822 | { |
1823 | foreach (ScriptColliding d in handlerColliding.GetInvocationList()) | ||
1824 | { | ||
1825 | try | ||
1826 | { | ||
1827 | d(localId, colliders); | ||
1828 | } | ||
1829 | catch (Exception e) | ||
1830 | { | ||
1831 | m_log.ErrorFormat( | ||
1832 | "[EVENT MANAGER]: Delegate for TriggerScriptColliding failed - continuing. {0} {1}", | ||
1833 | e.Message, e.StackTrace); | ||
1834 | } | ||
1835 | } | ||
1836 | } | ||
1092 | } | 1837 | } |
1093 | 1838 | ||
1094 | public void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders) | 1839 | public void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders) |
1095 | { | 1840 | { |
1096 | handlerCollidingEnd = OnScriptCollidingEnd; | 1841 | ScriptColliding handlerCollidingEnd = OnScriptCollidingEnd; |
1097 | if (handlerCollidingEnd != null) | 1842 | if (handlerCollidingEnd != null) |
1098 | handlerCollidingEnd(localId, colliders); | 1843 | { |
1844 | foreach (ScriptColliding d in handlerCollidingEnd.GetInvocationList()) | ||
1845 | { | ||
1846 | try | ||
1847 | { | ||
1848 | d(localId, colliders); | ||
1849 | } | ||
1850 | catch (Exception e) | ||
1851 | { | ||
1852 | m_log.ErrorFormat( | ||
1853 | "[EVENT MANAGER]: Delegate for TriggerScriptCollidingEnd failed - continuing. {0} {1}", | ||
1854 | e.Message, e.StackTrace); | ||
1855 | } | ||
1856 | } | ||
1857 | } | ||
1099 | } | 1858 | } |
1100 | 1859 | ||
1101 | public void TriggerScriptLandCollidingStart(uint localId, ColliderArgs colliders) | 1860 | public void TriggerScriptLandCollidingStart(uint localId, ColliderArgs colliders) |
1102 | { | 1861 | { |
1103 | handlerLandCollidingStart = OnScriptLandColliderStart; | 1862 | ScriptColliding handlerLandCollidingStart = OnScriptLandColliderStart; |
1104 | if (handlerLandCollidingStart != null) | 1863 | if (handlerLandCollidingStart != null) |
1105 | handlerLandCollidingStart(localId, colliders); | 1864 | { |
1865 | foreach (ScriptColliding d in handlerLandCollidingStart.GetInvocationList()) | ||
1866 | { | ||
1867 | try | ||
1868 | { | ||
1869 | d(localId, colliders); | ||
1870 | } | ||
1871 | catch (Exception e) | ||
1872 | { | ||
1873 | m_log.ErrorFormat( | ||
1874 | "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingStart failed - continuing. {0} {1}", | ||
1875 | e.Message, e.StackTrace); | ||
1876 | } | ||
1877 | } | ||
1878 | } | ||
1106 | } | 1879 | } |
1107 | 1880 | ||
1108 | public void TriggerScriptLandColliding(uint localId, ColliderArgs colliders) | 1881 | public void TriggerScriptLandColliding(uint localId, ColliderArgs colliders) |
1109 | { | 1882 | { |
1110 | handlerLandColliding = OnScriptLandColliding; | 1883 | ScriptColliding handlerLandColliding = OnScriptLandColliding; |
1111 | if (handlerLandColliding != null) | 1884 | if (handlerLandColliding != null) |
1112 | handlerLandColliding(localId, colliders); | 1885 | { |
1886 | foreach (ScriptColliding d in handlerLandColliding.GetInvocationList()) | ||
1887 | { | ||
1888 | try | ||
1889 | { | ||
1890 | d(localId, colliders); | ||
1891 | } | ||
1892 | catch (Exception e) | ||
1893 | { | ||
1894 | m_log.ErrorFormat( | ||
1895 | "[EVENT MANAGER]: Delegate for TriggerScriptLandColliding failed - continuing. {0} {1}", | ||
1896 | e.Message, e.StackTrace); | ||
1897 | } | ||
1898 | } | ||
1899 | } | ||
1113 | } | 1900 | } |
1114 | 1901 | ||
1115 | public void TriggerScriptLandCollidingEnd(uint localId, ColliderArgs colliders) | 1902 | public void TriggerScriptLandCollidingEnd(uint localId, ColliderArgs colliders) |
1116 | { | 1903 | { |
1117 | handlerLandCollidingEnd = OnScriptLandColliderEnd; | 1904 | ScriptColliding handlerLandCollidingEnd = OnScriptLandColliderEnd; |
1118 | if (handlerLandCollidingEnd != null) | 1905 | if (handlerLandCollidingEnd != null) |
1119 | handlerLandCollidingEnd(localId, colliders); | 1906 | { |
1907 | foreach (ScriptColliding d in handlerLandCollidingEnd.GetInvocationList()) | ||
1908 | { | ||
1909 | try | ||
1910 | { | ||
1911 | d(localId, colliders); | ||
1912 | } | ||
1913 | catch (Exception e) | ||
1914 | { | ||
1915 | m_log.ErrorFormat( | ||
1916 | "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingEnd failed - continuing. {0} {1}", | ||
1917 | e.Message, e.StackTrace); | ||
1918 | } | ||
1919 | } | ||
1920 | } | ||
1120 | } | 1921 | } |
1121 | 1922 | ||
1122 | public void TriggerSetRootAgentScene(UUID agentID, Scene scene) | 1923 | public void TriggerSetRootAgentScene(UUID agentID, Scene scene) |
1123 | { | 1924 | { |
1124 | handlerSetRootAgentScene = OnSetRootAgentScene; | 1925 | OnSetRootAgentSceneDelegate handlerSetRootAgentScene = OnSetRootAgentScene; |
1125 | if (handlerSetRootAgentScene != null) | 1926 | if (handlerSetRootAgentScene != null) |
1126 | handlerSetRootAgentScene(agentID, scene); | 1927 | { |
1928 | foreach (OnSetRootAgentSceneDelegate d in handlerSetRootAgentScene.GetInvocationList()) | ||
1929 | { | ||
1930 | try | ||
1931 | { | ||
1932 | d(agentID, scene); | ||
1933 | } | ||
1934 | catch (Exception e) | ||
1935 | { | ||
1936 | m_log.ErrorFormat( | ||
1937 | "[EVENT MANAGER]: Delegate for TriggerSetRootAgentScene failed - continuing. {0} {1}", | ||
1938 | e.Message, e.StackTrace); | ||
1939 | } | ||
1940 | } | ||
1941 | } | ||
1127 | } | 1942 | } |
1128 | 1943 | ||
1129 | public void TriggerOnRegionUp(GridRegion otherRegion) | 1944 | public void TriggerOnRegionUp(GridRegion otherRegion) |
1130 | { | 1945 | { |
1131 | handlerOnRegionUp = OnRegionUp; | 1946 | RegionUp handlerOnRegionUp = OnRegionUp; |
1132 | if (handlerOnRegionUp != null) | 1947 | if (handlerOnRegionUp != null) |
1133 | handlerOnRegionUp(otherRegion); | 1948 | { |
1949 | foreach (RegionUp d in handlerOnRegionUp.GetInvocationList()) | ||
1950 | { | ||
1951 | try | ||
1952 | { | ||
1953 | d(otherRegion); | ||
1954 | } | ||
1955 | catch (Exception e) | ||
1956 | { | ||
1957 | m_log.ErrorFormat( | ||
1958 | "[EVENT MANAGER]: Delegate for TriggerOnRegionUp failed - continuing. {0} {1}", | ||
1959 | e.Message, e.StackTrace); | ||
1960 | } | ||
1961 | } | ||
1962 | } | ||
1134 | } | 1963 | } |
1135 | |||
1136 | } | 1964 | } |
1137 | } | 1965 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 6a3c386..545183b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -699,42 +699,42 @@ namespace OpenSim.Region.Framework.Scenes | |||
699 | { | 699 | { |
700 | m_log.DebugFormat( | 700 | m_log.DebugFormat( |
701 | "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation {0} within {1}", | 701 | "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation {0} within {1}", |
702 | position, m_regionInfo.RegionName); | 702 | position, m_regionInfo.RegionName); |
703 | 703 | ||
704 | // Teleport within the same region | 704 | // Teleport within the same region |
705 | if (IsOutsideRegion(avatar.Scene, position) || position.Z < 0) | 705 | if (IsOutsideRegion(avatar.Scene, position) || position.Z < 0) |
706 | { | 706 | { |
707 | Vector3 emergencyPos = new Vector3(128, 128, 128); | 707 | Vector3 emergencyPos = new Vector3(128, 128, 128); |
708 | 708 | ||
709 | m_log.WarnFormat( | 709 | m_log.WarnFormat( |
710 | "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", | 710 | "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", |
711 | position, avatar.Name, avatar.UUID, emergencyPos); | 711 | position, avatar.Name, avatar.UUID, emergencyPos); |
712 | position = emergencyPos; | 712 | position = emergencyPos; |
713 | } | 713 | } |
714 | 714 | ||
715 | Vector3 currentPos = avatar.AbsolutePosition; | 715 | Vector3 currentPos = avatar.AbsolutePosition; |
716 | ILandObject srcLand = m_scene.LandChannel.GetLandObject(currentPos.X, currentPos.Y); | 716 | ILandObject srcLand = m_scene.LandChannel.GetLandObject(currentPos.X, currentPos.Y); |
717 | ILandObject destLand = m_scene.LandChannel.GetLandObject(position.X, position.Y); | 717 | ILandObject destLand = m_scene.LandChannel.GetLandObject(position.X, position.Y); |
718 | if (srcLand != null && destLand != null && (teleportFlags & (uint)TeleportFlags.ViaLure) == 0 && (teleportFlags & (uint)TeleportFlags.ViaGodlikeLure) == 0) | 718 | if (srcLand != null && destLand != null && (teleportFlags & (uint)TeleportFlags.ViaLure) == 0 && (teleportFlags & (uint)TeleportFlags.ViaGodlikeLure) == 0) |
719 | { | 719 | { |
720 | if (srcLand.LandData.LocalID == destLand.LandData.LocalID) | 720 | if (srcLand.LandData.LocalID == destLand.LandData.LocalID) |
721 | { | 721 | { |
722 | //TPing within the same parcel. If the landing point is restricted, block the TP. | 722 | //TPing within the same parcel. If the landing point is restricted, block the TP. |
723 | //Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni. | 723 | //Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni. |
724 | if (destLand.LandData.LandingType == (byte)1 && destLand.LandData.UserLocation != Vector3.Zero && avatar.GodLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(avatar.UUID) && destLand.LandData.OwnerID != avatar.UUID) | 724 | if (destLand.LandData.LandingType == (byte)1 && destLand.LandData.UserLocation != Vector3.Zero && avatar.GodLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(avatar.UUID) && destLand.LandData.OwnerID != avatar.UUID) |
725 | { | 725 | { |
726 | avatar.ControllingClient.SendAgentAlertMessage("Can't TP to the destination; landing point set.", false); | 726 | avatar.ControllingClient.SendAgentAlertMessage("Can't TP to the destination; landing point set.", false); |
727 | position = currentPos; | 727 | position = currentPos; |
728 | } | 728 | } |
729 | } | 729 | } |
730 | else | 730 | else |
731 | { | 731 | { |
732 | //Tping to a different parcel. Respect the landing point on the destination parcel. | 732 | //Tping to a different parcel. Respect the landing point on the destination parcel. |
733 | if (destLand.LandData.LandingType == (byte)1 && destLand.LandData.UserLocation != Vector3.Zero && avatar.GodLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(avatar.UUID) && destLand.LandData.OwnerID != avatar.UUID) | 733 | if (destLand.LandData.LandingType == (byte)1 && destLand.LandData.UserLocation != Vector3.Zero && avatar.GodLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(avatar.UUID) && destLand.LandData.OwnerID != avatar.UUID) |
734 | { | 734 | { |
735 | position = destLand.LandData.UserLocation; | 735 | position = destLand.LandData.UserLocation; |
736 | } | 736 | } |
737 | } | 737 | } |
738 | } | 738 | } |
739 | 739 | ||
740 | // TODO: Get proper AVG Height | 740 | // TODO: Get proper AVG Height |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index fe1e218..72604d8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -113,6 +113,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
113 | 113 | ||
114 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 114 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
115 | 115 | ||
116 | /// <value> | ||
117 | /// Is this sop a root part? | ||
118 | /// </value> | ||
119 | [XmlIgnore] | ||
120 | public bool IsRoot | ||
121 | { | ||
122 | get { return ParentGroup.RootPart == this; } | ||
123 | } | ||
124 | |||
116 | // use only one serializer to give the runtime a chance to optimize it (it won't do that if you | 125 | // use only one serializer to give the runtime a chance to optimize it (it won't do that if you |
117 | // use a new instance every time) | 126 | // use a new instance every time) |
118 | private static XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); | 127 | private static XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 27df3b2..f1555f7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2979,11 +2979,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2979 | { | 2979 | { |
2980 | m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying); | 2980 | m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying); |
2981 | } | 2981 | } |
2982 | catch(Exception ex) | 2982 | catch |
2983 | { | 2983 | { |
2984 | m_scene.CrossAgentToNewRegion(this, false); | 2984 | m_scene.CrossAgentToNewRegion(this, false); |
2985 | } | 2985 | } |
2986 | |||
2987 | } | 2986 | } |
2988 | 2987 | ||
2989 | public void InTransit() | 2988 | public void InTransit() |
@@ -3061,7 +3060,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3061 | { | 3060 | { |
3062 | RemoveNeighbourRegion(handle); | 3061 | RemoveNeighbourRegion(handle); |
3063 | } | 3062 | } |
3064 | |||
3065 | } | 3063 | } |
3066 | 3064 | ||
3067 | #endregion | 3065 | #endregion |
@@ -3222,7 +3220,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3222 | List<int> attPoints = m_appearance.GetAttachedPoints(); | 3220 | List<int> attPoints = m_appearance.GetAttachedPoints(); |
3223 | if (attPoints != null) | 3221 | if (attPoints != null) |
3224 | { | 3222 | { |
3225 | m_log.DebugFormat("[SCENE PRESENCE]: attachments {0}", attPoints.Count); | 3223 | //m_log.DebugFormat("[SCENE PRESENCE]: attachments {0}", attPoints.Count); |
3226 | int i = 0; | 3224 | int i = 0; |
3227 | AttachmentData[] attachs = new AttachmentData[attPoints.Count]; | 3225 | AttachmentData[] attachs = new AttachmentData[attPoints.Count]; |
3228 | foreach (int point in attPoints) | 3226 | foreach (int point in attPoints) |
@@ -3494,9 +3492,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3494 | } | 3492 | } |
3495 | if (m_health <= 0) | 3493 | if (m_health <= 0) |
3496 | m_scene.EventManager.TriggerAvatarKill(killerObj, this); | 3494 | m_scene.EventManager.TriggerAvatarKill(killerObj, this); |
3497 | } | 3495 | } |
3498 | |||
3499 | |||
3500 | } | 3496 | } |
3501 | 3497 | ||
3502 | public void setHealthWithUpdate(float health) | 3498 | public void setHealthWithUpdate(float health) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs index d4250c1..99973b4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs | |||
@@ -244,6 +244,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
244 | LSL_Types.Vector3 iV; | 244 | LSL_Types.Vector3 iV; |
245 | switch (rule) | 245 | switch (rule) |
246 | { | 246 | { |
247 | case (int)ScriptBaseClass.WL_SUN_MOON_POSITION: | ||
248 | idx++; | ||
249 | wl.sunMoonPosition = (float)rules.GetLSLFloatItem(idx); | ||
250 | break; | ||
247 | case (int)ScriptBaseClass.WL_AMBIENT: | 251 | case (int)ScriptBaseClass.WL_AMBIENT: |
248 | idx++; | 252 | idx++; |
249 | iQ = rules.GetQuaternionItem(idx); | 253 | iQ = rules.GetQuaternionItem(idx); |
@@ -300,7 +304,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
300 | case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: | 304 | case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: |
301 | idx++; | 305 | idx++; |
302 | iV = rules.GetVector3Item(idx); | 306 | iV = rules.GetVector3Item(idx); |
303 | wl.cloudDetailXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); | 307 | wl.cloudXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); |
304 | break; | 308 | break; |
305 | case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: | 309 | case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: |
306 | idx++; | 310 | idx++; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs index 7b67fa3..522c020 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs | |||
@@ -70,7 +70,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
70 | public const int WL_CLOUD_SCROLL_Y = 32; | 70 | public const int WL_CLOUD_SCROLL_Y = 32; |
71 | public const int WL_CLOUD_SCROLL_Y_LOCK = 33; | 71 | public const int WL_CLOUD_SCROLL_Y_LOCK = 33; |
72 | public const int WL_CLOUD_SCROLL_X_LOCK = 34; | 72 | public const int WL_CLOUD_SCROLL_X_LOCK = 34; |
73 | public const int WL_DRAW_CLASSIC_CLOUDS = 35; | 73 | public const int WL_DRAW_CLASSIC_CLOUDS = 35; |
74 | public const int WL_SUN_MOON_POSITION = 36; | ||
74 | 75 | ||
75 | } | 76 | } |
76 | } | 77 | } |