Try to prevent threading issues in SP.SetAppearance by locking it

avinationmerge
Melanie 2010-09-27 19:34:16 +02:00
parent 5b2aa02fd9
commit 841c84831f
1 changed files with 58 additions and 53 deletions

View File

@ -229,6 +229,8 @@ namespace OpenSim.Region.Framework.Scenes
private const int NumMovementsBetweenRayCast = 5; private const int NumMovementsBetweenRayCast = 5;
private List<uint> m_lastColliders = new List<uint>(); private List<uint> m_lastColliders = new List<uint>();
private object m_syncRoot = new Object();
private bool CameraConstraintActive; private bool CameraConstraintActive;
//private int m_moveToPositionStateStatus; //private int m_moveToPositionStateStatus;
//***************************************************** //*****************************************************
@ -2860,6 +2862,8 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="texture"></param> /// <param name="texture"></param>
/// <param name="visualParam"></param> /// <param name="visualParam"></param>
public void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams) public void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams)
{
lock (m_syncRoot)
{ {
if (m_physicsActor != null) if (m_physicsActor != null)
{ {
@ -2922,6 +2926,7 @@ namespace OpenSim.Region.Framework.Scenes
m_controllingClient.SendAvatarDataImmediate(this); m_controllingClient.SendAvatarDataImmediate(this);
} }
}
public void SetWearable(int wearableId, AvatarWearable wearable) public void SetWearable(int wearableId, AvatarWearable wearable)
{ {