aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTom2010-08-07 06:28:04 -0700
committerTom2010-08-07 06:28:04 -0700
commit4f80d75bf3fa6de226203c6752e7a8e53fda8108 (patch)
tree0af57fc7c648d265358b10d5f799fb6d3d6018a2
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
downloadopensim-SC-4f80d75bf3fa6de226203c6752e7a8e53fda8108.zip
opensim-SC-4f80d75bf3fa6de226203c6752e7a8e53fda8108.tar.gz
opensim-SC-4f80d75bf3fa6de226203c6752e7a8e53fda8108.tar.bz2
opensim-SC-4f80d75bf3fa6de226203c6752e7a8e53fda8108.tar.xz
Add a CHANGED_POSITION event so scripts don't have to run expensive loops to check for position changes
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
3 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 8ce79a2..cac3df6 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -476,6 +476,7 @@ namespace OpenSim.Region.Framework.Scenes
476 part.IgnoreUndoUpdate = false; 476 part.IgnoreUndoUpdate = false;
477 part.StoreUndoState(UndoType.STATE_GROUP_POSITION); 477 part.StoreUndoState(UndoType.STATE_GROUP_POSITION);
478 part.GroupPosition = val; 478 part.GroupPosition = val;
479 part.TriggerScriptChangedEvent(Changed.POSITION);
479 } 480 }
480 481
481 foreach (ScenePresence av in m_linkedAvatars) 482 foreach (ScenePresence av in m_linkedAvatars)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index efdc19c..d544619 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -60,7 +60,8 @@ namespace OpenSim.Region.Framework.Scenes
60 TELEPORT = 512, 60 TELEPORT = 512,
61 REGION_RESTART = 1024, 61 REGION_RESTART = 1024,
62 MEDIA = 2048, 62 MEDIA = 2048,
63 ANIMATION = 16384 63 ANIMATION = 16384,
64 POSITION = 32768
64 } 65 }
65 66
66 // I don't really know where to put this except here. 67 // I don't really know where to put this except here.
@@ -730,6 +731,7 @@ namespace OpenSim.Region.Framework.Scenes
730 } 731 }
731 } 732 }
732 } 733 }
734 TriggerScriptChangedEvent(Changed.POSITION);
733 } 735 }
734 } 736 }
735 737
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 5da6bb9..6e8435d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -279,6 +279,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
279 public const int CHANGED_REGION_START = 1024; //LL Changed the constant from CHANGED_REGION_RESTART 279 public const int CHANGED_REGION_START = 1024; //LL Changed the constant from CHANGED_REGION_RESTART
280 public const int CHANGED_MEDIA = 2048; 280 public const int CHANGED_MEDIA = 2048;
281 public const int CHANGED_ANIMATION = 16384; 281 public const int CHANGED_ANIMATION = 16384;
282 public const int CHANGED_POSITION = 32768;
282 public const int TYPE_INVALID = 0; 283 public const int TYPE_INVALID = 0;
283 public const int TYPE_INTEGER = 1; 284 public const int TYPE_INTEGER = 1;
284 public const int TYPE_FLOAT = 2; 285 public const int TYPE_FLOAT = 2;