diff options
author | Melanie Thielker | 2017-02-09 23:16:23 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-03-31 14:38:41 +0100 |
commit | 91f142bbd2f11580da86c66fad2c08d176b09c97 (patch) | |
tree | 1f0480811a7ae8434013ce7630ffaa230e9cd8e0 /OpenSim/Region | |
parent | A god is a god is a god. Let gods access scripts and NCs (diff) | |
download | opensim-SC-91f142bbd2f11580da86c66fad2c08d176b09c97.zip opensim-SC-91f142bbd2f11580da86c66fad2c08d176b09c97.tar.gz opensim-SC-91f142bbd2f11580da86c66fad2c08d176b09c97.tar.bz2 opensim-SC-91f142bbd2f11580da86c66fad2c08d176b09c97.tar.xz |
Add the option to link a scene object with a monitoring object
For debugging purposes.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3f531be..6332beb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -376,6 +376,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
376 | public bool m_dupeInProgress = false; | 376 | public bool m_dupeInProgress = false; |
377 | internal Dictionary<UUID, string> m_savedScriptState; | 377 | internal Dictionary<UUID, string> m_savedScriptState; |
378 | 378 | ||
379 | public UUID MonitoringObject { get; set; } | ||
380 | |||
379 | #region Properties | 381 | #region Properties |
380 | 382 | ||
381 | /// <summary> | 383 | /// <summary> |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 45bdb41..9c67395 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -424,6 +424,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
424 | return lease; | 424 | return lease; |
425 | } | 425 | } |
426 | 426 | ||
427 | protected SceneObjectPart MonitoringObject() | ||
428 | { | ||
429 | UUID m = m_host.ParentGroup.MonitoringObject; | ||
430 | if (m == UUID.Zero) | ||
431 | return null; | ||
432 | |||
433 | SceneObjectPart p = m_ScriptEngine.World.GetSceneObjectPart(m); | ||
434 | if (p == null) | ||
435 | m_host.ParentGroup.MonitoringObject = UUID.Zero; | ||
436 | |||
437 | return p; | ||
438 | } | ||
439 | |||
427 | protected virtual void ScriptSleep(int delay) | 440 | protected virtual void ScriptSleep(int delay) |
428 | { | 441 | { |
429 | delay = (int)((float)delay * m_ScriptDelayFactor); | 442 | delay = (int)((float)delay * m_ScriptDelayFactor); |