locking issue

LSLKeyTest
UbitUmarov 2016-08-22 06:50:20 +01:00
parent 3ffb6e8120
commit b98b535a6b
1 changed files with 18 additions and 18 deletions

View File

@ -345,6 +345,7 @@ namespace OpenSim.Region.Framework.Scenes
private string m_text = String.Empty;
private string m_touchName = String.Empty;
private UndoRedoState m_UndoRedo = null;
private object m_UndoLock = new object();
private bool m_passTouches = false;
private bool m_passCollisions = false;
@ -399,13 +400,12 @@ namespace OpenSim.Region.Framework.Scenes
// 0 for default collision sounds, -1 for script disabled sound 1 for script defined sound
private sbyte m_collisionSoundType;
private sbyte m_collisionSoundType = 0;
private UUID m_collisionSound;
private float m_collisionSoundVolume;
private int LastColSoundSentTime;
private SOPVehicle m_vehicleParams = null;
public KeyframeMotion KeyframeMotion
@ -3931,12 +3931,12 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
}
public void StoreUndoState(ObjectChangeType change)
{
lock (m_UndoLock)
{
if (m_UndoRedo == null)
m_UndoRedo = new UndoRedoState(5);
lock (m_UndoRedo)
{
if (!Undoing && !IgnoreUndoUpdate && ParentGroup != null) // just to read better - undo is in progress, or suspended
{
m_UndoRedo.StoreUndo(this, change);
@ -3958,12 +3958,12 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
}
public void Undo()
{
lock (m_UndoLock)
{
if (m_UndoRedo == null || Undoing || ParentGroup == null)
return;
lock (m_UndoRedo)
{
Undoing = true;
m_UndoRedo.Undo(this);
Undoing = false;
@ -3971,12 +3971,12 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
}
public void Redo()
{
lock (m_UndoLock)
{
if (m_UndoRedo == null || Undoing || ParentGroup == null)
return;
lock (m_UndoRedo)
{
Undoing = true;
m_UndoRedo.Redo(this);
Undoing = false;
@ -3984,12 +3984,12 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
}
public void ClearUndoState()
{
lock (m_UndoLock)
{
if (m_UndoRedo == null || Undoing)
return;
lock (m_UndoRedo)
{
m_UndoRedo.Clear();
}
}