diff options
author | Justin Clark-Casey (justincc) | 2013-04-03 00:23:20 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-04-03 00:23:20 +0100 |
commit | 97f0c9da84f9a3a73a63c209012260fa2c59c0de (patch) | |
tree | e65a049ed166d0be84f42a675adb459aa5d24dfa /OpenSim/Region | |
parent | fix minor race condition in SOP.SitTargetPositionLL where inconsistency could... (diff) | |
download | opensim-SC-97f0c9da84f9a3a73a63c209012260fa2c59c0de.zip opensim-SC-97f0c9da84f9a3a73a63c209012260fa2c59c0de.tar.gz opensim-SC-97f0c9da84f9a3a73a63c209012260fa2c59c0de.tar.bz2 opensim-SC-97f0c9da84f9a3a73a63c209012260fa2c59c0de.tar.xz |
Use consistent GroupPosition value Make SOP.UpdateGroupPosition() rather than one that could change whilst the method is being executed.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3e816fc..7697411 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3902,13 +3902,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
3902 | } | 3902 | } |
3903 | } | 3903 | } |
3904 | 3904 | ||
3905 | public void UpdateGroupPosition(Vector3 pos) | 3905 | public void UpdateGroupPosition(Vector3 newPos) |
3906 | { | 3906 | { |
3907 | if ((pos.X != GroupPosition.X) || | 3907 | Vector3 oldPos = GroupPosition; |
3908 | (pos.Y != GroupPosition.Y) || | 3908 | |
3909 | (pos.Z != GroupPosition.Z)) | 3909 | if ((newPos.X != oldPos.X) || |
3910 | (newPos.Y != oldPos.Y) || | ||
3911 | (newPos.Z != oldPos.Z)) | ||
3910 | { | 3912 | { |
3911 | Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z); | ||
3912 | GroupPosition = newPos; | 3913 | GroupPosition = newPos; |
3913 | ScheduleTerseUpdate(); | 3914 | ScheduleTerseUpdate(); |
3914 | } | 3915 | } |