diff options
author | UbitUmarov | 2016-08-22 06:50:20 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-22 06:50:20 +0100 |
commit | b98b535a6b16ec16837fe3dcb5135e7c39bf9ad8 (patch) | |
tree | 6fae5d681abb59d3dfbfed898e0cc5d8909a8a80 | |
parent | minor locking issue (diff) | |
download | opensim-SC-b98b535a6b16ec16837fe3dcb5135e7c39bf9ad8.zip opensim-SC-b98b535a6b16ec16837fe3dcb5135e7c39bf9ad8.tar.gz opensim-SC-b98b535a6b16ec16837fe3dcb5135e7c39bf9ad8.tar.bz2 opensim-SC-b98b535a6b16ec16837fe3dcb5135e7c39bf9ad8.tar.xz |
locking issue
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 01a323e..cdf97b6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -345,6 +345,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
345 | private string m_text = String.Empty; | 345 | private string m_text = String.Empty; |
346 | private string m_touchName = String.Empty; | 346 | private string m_touchName = String.Empty; |
347 | private UndoRedoState m_UndoRedo = null; | 347 | private UndoRedoState m_UndoRedo = null; |
348 | private object m_UndoLock = new object(); | ||
348 | 349 | ||
349 | private bool m_passTouches = false; | 350 | private bool m_passTouches = false; |
350 | private bool m_passCollisions = false; | 351 | private bool m_passCollisions = false; |
@@ -399,13 +400,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
399 | 400 | ||
400 | 401 | ||
401 | // 0 for default collision sounds, -1 for script disabled sound 1 for script defined sound | 402 | // 0 for default collision sounds, -1 for script disabled sound 1 for script defined sound |
402 | private sbyte m_collisionSoundType; | 403 | private sbyte m_collisionSoundType = 0; |
403 | private UUID m_collisionSound; | 404 | private UUID m_collisionSound; |
404 | private float m_collisionSoundVolume; | 405 | private float m_collisionSoundVolume; |
405 | 406 | ||
406 | private int LastColSoundSentTime; | 407 | private int LastColSoundSentTime; |
407 | 408 | ||
408 | |||
409 | private SOPVehicle m_vehicleParams = null; | 409 | private SOPVehicle m_vehicleParams = null; |
410 | 410 | ||
411 | public KeyframeMotion KeyframeMotion | 411 | public KeyframeMotion KeyframeMotion |
@@ -3932,11 +3932,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3932 | 3932 | ||
3933 | public void StoreUndoState(ObjectChangeType change) | 3933 | public void StoreUndoState(ObjectChangeType change) |
3934 | { | 3934 | { |
3935 | if (m_UndoRedo == null) | 3935 | lock (m_UndoLock) |
3936 | m_UndoRedo = new UndoRedoState(5); | ||
3937 | |||
3938 | lock (m_UndoRedo) | ||
3939 | { | 3936 | { |
3937 | if (m_UndoRedo == null) | ||
3938 | m_UndoRedo = new UndoRedoState(5); | ||
3939 | |||
3940 | if (!Undoing && !IgnoreUndoUpdate && ParentGroup != null) // just to read better - undo is in progress, or suspended | 3940 | if (!Undoing && !IgnoreUndoUpdate && ParentGroup != null) // just to read better - undo is in progress, or suspended |
3941 | { | 3941 | { |
3942 | m_UndoRedo.StoreUndo(this, change); | 3942 | m_UndoRedo.StoreUndo(this, change); |
@@ -3959,11 +3959,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3959 | 3959 | ||
3960 | public void Undo() | 3960 | public void Undo() |
3961 | { | 3961 | { |
3962 | if (m_UndoRedo == null || Undoing || ParentGroup == null) | 3962 | lock (m_UndoLock) |
3963 | return; | ||
3964 | |||
3965 | lock (m_UndoRedo) | ||
3966 | { | 3963 | { |
3964 | if (m_UndoRedo == null || Undoing || ParentGroup == null) | ||
3965 | return; | ||
3966 | |||
3967 | Undoing = true; | 3967 | Undoing = true; |
3968 | m_UndoRedo.Undo(this); | 3968 | m_UndoRedo.Undo(this); |
3969 | Undoing = false; | 3969 | Undoing = false; |
@@ -3972,11 +3972,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3972 | 3972 | ||
3973 | public void Redo() | 3973 | public void Redo() |
3974 | { | 3974 | { |
3975 | if (m_UndoRedo == null || Undoing || ParentGroup == null) | 3975 | lock (m_UndoLock) |
3976 | return; | ||
3977 | |||
3978 | lock (m_UndoRedo) | ||
3979 | { | 3976 | { |
3977 | if (m_UndoRedo == null || Undoing || ParentGroup == null) | ||
3978 | return; | ||
3979 | |||
3980 | Undoing = true; | 3980 | Undoing = true; |
3981 | m_UndoRedo.Redo(this); | 3981 | m_UndoRedo.Redo(this); |
3982 | Undoing = false; | 3982 | Undoing = false; |
@@ -3985,11 +3985,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3985 | 3985 | ||
3986 | public void ClearUndoState() | 3986 | public void ClearUndoState() |
3987 | { | 3987 | { |
3988 | if (m_UndoRedo == null || Undoing) | 3988 | lock (m_UndoLock) |
3989 | return; | ||
3990 | |||
3991 | lock (m_UndoRedo) | ||
3992 | { | 3989 | { |
3990 | if (m_UndoRedo == null || Undoing) | ||
3991 | return; | ||
3992 | |||
3993 | m_UndoRedo.Clear(); | 3993 | m_UndoRedo.Clear(); |
3994 | } | 3994 | } |
3995 | } | 3995 | } |