Merge branch 'master' of /home/opensim/var/repo/opensim

integration
BlueWall 2012-08-23 17:34:19 -04:00
commit 7daca3299a
7 changed files with 55 additions and 35 deletions

View File

@ -307,6 +307,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
Graphics graph = null; Graphics graph = null;
try try
{
// XXX: In testing, it appears that if multiple threads dispose of separate GDI+ objects simultaneously,
// the native malloc heap can become corrupted, possibly due to a double free(). This may be due to
// bugs in the underlying libcairo used by mono's libgdiplus.dll on Linux/OSX. These problems were
// seen with both libcario 1.10.2-6.1ubuntu3 and 1.8.10-2ubuntu1. They go away if disposal is perfomed
// under lock.
lock (this)
{ {
if (alpha == 256) if (alpha == 256)
bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb); bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb);
@ -337,6 +344,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
} }
GDIDraw(data, graph, altDataDelim); GDIDraw(data, graph, altDataDelim);
}
byte[] imageJ2000 = new byte[0]; byte[] imageJ2000 = new byte[0];
@ -354,6 +362,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
m_textureManager.ReturnData(id, imageJ2000); m_textureManager.ReturnData(id, imageJ2000);
} }
finally finally
{
// XXX: In testing, it appears that if multiple threads dispose of separate GDI+ objects simultaneously,
// the native malloc heap can become corrupted, possibly due to a double free(). This may be due to
// bugs in the underlying libcairo used by mono's libgdiplus.dll on Linux/OSX. These problems were
// seen with both libcario 1.10.2-6.1ubuntu3 and 1.8.10-2ubuntu1. They go away if disposal is perfomed
// under lock.
lock (this)
{ {
if (graph != null) if (graph != null)
graph.Dispose(); graph.Dispose();
@ -362,6 +377,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
bitmap.Dispose(); bitmap.Dispose();
} }
} }
}
private int parseIntParam(string strInt) private int parseIntParam(string strInt)
{ {

View File

@ -85,13 +85,15 @@ namespace OpenSim.Region.CoreModules.World.Sound
dis = 0; dis = 0;
} }
float thisSpGain;
// Scale by distance // Scale by distance
if (radius == 0) if (radius == 0)
gain = (float)((double)gain * ((100.0 - dis) / 100.0)); thisSpGain = (float)((double)gain * ((100.0 - dis) / 100.0));
else else
gain = (float)((double)gain * ((radius - dis) / radius)); thisSpGain = (float)((double)gain * ((radius - dis) / radius));
sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags); sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, thisSpGain, flags);
}); });
} }

View File

@ -1341,11 +1341,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
scale.y = Math.Max(World.m_minPhys, Math.Min(World.m_maxPhys, scale.y)); scale.y = Math.Max(World.m_minPhys, Math.Min(World.m_maxPhys, scale.y));
scale.z = Math.Max(World.m_minPhys, Math.Min(World.m_maxPhys, scale.z)); scale.z = Math.Max(World.m_minPhys, Math.Min(World.m_maxPhys, scale.z));
} }
else
// Next we clamp the scale to the non-physical min/max {
// If not physical, then we clamp the scale to the non-physical min/max
scale.x = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.x)); scale.x = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.x));
scale.y = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.y)); scale.y = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.y));
scale.z = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.z)); scale.z = Math.Max(World.m_minNonphys, Math.Min(World.m_maxNonphys, scale.z));
}
Vector3 tmp = part.Scale; Vector3 tmp = part.Scale;
tmp.X = (float)scale.x; tmp.X = (float)scale.x;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.